siddanagouda
Newbie level 6
- Joined
- Oct 2, 2014
- Messages
- 12
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Location
- hubli
- Activity points
- 81
THE OCCURED LIKE THIS AS GIVEN BELOW
MY PROGRAM IS:Robit.c
--ERROR:CAN'T EXCECUTE 'BIN40\ARMCC'
MY PROGRAM IS:Robit.c
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 39 #include void main(void) { unsigned int k, h; DDRA=0x00; DDRD=0XFF; while (1) { k =~PINA; h=k & 0x0F; switch (h) case 0x02: //if I/P is 0x02 { PORTD=0x89;//O/P 0x89 ie Forward break; } case 0x08: //if I/P is 0x08 { PORTD=0x86; //O/P 0x86 ie Backward break; } case 0x04: { PORTD=0x85; // Left turn break; case 0x06: { PORTD=0x8A; // Right turn break; } case 0x05: { PORTD=0x00; // Stop break; } } } }
Last edited by a moderator: