STK200 Starter Kit
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.
9.1.1
Using 8-Pin Devices
with LEDs
The port pins on the AT90S2323 and other 8-pin parts are not connected to the correctly
labeled LEDs due to layout constraints. The actual connections are shown in the table
below:
9.2
Configuring
Switches and
LEDs
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
;load immediate into temp storage register
out DDRB,r16
;PORTB (LED’s) is all outputs
ldi r16,$00
;load immediate into temp storage register
out PORTB,r16 ;switch all the LEDs on
out DDRD,r16
;set direction register to zeros for input
9.3
Using External
Connections
All the ports are brought out to headers on the edge of the board but there are differ-
ences for different sockets which are described separately. Port B has current limit
resistors for programming on Pin 7, Pin 6 and Pin 5 MOSI, MISO and SCK. These port
pins will only supply a reduced current if used as outputs—300 micro Amps @ 3.3V and
500 micro Amps @ 5V. As inputs, they will behave normally. Therefore, any user circuit
should use Port B for inputs.
Processor Pin
LED Label
Socket Pin Number
PB0
PB5
5
PB1
PB6
6
PB2
PB7
7
PB3
PB3
2
PB4
PB4
3
Summary of Contents for STK200
Page 4: ...Table of Contents iv...
Page 6: ...Introduction 1 2 STK200 Starter Kit...
Page 8: ...Getting Started 2 2 STK200 Starter Kit...
Page 10: ...Connecting the Hardware 3 2 STK200 Starter Kit...
Page 14: ...Installing the Software 5 2 STK200 Starter Kit...
Page 22: ...How to use the Software 6 8 STK200 Starter Kit...
Page 26: ...Brown Out Detector 8 2 STK200 Starter Kit...
Page 36: ...Technical Support 11 2 STK200 Starter Kit...
Page 38: ...Appendix II Warranty Statement 12 2 STK200 Starter Kit...
Page 39: ...Appendix II Warranty Statement STK200 Starter Kit 12 3...