megaAVR™ Starter Kit Manual
9-1
Section 9
Board Applications
9.1
Using Switches
and LEDs
The LEDs are connected through a 1K resistor network to Port B.
The switches are connected to Port D.
The switches and LEDs can be disconnected, if required. To use them, ensure that the
jumpers labeled “Port B” and “Port D” are closed. The board is also marked with the port
pin connection for each switch and LED.
The ports must be correctly set in software as input or output. This is accomplished by
setting the direction control registers to 0 for input and 1 for output. Typical set-up code
would be:
ldi r16,$ff
;move immediate into temporary store register
out DDRB,r16 ;set direction register to ones for output -
LEDs
out PORTB,r16 ;switch all the LEDs on
ldi r16,$00
;move immediate into temporary store register
out DDRD,r16 ;set direction register to zeros for input
Switches
9.2
Using External
Connections
All the ports are brought out to headers on the edge of the board. In addition to the port
pins, each header has a connection for ground and V
CC
to supply external circuits. Note
this voltage, V
CC
, will be either 3.3V or 5V depending on the setting of jumper 1, JP1,
and the brown-out detector will operate.
Note:
If your circuit is to draw significant current (>150 mA) then a heat sink will be
required on the on-board regulator—LM317. This device is rated at 1.5 amps
but it does need a heat sink to supply this current. If your circuit will draw more
than 1 amp, you may need a separate power supply. The ports on the device
are connected to the headers marked Port A, Port B, Port C, Port D, Port E and
Analog, Port F. The layout of all the headers is the same and is shown in the fol-
lowing diagram.
Summary of Contents for megaAVR
Page 4: ...Introduction 1 2 megaAVR Starter Kit Manual ...
Page 6: ...Getting Started 2 2 megaAVR Starter Kit Manual ...
Page 8: ...Connecting the System 3 2 megaAVR Starter Kit Manual ...
Page 12: ...Installing the Software 5 2 megaAVR Starter Kit Manual ...
Page 14: ...How to Use the Software 6 2 megaAVR Starter Kit Manual ...
Page 18: ...Brown Out Detector 8 2 megaAVR Starter Kit Manual ...
Page 26: ...Board Applications megaAVR Starter Kit Manual 9 8 ...
Page 27: ...Board Applications 9 9 megaAVR Starter Kit Manual ...