Which PIC are you actually using? Your code example above indicates a 12F675, but you asked about the 12F683?
For the 12F675 you need CMCON = 7 to disable comparators.
For the 12F683 you need CMCON0 = 7 to disable comparators.
Which PIC are you actually using? Your code example above indicates a 12F675, but you asked about the 12F683?
For the 12F675 you need CMCON = 7 to disable comparators.
For the 12F683 you need CMCON0 = 7 to disable comparators.
Last edited by Bruce; - 15th March 2007 at 15:56.
bruce i tried both but the pic12f675 works with one of my programmers beter dont have to keep swaping out the pic so thats what i am trying now
really does not mater after i get it working
How does it work with this?
Code:@ DEVICE PIC12F675,MCLR_OFF,INTRC_OSC_NOCLKOUT,WDT_OFF,BOD_ON,PWRT_ON ANSEL = 0 CMCON = 7 OPTION_REG = 0 TRISIO = %00100011 WPU = %00000011 ' Example program from manual to blink an LED connected to gpio.4 about once ' a sec led var gpio.0 loop: if led = 1 then low 2 else high 2 endif HIGH gpio.4 ' Turn on LED connected to gpio.4 Pause 1000 ' Delay for .5 seconds LOW gpio.4 ' Turn off LED connected to gpio.4 Pause 500 ' Delay for .5 seconds Goto loop ' Go back to loop and blink LED forever End
Last edited by Bruce; - 15th March 2007 at 16:06.
this functions but not as expected at first pin to v+ caused change
than after short time v- caused change which is what i would expect
dont quiet understand inital operation but this is doing what i want
thanks
this program works but still get times when it functions backwards
should be gnd to pin to work but sometimes after downloading program
it will be just the oppisite + volts to pin
any changes that will stop this from accuring
Are you sure it's not a hardware problem? I ran this on a 12F675, and it works
exactly as expected. No matter how many times I re-program it.
bruce:
not 100 % sure but seems strange that sometimes + volts cause the pic the way - volts should than sometimes it works just the right way - volts causes the pic to respond properly is there some sort of start up or setting that could cause this maybe pullup not coming on?
Bookmarks