+ All Categories
Home > Documents > STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515...

STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515...

Date post: 15-Jun-2019
Category:
Upload: vothuy
View: 219 times
Download: 0 times
Share this document with a friend
13
THE STK200 BOARD OVERVIEW The STK200 board is a training and development platform for AVR microcontrollers. The board features all the ancillary circuits required by the AVR. For learning purposes, the board also features simple input and output pheripherals that can be used to learn the basic principles of embedded system development. A wide variety of extra modules can easily be added – using a mounting system for modular extension boards. Power supply – The board is powered via the USB connection, or by a programming or debugging tool (AVRISP-U, AVR Dragon). It supports either a 3.3 or 5V system. System Clock – The board has an external clock circuit running at 8MHz. Programmer/debugger interface – The board has both 6pin and 10pin ATMEL format ISP connectors. There is also a 10pin ATMEL JTAG connector which can be used with 40pin devices in the 40A socket only (eg ATmega16). USB comms – A USB to UART circuit allows the AVR device to connect to a PC by USB and a virtual COM port. The basis of the modular system are 8 mounting holes, allowing boards to be mounted above the main board on standoffs. Two standard size modules can be mounted side by side, 1 double, or 8 quarter size. Modules can also be stacked several layers high. Electrical connections can be made by various cables, such as 10 way ribbon cables (which can connect an entire I/O port, plus power and GND, to an 8 bit application), 6 way ribbon cables or single wires. Orientation is marked on the board headers when using ribbon cables. The connections are made either between the port headers on the main board and the application headers on the expansion module. Or by using dedicated I2C bus connectors. DEVICE SUPPORT Here is a list of all the AVR devices that are known to be suitable for use with the board. Other AVR devices may work to, provided that their pin-out is suitable – see socket diagrams below and compare with your datasheet. DEVICE PACKAGE SOCKET AT902323 8pin 8D AT90S2343 8pin 8D AT90S1200 20pin 20D AT90S2313 20pin 20D AT90S2333 28pin 28A AT90S4433 28pin 28A AT90S4414 40pin 40D AT90S8515 40pin 40D ATMEGA161 40pin 40D ATMEGA162 40pin 40D AT90S8535 40pin 40A 1 of 13
Transcript
Page 1: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

THE STK200 BOARD

OVERVIEW

The STK200 board is a training and development platform for AVR microcontrollers. The boardfeatures all the ancillary circuits required by the AVR. For learning purposes, the board alsofeatures simple input and output pheripherals that can be used to learn the basic principles ofembedded system development. A wide variety of extra modules can easily be added – using amounting system for modular extension boards.

Power supply – The board is powered via the USB connection, or by a programming ordebugging tool (AVRISP-U, AVR Dragon). It supports either a 3.3 or 5V system.

System Clock – The board has an external clock circuit running at 8MHz.

Programmer/debugger interface – The board has both 6pin and 10pin ATMEL format ISPconnectors. There is also a 10pin ATMEL JTAG connector which can be used with 40pin devices inthe 40A socket only (eg ATmega16).

USB comms – A USB to UART circuit allows the AVR device to connect to a PC by USB and avirtual COM port.

The basis of the modular system are 8 mounting holes, allowing boards to be mounted above themain board on standoffs. Two standard size modules can be mounted side by side, 1 double, or 8quarter size. Modules can also be stacked several layers high.

Electrical connections can be made by various cables, such as 10 way ribbon cables (which canconnect an entire I/O port, plus power and GND, to an 8 bit application), 6 way ribbon cables orsingle wires. Orientation is marked on the board headers when using ribbon cables. Theconnections are made either between the port headers on the main board and the applicationheaders on the expansion module. Or by using dedicated I2C bus connectors.

DEVICE SUPPORT

Here is a list of all the AVR devices that are known to be suitable for use with the board. OtherAVR devices may work to, provided that their pin-out is suitable – see socket diagrams below andcompare with your datasheet.

DEVICE PACKAGE SOCKET

AT902323 8pin 8DAT90S2343 8pin 8DAT90S1200 20pin 20DAT90S2313 20pin 20DAT90S2333 28pin 28AAT90S4433 28pin 28AAT90S4414 40pin 40DAT90S8515 40pin 40DATMEGA161 40pin 40DATMEGA162 40pin 40DAT90S8535 40pin 40A

1 of 13

Page 2: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

ATMEGA16 40pin 40A Supplied fitted in STK200 KitsATMEGA163 40pin 40AATMEGA164 40pin 40AATMEGA168 28pin 28AATMEGA32 40pin 40AATMEGA323 40pin 40AATMEGA324 40pin 40AATMEGA328 28pin 28AATMEGA48 28pin 28AATMEGA644 40pin 40AATMEGA8 28pin 28AATMEGA88 28pin 28AATMEGA8535 40pin 40AATMEGA8515 40pin 40DATTINY12 8pin 8DATTINY13 8pin 8DATTINY2313 20pin 20DATTINY25 8pin 8DATINY26 20pin 20AATINY28 20pin 28AATTINY4313 20pin 20DATTINY45 8pin 8DATTINY85 8pin 8D

All variants eg P, PA, A, V will also fit

2 of 13

Page 3: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

STK200 Board Layout

3 of 13

Page 4: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

POWER AND PROGRAMMER CONNECTIONS

There are three connectors for programmers on the STK200 board. See quick start guide ortutorials for more information about connecting tools to the STK200 board.

10pin ISP . Use this with KANDA programmers such as AVRISP-U. This connector connects to thedevice sockets using a multiplexor chip, to help with switching between programming the AVR andthen running code. Use the "RUN" function in the Kanda software (F9) to run code. The "ISP" LEDlights if the programmer connection is active.

6pin ISP. Use this header with ATMEL AVR Dragon (ISP/Debugwire). It may be necessary todisconnect the programmer when it is time to run the code.

10pin JTAG. Use this when programming 40pin devices in the 40A socket, using a programmerthat supports JTAG such as Kanda AVRUSB or Atmel AVR Dragon. Also use for AVR DRAGONdebugging.

The board can be powered by some programmers (eg AVRISP-U) via a programming connectoror directly via the mini USB conection on the side of the board, using the PC or a USB wall PSU.When Powered by the programmer, VCC is set via the programmer software and VCC jumpershould be ignored.

It is recommended that the power be removed before the device or modules are changed.

The USB connection has a resettable PTC fuse fitted to protect your PC USB port from inadvertantshort circuit etc. This should allow at least 200mA to be drawn by the board and any extra circuitry.Should the fuse "blow" it will reset within a minute or two of the short being removed.

The Power LED will light when the board is powered.

DEVICE ORIENTATION

Before programming a device using the programmer, the device must be inserted correctly into thedevice socket. At one end of the device you will notice a semi circular notch cut out. There is amatching notch on the device sockets. The device should be fitted into the socket so both notchesare at the same end.

Warning: The orientation of the device is vitally important. If you put it in the wrong way and applypower, you may damage the device. Remove the power from the board before inserting orremoving a device, or you may damage it. Do not insert more than one device at a time (Only useone socket at a time) or programming errors may occur, and the devices may be damaged.

4 of 13

Page 5: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

CLOCK CIRCUIT

The board is fitted with an external clock circuit which connects to the the AVR's OSC1 pin. Asstandard it runs at 8MHz. This circuit should allow the device to function regardless of CLKSELfuse bit setting, but the recommended settings are

0000 : External Clockor1111 : External Crystal/Ceramic Resonator Oscillator 3.0 - 8MHz

Note: New AVR microcontrollers have clock fuse set to 1MHz Internal RC and board clock isignored.

Reset SwitchThis switch resets the AVR microcontroller.

USB connection

The micro-USB connector provides a method of powering the board and a USB serial port. Use theUSB cable supplied with STK200 kits. The FTDI USB to serial chip fitted will create a Virtual SerialPort on your PC when USB cable is first connected. Windows will install this and give it the nextfree COM port number.

The serial connection from the FTDI chip is routed to the USART pins on the different sockets.These are PORTD 1:0 on all AVRs with USART.

DEVICE SOCKETS

40 pin Digital socket – Labeled "40D". This accepts AVRs with digital pinout eg ATmega8515,ATmega162. 5 ports are available and are connected to headers PortA, PortB, PortC, PortD andPortE but not all are 8-bit.

40 pin Analog socket – Labeled "40A". This accepts AVRs with analog pinout eg ATmega8535,ATmega16 (default device). 4 8-bit ports are available and are connected to headers PortA, PortB,PortC and PortD.

5 of 13

Page 6: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

28 pin socket – Labeled "28A". Devices with 28-pin Analog footprint eg Atmega328P. Thesedevices have two 8-bit ports RB and RD and 6-bit RC. PortC and PortD are connected to headersPORTC and PORTD but PortB is connected to PORTB(28A) header not normal PORTB header.

20 pin Digital socket – Labeled "20D". For devices with 20-pin digital pin-out, eg ATtiny2313.PortB, PortA and PortD are connected to headers PORTB, PORTA and PORTD accordingly.

6 of 13

Page 7: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

20 pin Analog socket – Labeled "20A". For devices with 20-pin analog pin-out, eg ATtiny261.PortA and PortB are connected to headers PORTA and PORTB(20A/8D) accordingly

8 pin Analog and Digital socket - Labelled "8D". PortB is connected to header,PORTB(20A/8D), not normalPORTB header.

7 of 13

Page 8: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

JUMPERS AND THEIR FUNCTIONSVCC – This jumper selects the VCC voltage. If set to 5V, the board runs direct from the 5V suppliedvia the USB connection. If set to 3.3V the board runs from 3.3V via the onboard regulator.

PB4/CLK – This jumper only effects the 20A socket. It determines whether the AVR's OSC1 pin isconnected to the clock signal or bit 4 of the PORTB(20A/8D) header. The AVR must be configuredto run from its internal clock if PB4 is selected.

PA0/CLK – This jumper only effects the 20D socket. It determines whether the AVR's OSC1 pin isconnected to the clock signal, or bit 0 of the PortA header. The AVR must be configured to runfrom its internal clock if PA0 is selected.

PB6/CLK – This jumper only affects 28A socket. It determines whether the AVR's OSC1 pin isconnected to the clock signal, or bit 6 of the PORTB(28A) header. The AVR must be configured torun from its internal clock if PB6 is selected.

8 of 13

Page 9: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

PB3/CLK – This jumper only affects 8D socket. It determines whether the AVR's OSC1 pin isconnected to the clock signal, or bit 3 of the PORTB(20A/8D) header. The AVR must be configuredto run from its internal clock if PB3 is selected.

BUZZER PD5/PB3 – This jumper selects whether the buzzer is connected to pin PB3 or PD5 ofthe AVR sockets. The buzzer is driven by PWM output. See Buzzer section below.

The buzzer is driven by PWM but which pin has PWM output varies from device to device. Thetable in Buzzer section shows the different timer outputs available on PB3 and PD5 on differentsockets.

Jumper Summary

Jumper Function DefaultVCC Selects VCC (5V or 3.3V) 5V28A(PB6/CLK)

Connects the PORTB6 pin of 20D socketdevice to the clock source orPORTB(28A) header

CLK – pin connected to clocksource

20D(PA0/CLK)

Connects PORTA.0 pin of 20D socket tothe clock source or PORTA header

CLK – pin connected to clocksource

20A(PB4/CLK)

Connects PORTB.4 pin of 20A socket tothe clock source or PORTB(20A/8D)header

CLK – pin connected to clocksource

8D(PB3/CLK)

Connects PORTB.3 of 8D socket to theclock source or PORTB(20A/8D header

CLK – pin connected to clocksource

BUZZER(PD5/PB3)

Connects either the PB3 or PD5 of theAVR device to the BUZZER

PD5

9 of 13

Page 10: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

PORT HEADERS

All the AVR I/O pins are brought out to headers along the board edge. Each header has up to 8 I/Opins as well as a GND and VCC pin, for supplying power to external circuits. LED, LCD andSWITCHES headers have same format.

Port Headers, PORTA, PORTC, PORTD and PORTE are connected to all sockets that have theseports available. But three different port headers are used for PORTB. One for the 40D, 40A and20D sockets, one for 28A and one for 20A and 8D.

PORTA This is a full 8 bit port on 40A, 40D and 28A devices. It is not available on the othersockets. This is ADC port on these AVRs.

PORTB Use this header when the AVR is in the 40D, 40A or 20D socket. This is a full 8 bit port forall these sockets.

PORTB(28A) Use this header when the AVR is in the 28A socket. Only bits 0-5 are available.

PORTB(20A/8D) Use this header when the AVR is in the 20A socket or in the 8D socket. This is afull 8 bit port on the 20A socket, but only bits 0-3 are available on 8pin devices.

PORTC This is a full 8 bit port on 40A and 40D devices. Only bits 0-5 are available on 28A devicesand these are ADC pins. It is not available on 20D, 20A and 8D devices

PORTD This is a full 8 bit port on 40A, 40D and 28A devices. bit 7 is not available on 20D devices.It is not available on 20A and 8D devices.

PORTE Only available when using the 40D socket. Only bits 0-2 are available.

JTAG PinsIf JTAGEN fuse is enabled (default), the JTAG Pins TDO, TDI, TMS and TCK are not available asgeneral I/O. These are PORTC.2 to PORTC.5. Only 40A socket has JTAG bus.

10 of 13

Page 11: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

I2C (TWI) HeaderAn I2C (TWI) header is available so that modules can connected onto the I2C bus in series (Daisychain), on 40A socket. TWI (I2C) is not available or is on different pins on other sockets. The boardhas 4.7K pullups fitted to SDA and SCL. The TXD and RXD UART pins are also available on thisheader on PD0 and PD1 (20D, 28A, 40D, 40A sockets).

Other STK200 Board Features

8 LED's (digital output) – connected to LED header.

8 Switches (digital input) – connected to SWITCHES header

1 Potentiometer (analog input) – connected to ANALOG header.

1 socket for a 24C I2C eeprom memory chip. Connected to the I2C header and bus.

1 Piezoelectic sounder (analog output). Connected to BUZZER jumper to select PWM pin.

LEDs

The 10-way bar LED has these LEDS

• ON – lit when board is powered

• ISP- lit when board is in ISP mode – code will not run when this LED is on

• 0..7 – LEDs to drive from any port. They are Active low. (0=ON 1=OFF). Connected to LEDheader.

Switches

Output is low when pressed. Otherwise output is pulled high by a 10K pullup resistor. Connected toSWITCHES Header.

To connect switches or LEDs to an AVR port, use the 10-way ribbon cables supplied to connectLED and SWITCHES header to any PORT header. Default connection is switches on PORTD andLEDs on PORTB.

LCD

The board has a 14-pin LCD connector for connecting a LCD with a Hitachi driver chip built-in,using a contrast pin voltage of 0 to 5 Volts. The LCD connects like this.

VCC SCL SDAGND RXD TXD

I2C (TWI)• SCL - PC0

• SDA - PC1

UART• RXD - PD0

• TXD - PD1

11 of 13

Page 12: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

This LCD connector has this format.

Connection Name FunctionGND GroundVCC 5V Vcc

CON ContrastRS Register Select – A14R/W Not WriteE Enable0 N/C1 N/C

2 N/C3 N/C4 Data Bit 0/ Data Bit 45 Data Bit 1/ Data Bit 56 Data Bit 2/ Data Bit 67 Data Bit 3/ Data Bit 7

Note that the LCD is connected in 4-bit mode, which only uses 4 data lines. This means that LCDcan be driven from one AVR port. See sample code for how to set 4-bit mode.

This 14-pin LCD connector is connected to a 10-way LCD header, next to Switches and LEDheaders. It has the same layout as the port headers. Connect this to required port header using a10-way ribbon cable.

Analog Pot and Header

12 of 13

Page 13: STK200 Board Manual - avrfreaks.net manual.pdf · 24/07/2017 · ATMEGA8535 40pin 40A ATMEGA8515 40pin 40D ATTINY12 8pin 8D ATTINY13 8pin 8D ATTINY2313 20pin 20D ... This switch resets

The ends of the pot are connected to the AGND and AVCC pins of the ANALOG header. The wiperis connected to POT pin on Analog header. To use the POT to apply an analog voltage, connectPOT pin to any ADC channel pin. Your code must use this pin as ADC channel.

• 20A and 40A socket – ADC0..7 are on PORTA

• 28A socket – ADC0..5 are on PORTC 0:5

• 8D socket – ADC0..3 are on PORTB 2:5

AREFAREF pin is used for Analog comparator. To use POT with Analog Comparator, connect POT pin toAREF pin for devices in 28A and 40A socket as they have separate AREF input. For devices in20A socket, connect POT pin to PA3 pin, as AREF is shared with PA3,

BUZZER

This is a Piezo electric sounder best driven using PWM. It can be connected to either PB3 or PD5of an AVR using the BUZZER jumper. The choice will be depend on which of these pins is useableas an OUTPUT/COMPARE function on the AVR being used. The connection could also be madeusing a wire jumper from the middle pin of the BUZZER Jumper to any desired port pin on the portheader.

Socket Pin PB3 PIN PD5 Timer PWM Output

8D Yes No Not PWM pin20D Yes OC1A

Yes OC0B20A Yes OC1B28A Yes OC2A

Yes OC0B40D Yes Not PWM pin

Yes OC1A40A Yes OC0

Yes OC1A

24C EEPROM SOCKET

A 24C series EEPROM IC can be fitted in this socket. The SCL and SDA lines are connected topins PC0 and PC1 respectively on 40A socket. They are also connected to the I2C header.

13 of 13


Recommended