
Originally Posted by
Jeff
Hey, thanks for answering, skimask. I am running PICBASIC 2.3.0.0. My button is pulled up with thru a resistor, so when button is pressed, pin goes low - to ground.
I could not compile your code. Maybe I am missing something:
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
It gets stuck on the "IF B0" lines. Couple more questions: Can I address the pins on this chip using "GPIO". You mentioned that I was using PortA. Maybe it is the same thing; Port A being used on IC's with more than one port? (sounds like maybe I answered my own Q but gotta ask.) Also, how do you make the code quote box? Thanks in advance!
Jeff
Hi Jeff,
I have not used PBC but I tell ya what I think: Change PEEK PORTA to PEEK GPIO.5 and POKE PORTA to POKE GPIO.5 and lose the symbol PORTA=5, I think your compiler is really looking for PortA which is unsupported for this chip. WOW glad I bought the pro version this looks a lot tougher to use.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks