Professional Documents
Culture Documents
MikroElektronika
Development tools - Books - Compilers
2 in 1
USB 2.0
IN-CIRCUIT
PROGRAMMER
ATMEL
AVR
DEVELOPMENT
BOARD
BigAVR
Users Manual
MikroElektronika
Development
tools
First edition
December 2006
No part of this manual, including the product and software described in it, may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language
in any form or by any means, except documentation kept buy the purchaser for backup purposes, without the express written permission of MikroElektronika company.
Product warranty or service will not be extended if the product is repaired, modified or
altered, unless such repair, modification or alteration is authorized in writing by
MikroElektronika.
MIKROELEKTRONIKA PROVIDE THIS MANUAL AS IS WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
WARRANTIES OR CONDITIONS OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PUROSE.
IN NO EVENT SHALL MIKROELEKTRONIKA, ITS DIRECTORS, OFFICERS, EMPLOYEES OR DISTRIBUTORS BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES(INCLUDING DAMAGES FOR LOSS OF PROFITS, LOSS
OF BUSINESS, LOSS OF USE OR DATA, INTERRUPTION OF BUSINESS AND THE
LIKE) EVEN IF MIKROELEKTRONIKA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES ARISING FROM ANY DEFECT OR ERROR IN THIS MANUAL OR
PRODUCT.
SPECIFICATION AND INFORMATION CONTAINED IN THIS MANUAL ARE FURNISHED
FOR INTERNATIONAL USE ONLY, AND ARE SUBJECT TO CHANGE AT ANY TIME WITHOUT NOTICE, AND SHOULD BE CONSTRUED AS A COMMITMENT BY
MIKROELEKTRONIKA
MikroElektronika assumes no responsibility or liability for any errors or inaccuracies that
may appear in this manual, including the product and software described in it.
Product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies, and are used only for identification or
explanation and to the owners benefit, without intent to infringe.
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
CONTENTS
MikroElektronika
Development
tools
CONTENTS
BigAVR
with USB 2.0 PROGRAMMER
page 4
INTRODUCTION
page 5
page 6
page 6
Jumpers
page 7
MCU sockets
page 8
Power Supply
page 11
page 12
Oscillator
page 14
LEDs
page 15
Pushbutton switches
page 17
Graphic LCD
page 20
page 22
page 24
RS-232 Communication
page 26
page 29
page 30
page 32
page 33
JTAG connector
page 35
page 36
page
MikroElektronika
Development
tools
After these 4 steps, your BigAVR is installed and ready for use. You can try to read a program from the chip or to load an example from the examples folder of mikroElektronikas
compilers for AVR or from the product CD:
CD_Drive:/product/zip/bigavr_examples.zip.
page
BigAVR
with USB 2.0 PROGRAMMER
ATMEL
AVR
DEVELOPMENT
BOARD
INTRODUCTION
The BigAVR development system is a full-featured development board for Atmel AVR
microcontrollers. It has been designed to allow students and engineers to easily exercise and
explore the capabilities of AVR microcontrollers. It allows AVR microcontrollers to be interfaced with external circuits and a broad range of peripheral devices, allowing a user to concentrate on software development.
Figure 1 illustrates the development board. Each component is marked on a silkscreen, both
top and bottom. These marks describe connections to the microcontroller, operation modes,
and provide some useful notes. The need for additional schematics is minimized since all
relevant information is printed on the board.
Figure 1.
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
INTRODUCTION
MikroElektronika
Development
tools
SWITCHES
MikroElektronika
Development
tools
SWITCHES
The BigAVR development board features a number of peripherial devices. In order to
enable these devices before programming, you need to check if appropriate jumpers or
switches have been properly set. Switches are devices that have two positions - ON and
OFF, which have a role to establish or break a connection between two contacts. The
BigAVR development board has four groups of switches.
The first two groups, SW1 and SW2, are used to enable LEDs connected to PORTA,
PORTB, PORTC, PORTD, PORTE, PORTF, PORTG, PORTH, PORTJ, PORTK and
PORTL. Switch SW2 is also used to enable connection between DS1820 temperature sensor and microcontroller PG0 pin and also to enable SPI communication and CS pin for
MMC/SD Card.
The switches of SW4 are used to enable a connection between the microcontroller PORTF
with external pull-up/down resistors. When PORTF pins are used as digital inputs/outputs,
the appropriate pull-up/down resistors should be enabled.
The switches of SW3 are used to enable connection between the microcontroller pins and
both RS232 communication devices. The first four switches are used for RS232-A
communication lines, while the second four are used for RS232-B communication lines.
ON
Group of 8 switches
1 2 3 4 5 6 7 8
Figure 2.
Switch is ON
Switch is OFF
page
BigAVR
with USB 2.0 PROGRAMMER
JUMPERS
Jumpers, like switches, can break or establish a connection between two points. Beneath the
plastic cover of the jumper is a metal contact, which makes a connection when the jumper
is placed between two disconnected pins.
For example, the jumpers J15 and J16 are used to connect or disconnect PS/2 Data and Clk
lines to the PC0 and PC1 pins, respectively. A connection is made when the jumper is placed
between two contacts.
Figure 3.
Jumper as a
switch
Jumper is ON
Jumper is OFF
More often, jumpers are used as a selector between two possible connections using a three
pin connector. As illustrated in Fig. 4, the middle connector can be connected to the left or
right pin, depending on the jumpers position.
Figure 4.
Left line
is selected
Right line
is selected
Jumper as a
multiplexer
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
JUMPERS
MikroElektronika
Development
tools
MCU CARD
MikroElektronika
Development
tools
MCU CARD
The BigAVR development board has a 104-pin MCU Card. If you want to use some other
microcontroller, all you have to do is to change MCU Cards. You can use 64-pin MCUs
(ATmega128 for example) or 100-pin MCUs (ATmega1280 for example). BigAVR MCU
Card is shown on the following picture:
MCU Card
Figure 5.
page
BigAVR
with USB 2.0 PROGRAMMER
When you are placing MCU Card on the BigAVR MCU socket, you must follow these
steps:
Step no.1
If there is already MCU Card
placed on BigAVR, you must
remove it by slowly pulling it up.
Step no.2
Place MCU Card on the board.
Note that label on the MCU Card
must be at the upper-left corner as
it is drawn on the BigAVR board.
Step no.3
When MCU Card is on the place,
push it down by applying the
pressure on all edges at the same
time.
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
MCU CARD
MikroElektronika
Development
tools
MikroElektronika
Development
tools
MCU CARD
Microcontrollers pins are routed to various peripherals as illustrated in Fig. 6. All ports have
direct connections to Direct Port Access connectors. Such connectors are typically used for
connecting external peripherals to the board or for providing useful points for connecting
digital logic probe.
All ports are connected to LEDs, push-button switches and pull-up/down resistors, which
allow easy monitoring and testing of digital pin state .
Some pins are connected to other peripherials such as the DS1820 temperature sensor,
RS-232 communication, LCD, etc.
SW1
PE3
PORTE
VCC
ON
CN5
1 2 3 4 5 6 7 8
PORTE
J12
VCC
J5
PORTE
VCC
VCC
PE3
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
PE3
System connection
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
VCC
X1
10MHz
100n
Reset
10K
Figure 6.
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
C1
22pF
C2
22pF
page
10
BigAVR
with USB 2.0 PROGRAMMER
POWER SUPPLY
POWER SUPPLY
SELECTABLE
As a power supply source, users can select either a regulated supply from the USB cable
(default) or an external power supply. In case of the USB power supply, the system should
be connected to a PC using the USB programming cable, while the jumper J14 should be
set in the right-hand position.
In the case of an external power supply, the BigAVR board produces +5V using an LM7805
voltage regulator. The external power supply can be AC or DC, with a voltage between 8V
and 16V and the jumper J14 should be set in the left-hand position. In Fig. 7 you can see
USB and external power supply connectors.
Figure 8. Power supply select jumper
USB
connector
External power
supply connector
REG1
7805
CN24
USB
EXT
USB
EXT
8-16V (AC/DC)
EXT
Vin
Vout
USB
J14
5V
FP1
5V
GND
2
E1
470uF
C1
100nF
BigAVR
with USB 2.0 PROGRAMMER
C2
100nF
E2
470uF
C3
100nF
VCC
DD+
GND
USB
VCC
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
11
POWER SUPPLY
MikroElektronika
Development
tools
PROGRAMMER
MikroElektronika
Development
tools
Note: There is no need for manually reseting MCU after programming. The programmer
will reset the MCU automatically.
Figure 11.
J20
J21
Figure 12.
J20
J21
page
12
BigAVR
with USB 2.0 PROGRAMMER
There are two different AVR MCU groups. The first one (Default) uses special pins for programming: PDI (PE0 pin), PDO (PE1 pin) and SCK (PB1 pin). The second one uses SPI
communication lines for programming: MOSI (PB2 pin), MISO (PB3 pin) and SCK (PB1
pin).
With jumpers J20 and J21 you can select which pins will be used for programming (acording to the MCU type).
VCC
POWER
1K
VCC
VCC
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
VCC
10K
100n
J20
J21
X1
10MHz
Reset
1K
U3
SWITCH
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
ATmega128
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
AVRFlash
On-Board USB
programmer
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
USB LINK
VCC CN18
1
VCC
2
D3
D+
4
27
GND
27
USB
USB CONN.
C1
22pF
C2
22pF
TO PERIPHERALS
ON DEVELOPMENT BOARD
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
13
MikroElektronika
Development
tools
MikroElektronika
Development
tools
OSCILLATOR
BigAVR development board has on-board oscillator circuit for generating microcontrollers
clock input and also crystal oscillator placed on MCU Card. Within the AVRFlash programmer you can either choose internal RC oscillator, external clock or external crystal. With
jumper J1 (placed on MCU Card) you can choose which clock will be used to drive MCU:
external oscillator or crystal.
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
VCC
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
VCC
VCC
F
OSCILLATOR
R10 1M
B
E
C
D
J1
R11
1K
GND
VCC
C16
22pF
10K
C15
22pF
X2
8MHz
X1
10MHz
C1
22pF
100n
Reset
OSCILLATOR
C2
22pF
External
crystal selected
External
oscillator selected
Figure 15.
Oscillator schematic
page
14
BigAVR
with USB 2.0 PROGRAMMER
LEDs
Light Emitting Diodes (LEDs) are the most commonly used components, usually for displaying pins digital state. BigAVR has 86 LEDs that are connected to the microcontrollers
PORTA, PORTB, PORTC, PORTD, PORTE, PORTF, PORTG, PORTH, PORTJ, PORTK
and PORTL.
Figure 16.
Each group of LEDs can be enabled or disabled using the switches SW1 and SW2. Fig. 17.
illustrates the connection of a LEDs to PORTF of the microcontroller. A resistor is used in
series with the LED to limit the LED's current. In this case the resistor's value is 1K.
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
15
LEDs
MikroElektronika
Development
tools
LEDs
MikroElektronika
Development
tools
The LEDs are enabled when the corresponding switch on SW1 and SW2 is on. When
enabled, LEDs will display the state of the corresponding microcontroller pin; otherwise the
LEDs will always be off, no matter what the port state is, as no current can flow through
LED.
SW1
ON
1 2 3 4 5 6 7 8
PORTA LED
PORTB LED
PORTC LED
PORTD LED
PORTE LED
PORTF LED
PF7
PORTG LED
PORTH LED
PF6
CURRENT FLOW
RN20
SW2
ON
1 2 3 4 5 6 7 8
PORTJ LED
PORTK LED
2
3
PORTL LED
PF5
PF4
5
6
7
8
9
PF3
VCC
PF2
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
PF1
PF0
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
RPACK8/9
8x1K
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
X1
10MHz
100n
Reset
10K
VCC
page
16
C1
22pF
C2
22pF
BigAVR
with USB 2.0 PROGRAMMER
PUSHBUTTON SWITCHES
MikroElektronika
Development
tools
PUSHBUTTON SWITCHES
BigAVR has 86 push buttons,
which can be used to change states
of digital inputs to microcontroller's
ports. There is also one switch that
acts as a RESET. Reset switch
schematic is shown in Figure 18.
Figure 18.
VCC
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
VCC
AVRFlash
On-Board USB
programmer
Reset
C2
22pF
100n
C1
22pF
10K
X1
10MHz
Figure 19.
Reset switch
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
17
MikroElektronika
Development
tools
PUSHBUTTON SWITCHES
Buttons connections to PORTC is shown in Fig. 21. Jumper J12 determines whether a button press will bring logical zero or logical one to the appropriate pin.
When button is not pressed, pin state is determined by the pull-up or pull-down port
jumpers.
In the example shown in Fig. 21, J12 is connected to +5V, therefore pressing the buttons will
bring logical one to the appropriate pins.
PORTC
PC0
PC1
PC2
VCC
PC3
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
PC4
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PC7
VCC
J12
0V while button
is pressed
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
VCC
X1
10MHz
100n
Reset
10K
5V while button
is pressed
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PC5
PC6
C1
22pF
C2
22pF
page
18
BigAVR
with USB 2.0 PROGRAMMER
pull-up
PC2
vcc
J12
Reset
C1
22pF
0V while pressed
C2
22pF
VCC
vcc
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
J3
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
PORTC
Reset
pull-down
PC2
vcc
VCC
J12
10K
BigAVR
PORTC
X1
10MHz
5V while pressed
X1
10MHz
100n
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
J3
VCC
100n
vcc
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
10K
VCC
C1
22pF
C2
22pF
19
PUSHBUTTON SWITCHES
MikroElektronika
Development
tools
ON-BOARD
MikroElektronika
Development
tools
GRAPHIC LCD
A graphic LCD (GLCD) allows advanced visual messages to be displayed. While a character LCD can display only alphanumeric characters, a GLCD can be used to display messages in the form of drawings and bitmaps.
The most commonly used graphic LCD has the screen resolution of 128x64 pixels. Before
a GLCD is connected, the user needs to set the jumper J17 (Fig. 25) to the upper position.
The GLCDs contrast can be adjusted using the potentiometer P3, which is placed to the
right of the GLCD.
NOTE: Make sure to turn off the power supply before placing GLCD on development
board! If the power supply is connected while placing, GLCD unit can be permanently damaged!
page
20
BigAVR
with USB 2.0 PROGRAMMER
MikroElektronika
Development
tools
J17
Vee
GRAPH.
GLCD contrast
selected
LCD8 contrast
selected
VCC
CHAR.
VCC
D0
D1
D2
VCC
P3 10K
R16 10
Vo
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
20
CS1
CS2
RS
R/W
E
RST
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PE4
PE5
PE6
PA0
PA1
PA2
PA3
PA4
PA5
PA6
PA7
PE7
CS1
CS2
GND
VCC
Vo
RS
R/W
E
D0
D1
D2
D3
D4
D5
D6
D7
RST
Vee
LED+
LED-
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
VCC
PE2
PE3
Contrast
Adjustment
D3
D4
D5
D6
D7
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
VCC
10K
X1
10MHz
BigAVR
with USB 2.0 PROGRAMMER
C2
22pF
100n
Reset
C1
22pF
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
21
CONNECTOR
2x16 LCD
ON-BOARD
MikroElektronika
Development
tools
NOTE: Make sure to turn off the power supply before placing GLCD on development
board! If the power supply is connected while placing, GLCD unit can be permanently damaged!
page
22
BigAVR
with USB 2.0 PROGRAMMER
MikroElektronika
Development
tools
Figure 27.
LCD 2x16 in 4-bit mode schematic
VCC
VCC
Contrast
Adjustment
Vo
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
14
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
LCD Display
4-bit mode
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
GND
VCC
VEE
RS
R/W
E
D0
D1
D2
D3
D4
D5
D6
D7
PC2
GND
PC3
GND
GND
GND
GND
PC4
PC5
PC6
PC7
P4
10K
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
D7
D6
D5
D4
E
RS
VCC
10K
X1
10MHz
BigAVR
with USB 2.0 PROGRAMMER
C2
22pF
100n
Reset
C1
22pF
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
23
CONNECTOR
2x16 LCD
ON-BOARD
MikroElektronika
Development
tools
Figure 28.
LCD 2x16 in 8-bit mode
NOTE: Make sure to turn off the power supply before placing GLCD on development
board! If the power supply is connected while placing, GLCD unit can be permanently damaged!
NOTE: Make sure to place the LCD properly! Improper placement may damage the LCD
unit permanently!
page
24
BigAVR
with USB 2.0 PROGRAMMER
The LCD must be placed in the marked position with two free pins to the left and four free
pins to the right. It is important to note that the LCD should be placed or removed from
BigAVR only when the power is off. Before attaching the LCD, set jumper J17 to the lower
position. The LCD's contrast can be adjusted using potentiometer P3 which is located to the
right of the GLCD/LCD connector.
J17
Vee
GRAPH.
GLCD contrast
selected
LCD8 contrast
selected
VCC
CHAR.
VCC
D0
D1
D2
VCC
P3 10K
Vo
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
14
RS
LCD Display
8-bit mode
R/W
E
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
GND
VCC
VEE
RS
R/W
E
D0
D1
D2
D3
D4
D5
D6
D7
PE4
PE5
PE6
PA0
PA1
PA2
PA3
PA4
PA5
PA6
PA7
Contrast
Adjustment
D3
D4
D5
D6
D7
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
10K
X1
10MHz
BigAVR
with USB 2.0 PROGRAMMER
C2
22pF
100n
Reset
C1
22pF
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
25
MikroElektronika
Development
tools
R S- 2 3 2 C O M M U N I C A T I O N
MikroElektronika
Development
tools
In order to provide a more flexible system, the microcontroller is connected to the MAX232
through the switches 1, 2, 3, and 4 on SW3 for the RS232-A port and the switches 5,6,7 and
8 on SW3 for the RS232-B port. Rx and Tx lines for the RS232-A port are connected to PE0
and PE1 pins, respectively. Rx and Tx lines for the RS232-B port are connected to PD2 and
PD3 pins, respectively. Both RS232 ports have RTS and CTS lines for implementing hardware handshaking.
page
26
BigAVR
with USB 2.0 PROGRAMMER
Figure 31.
Connection between microcontroller and a PC: RS232-A
PC
6
RS232
CON
RTS
5
CTS
Receive
data (Rx)
CONNECT
MCU TO PC
SERIAL
CABLE
CONNECT
PC TO MCU
9
RS232-A
CON
Send
Data (Tx)
CN25
SUB-D 9p
4
9
5
2
7
3
VCC
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
VCC
E6
10uF
VCC
U1
VS+
C1C2+
C2VS-
T2OUT
R2IN
VCC
GND
T1OUT
R1IN
R1OUT
T1IN
T2IN
R2OUT
16
15
14
13
12
11
10
9
SW3
RS-232 B
VCC
10K
Tx
X1
10MHz
RTS
CTS
Reset
ON
1 2 3 4 5 6 7 8
BigAVR
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
Rx
RS-232 A
E4
10uF
C1+
100n
E5
10uF
1
2
3
4
5
6
7
8
MAX232
E3
10uF
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
C10
100nF
C1
22pF
C2
22pF
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
27
R S- 2 3 2 C O M M U N I C A T I O N
MikroElektronika
Development
tools
MikroElektronika
Development
tools
R S- 2 3 2 C O M M U N I C A T I O N
Figure 32.
Connection between microcontroller and a PC: RS232-B
PC
6
RS232
CON
RTS
5
CTS
Receive
data (Rx)
CONNECT
MCU TO PC
SERIAL
CABLE
CONNECT
PC TO MCU
6
RS232-B
CON
Send
Data (Tx)
CN26
SUB-D 9p
4
9
5
2
7
3
VCC
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
VCC
E10
10uF
VCC
U1
C2+
C2VS-
T2OUT
R2IN
T1OUT
R1IN
R1OUT
T1IN
T2IN
R2OUT
16
15
14
13
12
11
10
9
RS-232 B
ON
1 2 3 4 5 6 7 8
VCC
X1
10MHz
Rx
Tx
RTS
C1
22pF
C2
22pF
CTS
page
28
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
SW3
10K
C1-
VCC
GND
Reset
VS+
RS-232 A
E8
10uF
C1+
100n
E9
10uF
1
2
3
4
5
6
7
8
MAX232
E7
10uF
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
C11
100nF
BigAVR
with USB 2.0 PROGRAMMER
DS1820
VCC
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
125 C
-50 C
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
VCC
10K
DS1820
X1
10MHz
Reset
C1
22pF
C2
22pF
ON
DQ
SW2
1 2 3 4 5 6 7 8
VCC
R1
10K
100n
VCC
VCC
GND
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
Figure 34.
DS1820 schematic
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
29
MikroElektronika
Development
tools
ENABLED
VREF
4.096V
ON-BOARD
MikroElektronika
Development
tools
Figure 35.
A/D Converter input
In order to measure analog signal without interference, turn the coresponding switch on
SW4 to OFF position. This will disable connection of the used PORTF pin to the pullup/down resistors.
Applications of A/D Conversion are various. Microcontroller takes analog signal from its
input pin and translates it into a digital value. Basically, you can measure any analog signal
that fits in range acceptable by AVR. That range is 0V to 5V.
page
30
BigAVR
with USB 2.0 PROGRAMMER
MikroElektronika
Development
tools
pull-up/down
vcc
J6
PORTF
PF4
PF5
PF2
PF3
PF0
PF1
0 - 5V
ON
vcc
vcc
SW4
vcc
1 2 3 4 5 6 7 8
R13
1K
0 - 5V
P1
10K
0 - 5V
P2
10K
J13
REF1
vcc
AREF
MCP
1541
E11
10uF
3 VOUT
VIN 1
GND 2
J18
J19
R12
100
VCC
Figure 36.
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
Potentiometer P1 is
connected to RF2 pin
and potentiometer P2 is
connected to RF3 pin.
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
X1
10MHz
100n
Reset
10K
VCC
NOTE: Jumpers J18 and J19 should not select the same pin.
BigAVR
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
C1
22pF
C2
22pF
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
31
MikroElektronika
Development
tools
PS/2 READY
The PS/2 connector allows direct connection between BigAVR and devices that use
PS/2 communication, such as PC, keyboard
or mouse. For example, the microcontroller
can be connected to a keyboard to capture
pressed keys or it can be connected to a PC
to act as a keyboard. CLK and DATA lines
are used for data tansfer. In this case, they
are connected to pins PC1 and PC0 respectively.
DEVELOPMENT
PS/2 connector
Figure 37.
Figure 38.
Keyboard connected to
development board
VCC VCC
VCC
VCC
PS2
CONNECTOR
R25
10K
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
R26
10K
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
J16
J15
DATA
NC
GND
VCC
CLK
NC
NC
CLK
+5V
NC
DATA
10K
VCC
X1
10MHz
100n
Reset
C1
22pF
C2
22pF
page
32
BigAVR
with USB 2.0 PROGRAMMER
Figure 40.
These connectors can be used for system expansion with external boards such as Serial
Ethernet, Compact Flash, MMC/SD, ADC, DAC, CAN, RTC, RS-485, etc. Ensure that the
on-board peripherals are disconnected from microcontroller by setting the appropriate
jumpers and switches, while external peripherals are using the same pins. The connectors
can also be used for attaching logic probes or other test equipment.
Figure 41.
Example of how to connect external peripheral with flat cable
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
33
MikroElektronika
Development
tools
MikroElektronika
Development
tools
Pull-up line is
connected
VCC
J1
RN1
Pull-down line
is connected
All lines
are disconnected
1
PA7 2
PA6 3
PA5 4
PA4 5
PA3
PA2
PA1
PA0
VCC
6
7
8
9
RPACK8/9
8x10K
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
CN1
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
PA0
PA1
PA2
PA3
PA4
PA5
PA6
PA7
VCC
HEADER 5x2
X1
10MHz
100n
Reset
10K
VCC
C1
22pF
C2
22pF
Figure 42.
PORTA connection
page
34
BigAVR
with USB 2.0 PROGRAMMER
JTAG CONNECTOR
JTAG connector can be used as serial programming interface or On-Chip debug system. For
the On-chip Debug system, in addition to the JTAG interface pins, the RESET pin is monitored by the debugger to be able to detect external reset sources. The debugger can also pull
the RESET pin low to reset the whole system. The JTAG interface is accessed through four
of the microcontrollers pins:
- TMS: Test Mode Select,
- TCK: Test Clock,
- TDI: Test Data In,
Figure 43.
- TDO: Test Data Out.
JTAG connector schematic
JTAG
CONNECTOR
VCC
VCC
CN13
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
VCC
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
TCK
GND
TDO
VTref
TMS
nSRST
Vsupply
nTRST
TDI
mRST
NC
GND
HEADER 5x2
BigAVR
with USB 2.0 PROGRAMMER
X1
10MHz
100n
Reset
10K
VCC
C1
22pF
C2
22pF
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
35
JTAG CONNECTOR
MikroElektronika
Development
tools
MikroElektronika
Development
tools
MASS STORAGE
256MB
SUPPORTED
MMC card is used as storage media for a portable devices, in a form that can easily be
removed for access by a PC. For example, a digital camera would use an MMC card for
storing image files. With an MMC reader (typically small box that connects via USB or
some other serial connection) you can easily transfer data from MMC card to your computer. Microcontroller on BigAVR communicates with Multi Media Card via SPI communication.
Figure 44.
MMC slot on-board
To enable MMC card you must turn on switches 5, 6, 7 and 8 on SW2. By doing that, microcontrollers SPI comunnication lines (SDI, SDO and SCK) and Chip Select are connected to
MMC. Working voltage of BigAVR is 5V DC, while working voltage of MMC card is 3.3V
DC. Because of that, there is a voltage regulator on-board with MMC card (MC33269DT3.3). Data lines from microcontroller to MMC card must be also adjusted to 3.3V. It is done
with resister voltage dividers as shown on Figure 45.
page
36
BigAVR
with USB 2.0 PROGRAMMER
MikroElektronika
Development
tools
SPI-SDI
MMC-CS#
SPI-SDO
SPI-SCK
VCC3
R17
2K2
R19
2K2
CN22
R21
2K2
1
2
3
4
5
6
7
R18
3K3
R22
3K3
R20
3K3
MC33269
DT-3.3
C12
100nF GND
1
2
C13
100nF
MMC/SD
CARD
REG2
VCC
VCC3
CS
Din
GND
+3.3V
SCK
GND
Dout
VCC
VIN
VOUT
VCC
VCC3
E16
10uF
MMC-CS#
PEN
PE0
PE1
PE2
PE3
PE4
PE5
PE6
PE7
PB0
PB1
PB2
PB3
PB4
PB5
PB6
PB3
PB2
PB1
PG1
ATmega128
PB7
PG3
PG4
RESET
VCC
GND
XTAL2
XTAL1
PD0
PD1
PD2
PD3
PD4
PD5
PD6
PD7
MMC-SCK
ON
MMC-SDO
1 2 3 4 5 6 7 8
MMC-SDI
AVCC
GND
AREF
PF0
PF1
PF2
PF3
PF4
PF5
PF6
PF7
GND
VCC
PA0
PA1
PA2
SW2
PA3
PA4
PA5
PA6
PA7
PG2
PC7
PC6
PC5
PC4
PC3
PC2
PC1
PC0
PG1
PG0
X1
10MHz
100n
Reset
10K
VCC
C1
22pF
C2
22pF
BigAVR
with USB 2.0 PROGRAMMER
page
MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD
37
MikroElektronika
Development
tools
page
38
BigAVR
with USB 2.0 PROGRAMMER