hello,
i am try to code switching code which work some thing like this
when code start pin 1 on and pin 2 off
and continuously check if pin 3 off than
pin 1,2 off
else
if last time pin 1 on than do this
pin 1 off and pin 2 on
if last time pin 2 on than do this
pin 1 on pin 2 off
i try following code;
pic switching code does not work as i want.
i am try to code switching code which work some thing like this
when code start pin 1 on and pin 2 off
and continuously check if pin 3 off than
pin 1,2 off
else
if last time pin 1 on than do this
pin 1 off and pin 2 on
if last time pin 2 on than do this
pin 1 on pin 2 off
i try following code;
Code (C):
- int a = 0;
- void main() {
- TRISA.F0 = 0; //pin1
- TRISA.F1 = 0; //pin2
- TRISA.F2 = 1; // input pin
- PORTA.F0 = 1;...