You are on page 1of 26

MICROCONTROLLER BOARDS

AVR Evaluation Board

Contents
Contents ...................................................................................................................................................... 2
CHAPTER 1: Introduction ............................................................................................................................ 3
1.1 WELCOME.......................................................................................................................................... 3
1.2 AVR EVALUATION BOARD FEATURES ................................................................................................ 3
1.3 AVR EVALUATION HARDWARE.......................................................................................................... 4
1.4 SAMPLE DEVICES ............................................................................................................................... 5
One FLASH device is included. The device types may change, but will generally include ATMEGA 40pin DIP devices. ....................................................................................................................................... 5
1.5 SAMPLE PROGRAMS.......................................................................................................................... 5
1.6 AVR EVALUATION BOARD LAYOUT ................................................................................................... 5
CHAPTER 2: Hardware Details .................................................................................................................... 6
2.1 SOCKETS ............................................................................................................................................ 6
2.2 CONFIG-I SWITCH .................................................................................................................................. 6
2.3 POWER SUPPLY ..................................................................................................................................... 7
CHAPTER 3: Installation Notes .................................................................................................................... 7
3.1 INSTALLING CODEVISIONAVR COMPILER ......................................................................................... 7
3.2 CREATING A NEW PROJECT IN CODEVISIONAVR ............................................................................ 11
3.3 OPEN AN EXISTING PROJECT ........................................................................................................... 16
3.5 PROGRAMMING THE ICS ................................................................................................................. 18
3.6 RUNNING THE PROGRAM ............................................................................................................... 19
3.7 POSSIBLE ERRORS ............................................................................................................................ 19
CHAPTER 4: Example Programs and Connections .................................................................................... 21
CHAPTER 5: Setting up HyperTerminal ..................................................................................................... 23

Join the Technical Community Today!


http://www.pantechsolutions.net

CHAPTER 1: Introduction
1.1 Introsuction
The AVR Evaluation Board can be used as a stand-alone board built with an in-circuit
USB programmer. Sample programs are provided to demonstrate the unique features of
the supported devices.

The AVR Evaluation Board Kit comes with the following:


1. AVR Evaluation Board
2. Sample devices (ATMEGA8535 or ATMEGA16)
3. CD-ROM, which contains:
a) Sample programs
b) AVR Evaluation Board Users Guide

Note: If you are missing any part of the kit, please contact our support executive

1.2 AVR EVALUATION BOARD FEATURES


The AVR EVALUATION board has the following hardware features:
1. 40-pin IC base socket.
2. +5V regulators for direct input from 9V, 500 mA AC/DC wall adapter
3. RS-232 socket and associated hardware for RS-232 interface.

Join the Technical Community Today!


http://www.pantechsolutions.net

4. ICSP Parallel Port Programmer with busy LED indication


5. One 5 K pot for devices with analog inputs.
6. Four push button switches for external interrupts and Reset.
7. Red power-on indicator LED.
8. Four 10 Pin FRC port termination
9. A 16 MHz crystal oscillator.
10. One 8 way Configuration DIP switch for multiple operation
11. Option to get power from USB Port

1.3 AVR EVALUATION HARDWARE

Join the Technical Community Today!


http://www.pantechsolutions.net

1.4 SAMPLE DEVICES


One FLASH device is included. The device types may change, but will generally include
ATMEGA 40-pin DIP devices.

1.5 SAMPLE PROGRAMS


The AVR EVALUATION Kit includes a CD-ROM with sample programs. These programs
may be used with the included sample devices. For each type of device (ATMEGA8535,
ATMEGA16), demo source code with compiled Hex file is provided.

1.6 AVR EVALUATION BOARD LAYOUT

Join the Technical Community Today!


http://www.pantechsolutions.net

CHAPTER 2: Hardware Details


2.1 SOCKETS
40 Pin ZIF socket is provided for the processor. So the Microcontroller can be removed
from the board easily. Mainly this socket is intended to use our development board as
programmer to program other ICs.
10 pin FRC box type connectors: Four Connectors can be found in AVR Evaluation board.
A 10 pin FRC cable is used to make connection with external circuits. The connection is
described as following,

Pins 1-8 are Data Pins. Pin 9 is VDD and the Pin 10 is GND. All 10 Pin FRC connectors will
follow the same rule.

2.2 Config-I Switch


SW5: 8 way Multifunctional switch for peripherals

Join the Technical Community Today!


http://www.pantechsolutions.net

DIP SWITCH PIN

DESCRIPTION

PROG

First 5 pins from left to right are used to program the IC.
Turning ON these pins permanently will not affect the function of the
microcontroller

RX, TX

RS232 receive and transmit pins. Turn ON these pins when doing RS232
communication

NC

No connection

2.3 POWER SUPPLY


The external power can be AC or DC, with a voltage (9V, 1A output). The AVR
board produces +5V using an LM7805 voltage regulator, which provides supply to the
peripherals. Alternatively we can supply the power (+5V) from PC via USB cable.

Power supply is controlled through slide switch JP1.

CHAPTER 3: Installation Notes


3.1 INSTALLING CODEVISIONAVR COMPILER
Join the Technical Community Today!
http://www.pantechsolutions.net

1. Open up the user CD comes with AVR Microcontroller Board, Navigate to


CodeVision Folder
2. Double Click Setup.exe and Choose English and Click-> OK.

3. Click->Next

Join the Technical Community Today!


http://www.pantechsolutions.net

4. Select Destination Location: Click-> Next. (Or browse to another directory as you
wish).

5. Select Start Menu Folder: Click->Next. (Change the name if you wish).

Join the Technical Community Today!


http://www.pantechsolutions.net

6. Ready to Install: Click-> Install.

7. Click-> Finish

Join the Technical Community Today!


http://www.pantechsolutions.net

3.2 CREATING A NEW PROJECT IN CODEVISIONAVR


1. Double Click the CodeVisionAVR icon from desktop
2. Select File->New.
3. Check Project and Click-> OK.

4. Confirm: Click No

5. File Name: Give your own Project Name and Click Save.

Join the Technical Community Today!


http://www.pantechsolutions.net

6. Configure Project Wizard (Very Important while Creating Project)

7. If you already have a source code file, then Click Add. Select the file and Click
open.

Join the Technical Community Today!


http://www.pantechsolutions.net

Else just skip this step and proceed to step8.


8. Click C Compiler Tab: Select the Chip ATMEGA8535. Enter 16.000000 MHz in
Clock Text box.

9. Click After Build Tab: Tick the Program the Chip check box. You can see the
following window. From the
window uncheck Preserve EEPROM or Press r. Click OK.

Join the Technical Community Today!


http://www.pantechsolutions.net

10.Create New C file, write source code and add this file to project (step 6 and 7).

Join the Technical Community Today!


http://www.pantechsolutions.net

11.Now the Project will look like the following. Click Compile the project. Here I
added an existing LED.C file to the project Proceed to 3.4. programmer settings.

Join the Technical Community Today!


http://www.pantechsolutions.net

3.3 OPEN AN EXISTING PROJECT


1.
2.
3.

4.

5.

Double Click the CodeVisionAVR icon from desktop


Select FileOpen
Navigate to the Existing projects directory; select the project and Click Open.

Ensure your device atmega8535 and clock 16Mhz is selected in Project


Configure C compiler
Follow the settings for programmer.

Join the Technical Community Today!


http://www.pantechsolutions.net

3.4 SETTING UP THE PROGRAMMER FOR AVR EVALUATION


BOARD
1. First attach the AVR Microcontroller Evaluation Board with PC via Programmer
Cable.
2. Connect the 9V AC/DC Adapter with Evaluation Board or Give the supply via USB
cable.
3. Turn ON all the five PROG pins of CONFIG switch
4. Turn ON all the pins of ICSP DIP switch SW3.
5. Turn ON the Power.
6. Select Settings Programmer

7. Select Kanda Systems STK200+/300 and LPT1. (Choose the port that you have
connected the Kit with PC).
8. Click OK.

Join the Technical Community Today!


http://www.pantechsolutions.net

9. These settings are the default settings for all the examples provided with ATMEGA
Board.

3.5 PROGRAMMING THE ICS


1. Turn ON all the five PROG pins of CONFIG Switch
2. Create a project or open an existing project (see 3.2 or 3.3)
3. Build the project, now it will ask for programming the IC.

Join the Technical Community Today!


http://www.pantechsolutions.net

4. Click Program the chip

3.6 RUNNING THE PROGRAM


The Program will be started to run immediately after programming (burning) the
IC successfully. If not just press the reset switch once.

3.7 POSSIBLE ERRORS

Error 1: "Power supply on". If it does, follow the instructions below,

a) Ensure the CONFIG-II pin PROG is turned ON.


b) Ensure all the pins of ICSP DIP switch SW3 are turned ON.
c) Measure the voltage between VDD and GND pins of microcontroller. It should be ~5V

Error 2: "Settings | Programmer" error, If it does, follow the instructions below

Join the Technical Community Today!


http://www.pantechsolutions.net

a) Ensure you selected Kanda Systems STK200+/300 in SettingsProgrammer menu.


b) Ensure Printer Port is correctly configured. I.e. if you connected the programmer
cable in LPT2 But you have chosen LPT1 in settings, the port should be changed from
LPT1 to LPT2.

Error 3: CVAVR may throw "Verified Failed" error, due to the following

a) The AVR microcontroller is not properly placed in ZIF jacket.


b) Faulty microcontroller device, Replace it with new one.
If the error still retains check your windows firewall or antivirus software to allow
CodeVisionAVR, and do the following

4. Check the programmer cable

E.g. LPT25s pin 5 is connected with pin 1 of DB9 connector etc.

5. Replace the IC 74LS541 with 74HC541 or with new 74LS541.

Join the Technical Community Today!


http://www.pantechsolutions.net

CHAPTER 4: EXAMPLE PROGRAMS AND CONNECTIONS


4.1 ADC
HARDWARER PINOUT

CONNECTIONS

OUTPUT

Burn the ADC program into


CH0(POT)

PORTA.0

Digital Values of all the POT channel will

micro-controller.

be displayed in HyperTerminal

Connect Serial cable etween


USART Section in the Board and
PC.

Adjust the POT ADC i/P R17 to see the


changes

4.2 INTERRUPTS
HARDWARE PIN
OUT

INT0

PORTD.2

INT1

PORTD.3

INT2

PORTB.2

CONNECTIONS
Connect Serial cable between
USART
Section in the Board and PC.

OUTPUT
Press INT0, INT1 and INT2 Push
but-ton switches SW2, SW3 and
SW4
The
MessageINTxDetected...will
be displayed.
In INTx, x is 0 or 1 or 2.

4.3 USART

Join the Technical Community Today!


http://www.pantechsolutions.net

HARDWARE PIN OUT

RX

PORTD.0

CONNECTIONS

Turn ON RX, TX pins of CONFIG Switch


Connect Serial cable between USART Section in
the Board and PC. Open HyperTerminal

TX

PORTD.1

OUTPUT

Press RESET Once (If Necessary)

Type a character, Hello


World string will be returned from Board.

4.4 USART with PRINTF

HARDWARE PIN OUT

RXD

PORTD.0

CONNECTIONS

Turn ON RX, TX pins of CONFIG Switch


Connect Serial cable between USART Section
in the Board and PC. Open HyperTerminal
Press RESET Once (If Necessary)

TXD

OUTPUT

Type a character. The string


Hello World with PRINTF
will be displayed.

PORTD.1

Join the Technical Community Today!


http://www.pantechsolutions.net

CHAPTER 5: Setting up HyperTerminal


HyperTerminal is automatically installed under Programs Accessories,
1. Click Start Programs Accessories Communications HyperTerminal
Enter Name (e.g. Com1_9600) and choose any one ICON

2. Click the drop-down arrow by Connect Using COM1 Click OK

Join the Technical Community Today!


http://www.pantechsolutions.net

3. COM1 Properties, Port Settings

Bits per Second: select 9600 (or desired baud rate)


Data Bits: select 8
Parity: select None
Stop Bits: select 1
Flow Control: select none
Click OK
4. Now you get the HyperTerminal window.

Join the Technical Community Today!


http://www.pantechsolutions.net

Did you enjoy the read?


Pantech solutions creates information packed
technical documents like this one every month. And our
website is a rich and trusted resource used by a vibrant
online community of more than 1, 00,000 members from
organization of all shapes and sizes.

Join the Technical Community Today!


http://www.pantechsolutions.net

What do we sell?
Our products range from Various Microcontroller
development boards, DSP Boards, FPGA/CPLD boards,
Communication Kits, Power electronics, Basic electronics,
Robotics, Sensors, Electronic components and much more .
Our goal is to make finding the parts and information you
need easier and affordable so you can create awesome
projects and training from Basic to Cutting edge
technology.

Join the Technical Community Today!


http://www.pantechsolutions.net

You might also like