Switch to ground. Definately the better way to go.
I might suggest a different Main loop though.Those pesky R-M-W'sCode:MAIN: IF RELAY = Pswitch THEN RELAY = ! Pswitch ' Relay pin = the opposite of Pswitch pin ENDIF PAUSE 20 GOTO MAIN END
<br>
Switch to ground. Definately the better way to go.
I might suggest a different Main loop though.Those pesky R-M-W'sCode:MAIN: IF RELAY = Pswitch THEN RELAY = ! Pswitch ' Relay pin = the opposite of Pswitch pin ENDIF PAUSE 20 GOTO MAIN END
<br>
DT
Hi all out there
The last time I did a 8 pin pic was 10 years ago
The problem was to do with the weak pull up
I really want to thank all out there
Bye for now
Yes, in fact, from my understanding, it reads the content of the output-latch.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Is it safe?
Well, as far as doing damage, it's perfectly "Safe".
In fact the chip "reads" the state of the OUTPUT pin, everytime you you change the state of any pin on the same port.
The only un-safe part, is if you don't take the R-M-W problems into account.
Can really mess with the program.
<br>
DT
Bookmarks