Wednesday, February 1, 2012

STK 200: Basic Layout Guide

The Kanda STK 200 has a lot of really cool features. But when I first got the board, I didn't even know where to begin. This post goes over the board's basic layout and the main features that it includes.

I/O: Really, the core function of a microcontroller is Input/Output. In fact, out of the ATmega32's 40 pins, 32 pins are set aside for I/O. They are organized into four 8-pin ports named PORTA, PORTB, PORTC, and PORTD. The STK 200 makes it really easy to access these ports by giving them each headers. The board even labels the headers using the standard naming convention established by the AVR family (PORTA, etc.). Each header includes it's own VCC and GND, which devices almost always require. LEDs and switches are probably the most common form of I/O; conveniently, the STK 200 has 8 LEDs and 8 switches built into the board. You can dedicate ports to the LEDs, the switches or both using a 10-pin ribbon cable provided with the board and pictured below. PORTB is lined up with the LED input header and PORTD is lined up with the switches output header for an easy connection.
STK 200: I/O

Programming: The STK 200 is shipped with a USB programming device, called an ISP (In-System Programmer). It attaches to the board via a 10-pin header outlined in the picture below.
STK 200: Programming

LCD/USART: The board makes it really easy to set up serial communication with a computer and also to display output on an LCD screen. In general, I call serial communication USART which stands for Universal Synchronous-Asynchronous Receiver/Transmitter. This is a fancy acronym which refers to a standard way that devices communicate. The board has a RS-232 port which facilitates USART communication. RS-232 used to be a standard port on computers but they are not so common today. I bought an RS-232 to USB cable which basically turns one of the USB ports on my laptop into a simulated RS-232 port. For LCD screens, the STK 200 has 11 I/O pins plus a VCC and GND dedicated to driving a display. The LCD screen I bought was shaped in a way that it would not sit flat on the board's pins. To counteract that, I bought headers to "raise" the pins over the rest of the board. You can find similar headers from most electronic parts websites such as Jameco, Digi-Key or SparkFun. There is one thing you should be careful of, however. There is an LCD Disable jumper which I outlined below (middle red box). If this jumper is shorted, the LCD pins simply do not work. I spent quite few hours pulling my hair out before I discovered that. The LCD screen shown in the picture is a 16 character by 2 line display which I used with the board.
STK 200: LCD/USART

Power: I had to purchase a 9V power supply for my STK 200. It uses the standard 2.2 mm DC input jack. There is also an ON/OFF switch so you don't have to pull out the power supply to turn the board off. When the board is turned on, a power indicator LED, outlined in red below, lights up.
STK 200: Power

Microcontroller Sockets:  I went over these in detail in a previous post (link). I typically use the 40-pin ATmega32, which you can see in the picture.
STK 200: Microcontroller Sockets

Note that this is not a comprehensive guide. But this includes the main features you will encounter in an introductory lab or class.

No comments:

Post a Comment