akter
Newbie level 2
- Joined
- Aug 18, 2014
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 11
i m new in microcontroller, please help me,
i want to add another condition like this
if PortA=0x0F for 20 Seconds then Portd.f1=0;
otherwise everything will remain same.
please any one help me.
i want to add another condition like this
if PortA=0x0F for 20 Seconds then Portd.f1=0;
otherwise everything will remain same.
please any one help me.
Code C++ - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 void main() { CMCON = 0x07; ADCON1 = 0x06; TRISA = 0x0F; // input PORTA = 0x00; TRISD = 0x80; // output PORTD = 0x00; do { if(PORTA == 0x0F) { PORTD.F1 = 1; } else if(PORTA == 0x00) { PORTD.F1 = 0; } } while(1); // Endless loop }
Last edited by a moderator: