ronbowalker@verizon.net
New Member
Using PICBASIC PRO,
I previously built a device to monitor a single input, status being a contact open or closed. Each status change would blink an led, only once. EX: contact closed, LED A blinks once...contact open, LED B blinks once. This loop continued forever. But now insted of a 12vdc hardwired system, I am going to a coin battery 3v system. I also went to the 12F683 instead of the 16F84A. Here is the issue: I cannot get the inputs GPIO.0, 1, 4, 5 to stay outputs,,,,,and the GPIO.2 & 3 to stay inputs. I would like to have 2 inputs and 4 outputs. This way I can monitor 2 separate contact status positions, using a total of 4 LED indicators. They need to operate independently from one another.
TRISIO %00001100 'seems to put I/O in properly.
Why do some of the outputs move from hi to low when another output is told to go high and then back to low? It is almost like they are being re-written to go low...and there is no programming for this to be happening...can someone please make a recommendaion to how they feel this should be initialized? I have been chasing this for 4 days now, and I am missing something.
I previously built a device to monitor a single input, status being a contact open or closed. Each status change would blink an led, only once. EX: contact closed, LED A blinks once...contact open, LED B blinks once. This loop continued forever. But now insted of a 12vdc hardwired system, I am going to a coin battery 3v system. I also went to the 12F683 instead of the 16F84A. Here is the issue: I cannot get the inputs GPIO.0, 1, 4, 5 to stay outputs,,,,,and the GPIO.2 & 3 to stay inputs. I would like to have 2 inputs and 4 outputs. This way I can monitor 2 separate contact status positions, using a total of 4 LED indicators. They need to operate independently from one another.
TRISIO %00001100 'seems to put I/O in properly.
Why do some of the outputs move from hi to low when another output is told to go high and then back to low? It is almost like they are being re-written to go low...and there is no programming for this to be happening...can someone please make a recommendaion to how they feel this should be initialized? I have been chasing this for 4 days now, and I am missing something.
Last edited: