READDING A VALUE ON A PORT
Posted: Tue Mar 27, 2007 1:15 pm
Helo Benj,
I'm having a bit of a problem with reading the state of a pin on a port.
I'm outputing a value 1 to port D7 that lights an LED and than I want to read the state of D7. I used an input Icon and stote the value into a variable "ash" next I used an decision Icon to check the variable and than decide what to do.
When I run the program in flowcode it simulates ok, but when I run it in my simulator it make D7 as an input and switches OFF the LED. It's obvious that pin D7 become an input!! I than inserted an output icon and made D7 1 again to light the LED this works in flowcode but not in the simulator.
What am I doing wrong?
How can I read tge state of a Port Pin if it's high or low with flowcode.
Thanks
Pinto
I'm having a bit of a problem with reading the state of a pin on a port.
I'm outputing a value 1 to port D7 that lights an LED and than I want to read the state of D7. I used an input Icon and stote the value into a variable "ash" next I used an decision Icon to check the variable and than decide what to do.
When I run the program in flowcode it simulates ok, but when I run it in my simulator it make D7 as an input and switches OFF the LED. It's obvious that pin D7 become an input!! I than inserted an output icon and made D7 1 again to light the LED this works in flowcode but not in the simulator.
What am I doing wrong?
How can I read tge state of a Port Pin if it's high or low with flowcode.
Thanks
Pinto