I have been programming this device for a few days now and can offer these observations which may help.
The 12F629 does not have an A/D converter but you still need to set the Analog Select (ANSEL)register and the Comparator Control (CMCON) register to get the digital i/o working. i.e.
#byte CMCON=0x19
#byte ANSEL=0x9f
main() {
CMCON=0x07; // Comparator off.
ANSEL=0x00; // All i/o digital.
// Normal i/o commands i.e. output_low will now work
}
The #fuses INTRC and INTRC_IO compile to produce a call to 3FFh in order to load the clock calibration value. If the pre-loaded RETLW XX instruction has been erased by erasing the whole device (very easy to do with the PromateII, but not as easy to recover ) then the program will hang. This would explain some of the problems reported.
The PICkit 1 Flash starter kit works well with MPLAB and has the very useful facility of being able to re-calculate and re-load the calibration value at 3ffh.
Hope this helps, and I hope this post does not disappear into the ether as my last one did
burnsy
Joined: 18 Oct 2003 Posts: 35 Location: Brisbane, Australia
Thanks
Posted: Fri Dec 26, 2003 5:05 pm
Thanks, that worked well for me too. _________________ This is the last code change until its ready....
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum