Hi,
Which PIC are you using?
It probably has some analog function on PortB.2 so you need to set it to digital mode.
Another thing is that it might do exactly what you want it to do. But when the Until PortB.2=0 evaluates true you don't do ANYTHING so the program continues into empty space and then start over, try:
Code:
...
...
loop until portb.2 = 0
LOW PortB.7
END
Also, remember that define is case sensitive so it should be define OSC 4. In this case it doesn't really matter since 4MHz is the default anyway but try to remember that.
/Henrik.
EDIT: What exactly is the reason for posting the exact same question twice? You've already received an answer in the other thread....
Any moderator care to delete or join threads?
Bookmarks