Feb 6, 2013 #1 D Don_dody Full Member level 1 Joined Nov 4, 2012 Messages 96 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,288 Location Indonesia Visit site Activity points 1,921 I've built a simple code (AVR) that contain 12 push buttons. I'm planning to replace all of them with TV Remote so that they can be accessed using one Remote control only. Well, is this possible? (12 buttons) This is my code: 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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 #include <mega8535.h> #include <stdio.h> void main() { PORTA=0xFF; DDRA=0x00; PORTB=0xFF; DDRB=0x00; PORTC=0x00; DDRC=0xFF; PORTD=0x00; DDRD=0xFF; while(1) { if(PINA.0==0) { PORTC.0 = 1; } if(PINA.1==0) { PORTC.1 = 1; } if(PINA.2==0) { PORTC.2 = 1; } if(PINA.3==0) { PORTC.3 = 1; } if(PINA.4==0) { PORTC.4 = 1; } if(PINA.5==0) { PORTC.5 = 1; } if(PINA.6==0) { PORTC.6 = 1; } if(PINA.7==0) { PORTC.7 = 1; } if(PINB.0==0) { PORTD.0 = 1; } if(PINB.1==0) { PORTD.1 = 1; } if(PINB.2==0) { PORTD.2 = 1; } if(PINB.3==0) { PORTD.3 = 1; } } } Now I want to replace all that buttons by the Remote's buttons. Can somebody help me?
I've built a simple code (AVR) that contain 12 push buttons. I'm planning to replace all of them with TV Remote so that they can be accessed using one Remote control only. Well, is this possible? (12 buttons) This is my code: 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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 #include <mega8535.h> #include <stdio.h> void main() { PORTA=0xFF; DDRA=0x00; PORTB=0xFF; DDRB=0x00; PORTC=0x00; DDRC=0xFF; PORTD=0x00; DDRD=0xFF; while(1) { if(PINA.0==0) { PORTC.0 = 1; } if(PINA.1==0) { PORTC.1 = 1; } if(PINA.2==0) { PORTC.2 = 1; } if(PINA.3==0) { PORTC.3 = 1; } if(PINA.4==0) { PORTC.4 = 1; } if(PINA.5==0) { PORTC.5 = 1; } if(PINA.6==0) { PORTC.6 = 1; } if(PINA.7==0) { PORTC.7 = 1; } if(PINB.0==0) { PORTD.0 = 1; } if(PINB.1==0) { PORTD.1 = 1; } if(PINB.2==0) { PORTD.2 = 1; } if(PINB.3==0) { PORTD.3 = 1; } } } Now I want to replace all that buttons by the Remote's buttons. Can somebody help me?