? #1 - Are you using PicBasic or PicBasicPro? I assume PicBasic. Which version?
PIC12F675 doesn't have PortA, it's got GPIO.
But I see you're using TRISA/PORTA as an alias for GPIO...
Do you have a pullup resistor on the button? Is it connected to Vdd or Vss directly? Does it float if the button isn't pressed?
How about trying something like this:
The ONLY thing that happens here is that the LED follows the button...that's it. Nothing else..Code:POKE $9f,0:POKE $1f,254:POKE $85,255:symbol PORTA=5:POKE PORTA, 0 Loop1: PEEK PORTA, B0 'COPY PORTA REG, PUT IN VARIABLE B0 IF B0 = 1 THEN HIGH 0 IF B0 = 0 then LOW 0 goto loop1 end
At least that's the only thing that SHOULD happen...




Bookmarks