AVR-MT128 development board
Users Manual
Rev.A, July 2008

Copyright(c) 2008, OLIMEX Ltd, All rights reserved

INTRODUCTION:
AVR-MT128 is simple but powerful board which uses the MCU ATMega128
from Atmel. With its LCD, buttons, relay and variety of interfaces such as
RS232 (in two variants – 4 pins and DB9), JTAG, ISCP, Dallas, etc. thisboard is suitable for different embedded systems applications.

BOARD FEATURES:-MCU: ATMega128-16AI with128K Bytes Program Flash, 4K Bytes data
EEPROM, 4K Bytes RAM
JTAG connector for in-circuit programming and debugging with AVRJTAGICSP 5x2 (10) pin STKxxx compatible connector for in-circuit
programming with AVR-PG1B or AVR-PG2B
RS232 connector with TTL levels
RS232 interface circuit with Tx, Rx signals
RS232 DB9 female connector
Dallas touch button port
Frequency input
LCD 16x2 display
Status LED
Five buttons
BuzzerPower supply circuit +5V, 78L05 with plug-in power jack and diodebridge
32 768 Hz oscillator crystal
16 MHz crystal oscillator
Power supply filtering capacitor
RESET supervisor IC ZM33064
RELAY with 10A/250VAC NO and NC contacts with screw terminals
Extension headers for unused in the schematic ports available forexternal connection
PCB: FR-4, 1.5 mm (0,062"), green soldermask, white silkscreen
component print
Four mounting holes 3.3 mm (0.13")
Dimensions: 120x38 mm (4.7x1.5")

ELECTROSTATIC WARNING:
The AVR-MT128 board must not be subject to high electrostatic potentials.
General practice for working with static sensitive devices should be applied
when working with this board.

BOARD USE REQUIREMENTS:
Cables:

RS232 straight male-to-female DB9 cable (Note: this is not anull modem cable)

Hardware: Programmer: AVR-PG1, AVR-PG2, AVR-ISP500, AVR-ISP500TINY, AVR-ISP500-ISO or other compatible tool;
Debugger: AVR-JTAG, AVR-JTAG-USB or other compatible tool;Software:

AVR Studio + WinAVR – free C compiler and debugger can be
downloaded at avrfreaks.org web site. IAR IW for AVR is acommercial software for development of embedded systems
software.

PROCESSOR FEATURES:
AVR-MT128 uses ATMega128 MCU from Atmel with the following features:– High-performance, Low-power AVR® 8-bit Microcontroller– Advanced RISC Architectureo 133 Powerful Instructions – Most Single Clock Cycle Execution
o 32 x 8 General Purpose Working Registers + Peripheral ControlRegisters
o Fully Static Operationo Up to 16 MIPS Throughput at 16 MHzo On-chip 2-cycle MultiplierNonvolatile Program and Data Memorieso 128K Bytes of In-System Reprogrammable Flash
Endurance: 10,000 Write/Erase Cycles
o Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operationo 4K Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
o 4K Bytes Internal SRAMo Up to 64K Bytes Optional External Memory Spaceo Programming Lock for Software Security
o SPI Interface for In-System Programming– JTAG (IEEE std. 1149.1 Compliant) Interfaceo Boundary-scan Capabilities According to the JTAG Standard
o Extensive On-chip Debug Support
o Programming of Flash, EEPROM, Fuses and Lock Bits throughthe JTAG Interface– Peripheral Featureso Two 8-bit Timer/Counters with Separate Prescalers andCompare Modeso Two Expanded 16-bit Timer/Counters with Separate Prescaler,Compare Mode and Capture Modeo Real Time Counter with Separate Oscillatoro Two 8-bit PWM Channels
o 6 PWM Channels with Programmable Resolution from 2 to 16Bitso Output Compare Modulatoro 8-channel, 10-bit ADC
8 Single-ended Channels
7 Differential Channels
2 Differential Channels with Programmable Gain at 1x, 10x, or200x
o Byte-oriented Two-wire Serial Interfaceo Dual Programmable Serial USARTs
o Master/Slave SPI Serial Interface
o Programmable Watchdog Timer with On-chip Oscillatoro On-chip Analog Comparator– Special Microcontroller Featureso Power-on Reset and Programmable Brown-out Detectiono Internal Calibrated RC Oscillator
o External and Internal Interrupt Sources

Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Powerdown, Standby, and Extended Standby
o Software Selectable Clock Frequency
o ATmega103 Compatibility Mode Selected by a Fuseo Global Pull-up Disable
I/O and Packageso 53 Programmable I/O Lineso 64-lead TQFP and 64-pad MLF
Operating Voltages
o 4.5 - 5.5V for ATmega128
Speed Gradeso 0 - 16 MHz for ATmega128
o–––BLOCK DIAGRAM:MEMORY MAP:

BOARD LAYOUT:SCHEMATIC:+12V

R94.7K

220uF/25VDC

C3100uF

R222K

R322K

R1522K

R1622KR1722K

B1B2B3B4B5AVR-MT-128

B1COPYRIGHT(C) 2008, OLIMEX LTD
HTTP://WWW.OLIMEX.COM/DEV+5V

B2R14RESET

GND
1C522p
C622p+5V

ICSP

24681013579Q132768Hz

BUZ3+5V

RS2324321J
321+5V
RESET

246810JTAG

2423Q216MHzRESETSCKFREQ

1 TCK
3 TDO
5 TM S
7 +5V
9 TDI+5V

201918PDIPDO
XCK0/AIN0
OC3A/AIN1
OC3B/INT 4OC3C/INT 5T3/INT6IC3/INT723456789SCL/INT 0SDA/INT1RXD
TXD
IC1XCK1T1T22526272829303132ADC0ADC1ADC2ADC3TCK
TMS
TDO
TDI616059585756555464

R13ADC642

ADC3ADC1531ADC2ADC0AREF

C8100nNA

AREF

62C463100n+5V
PA0/AD0
PA1/AD1
PA2/AD2
PA3/AD3
PA4/AD4
PA5/AD5
PA6/AD6
PA7/AD7

TOSC1/PG4
TOSC2/PG3
RXD0/PDI/PE0
TXD0/PDO/PE1
XCK0/AIN0/PE2
OC3A/AIN1/PE3
OC3B/INT4/PE4
OC3C/INT5/PE5
T3/INT6/PE6
IC3/INT7/PE7

PC0/A8
PC1/A9PC2/A10
PC3/A11
PC4/A12
PC5/A13
PC6/A14
PC7/A15

SCL/INT0/PD0
SDA/INT1/PD1
RXD1/INT2/PD2
TXD1/INT3/PD3
IC1/PD4
XCK1/PD5
T1/PD6
T2/PD7
ADC0/PF0
ADC1/PF1
ADC2/PF2
ADC3/PF3
ADC4/TCK/PF4
ADC5/TMS/PF5
ADC6/TDO/PF6
ADC7/TDI/PF7
AVCC
AVREF
AGND

12EXT1

C10100n

XTAL1XTAL2

D11FR107

B5VCC

RESET/DALLAS

33

C9100n5221U2RESET 3

BUZZER

2 VCC

B4+5V

10K

U1
ZM33064B3DALLAS

D10FR107

R851504948
4746 DALLAS
45 RELAY
44 PA7/AD7B1B2B3B4B53536373839404142

OC2/OC1COC1B
OC1AOC0MISOMOSISCKSS43
PG2/ALE 34
PG1/RD 33
PG0/WR 1PEN/PG2/ALE
PG1/RD
PG0/WR

R110K

T113IC1119 SCL/INT0
T3/INT675 OC3B/INT 43 XCK0/AIN012LCD_TR
10K+5V3RSR/WE
PC3/A11D4D5D6D717PB7/OC2/OC1C 16
PB6/OC1B 15
PB5/OC1A 14
PB4/OC0 13
PB3/MISO 12
PB2/MOSI 11
PB1/SCK 10
PB0/SST214
XCK112SDA/INT 1 10IC3/INT 78OC3C/INT5 6OC3A/AIN1 42C2100n

D4D5D6D711121314RS
R/W
E

456VDD

GND

1N4728(3.3V)+5V+5VVO
DB4DB5DB6DB7_RS
R/W
E

1C1+5VOUT

EXT2PA7/AD714OC2/OC1C 12OC1A
10MISO
8SS
6PG1/RD
4+5V

1311975312PC3/A11OC1B
OC0MOSI
PG2/ALE
PG0/WR+5V

GND

2253

12VDC/9VAC

IN

VSS

VR
78L05

Z+

G1
DB104+ATMEGA128+12V
REL_CON+5V

T2BC856

12345T XD

D81N4148

R44.7K
C710uF/25VDC

RELRXD

R7R1247K

T1BC846D91N4148

LED321R64.7K

10K

DB9-RS232
6789R510K+PWR

T3BC846+5V
FREQ
12D131N4148
D141N4148

D121N4004

R102K

FREQ

R18100K

R111K
R1922KRELAY

POWER SUPPLY CIRCUIT:
The power supply of AVR-MT128 is taken from Power jack connector. You
should apply 9 VAC or +12 VDC at the positive central pin.
The consumption of the board is about 30 mA.

RESET CIRCUIT:
AVR-MT128 reset circuit is made with ZM33064 with typical threshold
4.5V. When the voltage falls bellow that minimum, the MSU resets.

CLOCK CIRCUIT:
Quartz crystal 16MHz for maximum performance is connected toATMega128 pin 23 (XTAL2) and pin 24 (XTAL1).
Additional 32 768 Hz tact generator is connected to ATMega128 pin 18(TOSC2/PG3) and pin 19 (TOSC1/PG4) and supplies the Real Time Clock.

JUMPER DESCRIPTION:
JThis jumper supplies the input user frequency FREQ to either(T1/PD6) or pin 32 (T2/PD7). When 1-2 is shorted the input
is connected to T2. When 2-3 is shorted the input frequency pin isT1.

pin 31
frequency pin
connected toDefault state is 1-2 shorted.

INPUT/OUTPUT:
Status LED (red) connected to the relay.
Relay with name REL connected to ATMega128 pin 45 (PA6/AD6).
Trimmer LED_TR connected to the LCD.
Liquid crystal display.
Buzzer with name BUZZ connected to ATMega128 pin 6 (OC3B/INT4/PE4)
and pin 7 (OC3C/INT5/PE5).
User button B1 connected to ATMega128 pin 51 (PA0/AD0).
User button B2 connected to ATMega128 pin 50 (PA1/AD1).
User button B3 connected to ATMega128 pin 49 (PA2/AD2).
User button B4 connected to ATMega128 pin 48 (PA3/AD3).
User button B5 connected to ATMega128 pin 47 (PA4/AD4).

CONNECTOR DESCRIPTIONS:
JTAG:
Pin #Signal Name

1TCK

2GND

3TDO

4+5V

5TMS

6RESET

7+5V

8NC

9TDI

10GND

This connector allows programming and debugging via AVR-JTAG or othercompatible tools.
TDI
Input Test Data In. This is the serial data input for the shift register.
TDO OutputTest Data Out. This is the serial data output for the shift register. Data isshifted out of the device on the negative edge of the TCK signal.
TMS Input Test Mode Select. The TMS pin selects the next state in the TAP statemachine.
TCK Input Test Clock. This allows shifting of the data in, on the TMS and TDI pins. It isa positive edge triggered clock with the TMS and TCK signals that define the internal state ofthe device.

ICSP:Pin #Signal Name

1PDI

2+5V

3NC

4GND

5RST6GND

7SCK

8GND

9PDO

10GND

This connector allows programming via AVR-PG1, AVR-PG2 or othercompatible tool.
PDIPDO
SCKInput Program Data In. This pin is serial data input for the MCU.
OutputProgram Data Out. This pin is serial data output from the MCU.
I/O
Serial (Synchronization) Clock. This is the synchronization signal.

DB9-RS232:
Pin #Signal Name

1NC

2TXD

3RXD

4NC

5GND

6NC

7NC

8NC

9NC

TXD OutputTransmit Data. This is the asynchronous serial data output for the RS232
interface.
RXD Input Receive Data. This is the asynchronous serial data input for the RS232
interface.

RS232:Pin #Signal Name

1TXD

2RXD

3GND

4+5V

RELAY_CONNECTOR:
This connector provides the user with access to the contact
plates of the relay.

FREQ:
Pin #Signal Name

1FREQ

2GND

External input frequency is applied at pin 1.

DALLAS:
Pin #Signal Name

1DALLAS

2GNDSignal from Dallas chips is applied at pin 1 of the Dallas interface.

ADC:
Pin #

Signal Name

1AREF

2GND

3

ADC0

4

ADC15ADC26ADC3

Some of the Analog to Digital Converter signals are grouped into anextension.

EXT1:
Pin #

Signal Name

1

GND

2+5V

3

XCK0/AIN0

4OC3A/AIN1

5OC3B/INT4

6OC3C/INT5

7T3/INT68IC3/INT79SCL/INT010SDA/INT111IC112XCK113T114T2EXT2:
Pin #Signal Name

1GND

2+5V

3PG0/WR

4PG1/RD

5PG2/ALE

6SS

7MOSI

8MISO

9OC010OC1A

11OC1B

12OC2/OC1C

13PC3/A1114PA7/AD7

PWR:
Pin #Signal Name

1PWR

2GND

You should apply 9 VAC or +12VDC on pin 1.

MECHANICAL DIMENSIONS:All measures are in mm.

AVAILABLE DEMO SOFTWARE:
Check for available demo software for AVR-MT128 on our website:www.olimex.com/dev.

ORDER CODE:
AVR-MT128 – assembled and tested (no kit, no soldering required)
How to order?
You can order to us directly or by any of our distributors.
Check our web www.olimex.com/dev for more info.

All boards produced by Olimex are ROHS compliant

Revision history:
REV.A- created September 2008

Disclaimer:© 2008 Olimex Ltd. All rights reserved. Olimex®, logo and combinations thereof, areregistered trademarks of Olimex Ltd. Other terms and product names may be trademarks ofothers.
The information in this document is provided in connection with Olimex products. Nolicense, express or implied or otherwise, to any intellectual property right is granted by thisdocument or in connection with the sale of Olimex products.
Neither the whole nor any part of the information contained in or the product described inthis document may be adapted or reproduced in any material from except with the priorwritten permission of the copyright holder.
The product described in this document is subject to continuous development andimprovements. All particulars of the product and its use contained in this document aregiven by OLIMEX in good faith. However all warranties implied or expressed including but
not limited to implied warranties of merchantability or fitness for purpose are excluded.
This document is intended only to assist the reader in the use of the product. OLIMEX Ltd.
shall not be liable for any loss or damage arising from the use of any information in thisdocument or any error or omission in such information or any incorrect use of the product.