Skip to content

Commit

Permalink
Initial first blinky lights test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucretia committed Nov 27, 2016
1 parent 1b412be commit 593b6fb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/led_shifter.adb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
with AVR; use AVR;
with AVR.MCU;
with AVR.Real_Time.Clock;

procedure LED_Shifter is
begin
-- Set the Digital pins 0 and 13 as output.
MCU.DDRD_Bits (MCU.DDD0_Bit) := DD_Output;
MCU.DDRB_Bits (MCU.DDD5_Bit) := DD_Output;

-- Turn on the LED on pin 0 and the LED on pin 13 off.
MCU.PORTD_Bits (MCU.PORTD0_Bit) := High;
MCU.PORTB_Bits (MCU.PORTB5_Bit) := Low;

delay 1.0;

-- Switch the LEDs.
MCU.PORTD_Bits (MCU.PORTD0_Bit) := Low;
MCU.PORTB_Bits (MCU.PORTB5_Bit) := High;

delay 2.0;

-- Switch the LEDs.
MCU.PORTD_Bits (MCU.PORTD0_Bit) := High;
MCU.PORTB_Bits (MCU.PORTB5_Bit) := Low;

delay 1.0;

-- Switch the LEDs.
MCU.PORTD_Bits (MCU.PORTD0_Bit) := Low;
MCU.PORTB_Bits (MCU.PORTB5_Bit) := High;
end LED_Shifter;

0 comments on commit 593b6fb

Please sign in to comment.