Hab noch ANSEL im Code hinzugefügt:
Hat aber nichts gebracht, die erste LED flackert nur ganz schwach.Code:#include <pic.h> void delay10( char n); void main( void) { ANSEL = 0; ANSELH = 0; TRISC = 0; while(1) { PORTC = 1; delay10(10); PORTC = 2; delay10(10); PORTC = 4; delay10(10); PORTC = 8; delay10(10); } } void delay10( char n) { char i; OPTION = 7; do { TMR0 = 0; /* 256 microsec * 39 = 10 ms */ while ( TMR0 != 39) ; } while ( --n > 0); }![]()
Lesezeichen