Testing the shift register. Flashing status led and shift register pins 0, 1 and 7 in sequence.
This commit is contained in:
parent
bee4bf5c46
commit
d863aaad39
1 changed files with 12 additions and 2 deletions
|
@ -20,17 +20,27 @@ void flashStatusLed()
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
setupStatusLed();
|
setupStatusLed();
|
||||||
|
|
||||||
LcdShiftReg lcdShiftReg;
|
LcdShiftReg lcdShiftReg;
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
flashStatusLed();
|
flashStatusLed();
|
||||||
_delay_ms(400);
|
_delay_ms(400);
|
||||||
|
|
||||||
lcdShiftReg.set(1);
|
lcdShiftReg.set(1);
|
||||||
_delay_ms(100);
|
_delay_ms(100);
|
||||||
lcdShiftReg.set(0);
|
lcdShiftReg.set(0);
|
||||||
_delay_ms(400);
|
_delay_ms(400);
|
||||||
|
|
||||||
|
lcdShiftReg.set(1 << 1);
|
||||||
|
_delay_ms(100);
|
||||||
|
lcdShiftReg.set(0);
|
||||||
|
_delay_ms(400);
|
||||||
|
|
||||||
|
lcdShiftReg.set(1 << 7);
|
||||||
|
_delay_ms(100);
|
||||||
|
lcdShiftReg.set(0);
|
||||||
|
_delay_ms(400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue