Hello,
I'm trying to play with my pic and active some outputs with a switch, but it does not work... I do not see what I am doing wrnog here... can someone help me to figure it out ? it must be something silly ?! (using a pic18F4331)
Code:TRISA = %00000001 TRISB = %00000000 TRISC = %00000000 TRISD = %00000000 TRISE = %00000000 '-> I/O Symbols Symbol switch PORTA.0 'IN Symbol led1 PORTB.5 'OUT Symbol led2 PORTB.4 'OUT Symbol led3 PORTB.3 'OUT Symbol led4 PORTB.2 'OUT Symbol led5 PORTB.1 'OUT Symbol led6 PORTB.0 'OUT Symbol led7 PORTD.7 'OUT Symbol led8 PORTD.6 'OUT Symbol led9 PORTD.5 'OUT Symbol led10 PORTD.4 'OUT Symbol led11 PORTC.7 'OUT Symbol led12 PORTC.6 'OUT Low led1 Low led2 Low led3 Low led4 Low led5 Low led6 Low led7 Low led8 Low led9 Low led10 Low led11 Low led12 GoTo Main Main: If switch = 1 Then High led7 Else Low led7 EndIf GoTo Main
Bookmarks