Hi
I am new to micro controllers I am using ATMega 32, I want to achieve the following Conditions,how to write the programme in WinAVR Programmers Notepad Using C/C++ .
PinB0 as Input
PinB1 as output
PinB2 as Input
1) if B0 is 1 and PinB2 is 1 then PinB1 should be 0
2) If B0 is 0 and PinB2 is 1 then Pin B1 should be 0
3) if B0 is 0 and PinB2 is 0 then Pin B1 should be 0
4) if B0 is 1 and pinB2 is 0 then Pin B1 should be 1
Noe: 1.Input at Pin B0 will appear for a short time when Push Button is pressed momentarily
2. Input at Pin B2 will be continuous or short time depending upon the source for this signal.
I am new to micro controllers I am using ATMega 32, I want to achieve the following Conditions,how to write the programme in WinAVR Programmers Notepad Using C/C++ .
PinB0 as Input
PinB1 as output
PinB2 as Input
1) if B0 is 1 and PinB2 is 1 then PinB1 should be 0
2) If B0 is 0 and PinB2 is 1 then Pin B1 should be 0
3) if B0 is 0 and PinB2 is 0 then Pin B1 should be 0
4) if B0 is 1 and pinB2 is 0 then Pin B1 should be 1
Noe: 1.Input at Pin B0 will appear for a short time when Push Button is pressed momentarily
2. Input at Pin B2 will be continuous or short time depending upon the source for this signal.