Hallo
Wenn im Programm keine LED angesteuert wird, blinkt automatisch die SL5 als Anzeige, dass der RP6 noch eingeschaltet ist. Das kann man in der Lib deaktivieren, wenn es stören sollte:
(Aus der Timer0-Comp-ISR in RP6RobotBaseLib.c)Code:// Power on LED flashing: #ifdef POWER_ON_WARNING if(leds_on < 3) { if(leds_on == 2) { if(!statusLEDs.byte) { if(leds_on_timer++ % 200 == 0) { if(leds_on_timer > POWER_ON_SHOW_TIME) { DDRB &= ~SL5; PORTB &= ~SL5; leds_on = 0; leds_on_timer = 0; } else { DDRB ^= SL5; PORTB ^= SL5; } } } else { if(!statusLEDs.LED5) { DDRB &= ~SL5; PORTB &= ~SL5; } leds_on_timer = 0; leds_on = 1; } } else if(leds_on_timer > POWER_ON_WAIT_TIME) { if(leds_on == 1) { leds_on = 0; if(!statusLEDs.LED5) { DDRB &= ~SL5; PORTB &= ~SL5; } } else leds_on = 2; leds_on_timer = 0; } else leds_on_timer++; } #endif
Das Blinken kann man in der Datei RP6Config.h einstellen (so ist es ausgeschaltet):
(Aus der Datei RP6Config.h)Code:// Power on warning: /** * If you don't need the flashing LED that shows that the Robot is still turned * on - outcomment this line and the code will not be compiled anymore * (saves some programspace and execution time): */ //#define POWER_ON_WARNING //#define POWER_ON_WAIT_TIME 12000 //#define POWER_ON_SHOW_TIME 4000
SDA und SCL sind die I2C-Pins. Um diese Pins auch ohne Ansteuerung auf einen definierten Pegel zu bringen (wichtig für das I2C-Protokoll!) sind beide über je einen PullUp-Widerstand (R32+33, je 4k7) mit Vcc verbunden. Deshalb haben die Pins auch ohne Ansteuerung durch das Programm high-Pegel.
Gruß
mic







Zitieren

Lesezeichen