easyAVR128™ Development Board Users...
Transcript of easyAVR128™ Development Board Users...
easyAVR128™ Development Board Users Manual
www.LogiFind.com 1
To our valued customers
I want to express my thanks to you for being interested in our products and for having confidence in LogiFind
International CO., Ltd..The primary aim of our company is to design and produce high quality electronic products
and to constantly improve the performance thereof in order to better suit your needs.
Please share your thoughts and feelings regarding our operation so that we can serve you better in the future. I
thank you for your continued support and patronage.
Your Dream is our Destination!
The Microchip, TI,Freescale,ST,Atmel,Silicon and CYPRESS name, logo and products names are trademarks of
Microchip, TI,Freescale,ST,Atmel,Silicon and CYPRESS Inc. in the U.S.A. and other countries.
Sincerely,
Owner and General Manager
of LogiFind International CO., Ltd.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 2
CONTENTS
Chapter 1: Introduction .......................................................................................................................................... 3
What is easyAVR128? ...................................................................................................................................... 3
Microcontroller ................................................................................................................................................ 3
What’s on Board? ............................................................................................................................................ 5
Tools Requirement........................................................................................................................................... 5
Power Requirement ......................................................................................................................................... 5
Software Requirement ..................................................................................................................................... 5
Electrostatic Warning ..................................................................................................................................... 5
Chapter 2: Hardware Details .................................................................................................................................. 7
Power Supply and CP2102 USB Bridge ........................................................................................................ 7
Microcontroller ................................................................................................................................................ 8
System Clock .................................................................................................................................................... 8
Eight Digit 7.seg LED Display ........................................................................................................................ 8
Eight LEDs ....................................................................................................................................................... 9
Eight User Keys ............................................................................................................................................. 10
ULN2003A for Step Motor and Buzzer ....................................................................................................... 10
DS18B20, ADC and External Interrupt .......................................................................................................11
1.DS18B20 5 Digital Temperature Sensor ................................................................................................11
2.ADC input ..............................................................................................................................................11
3. External Interrupt ................................................................................................................................. 12
Real Time Clock and EEPROM Module ..................................................................................................... 12
1.EEPROM .............................................................................................................................................. 12
2.DS1302 Real Time Clock ..................................................................................................................... 13
UART via RS.232 ........................................................................................................................................... 14
LCD 2x16 characters (Socket) ...................................................................................................................... 15
GLCD 128x64(Socket) ................................................................................................................................... 16
Bootloader Indicator ..................................................................................................................................... 17
System Reset ................................................................................................................................................... 18
Power Supply Port for DIY........................................................................................................................... 18
Chapter 3: Experiments ........................................................................................................................................ 19
Chapter 4: Bootloader Self.programming ........................................................................................................... 21
Contact Us ............................................................................................................................................................ 25
Disclaimer ............................................................................................................................................................... 25
easyAVR128™ Development Board Users Manual
www.LogiFind.com 3
Chapter 1: Introduction
What is easyAVR128?
EasyAVR128 is an old friend. It has been with us for four generations. Many of us made our first steps in
embedded world with EasyAVR128. Today it has thousands of users: students, hobbyists, enthusiasts and
professionals. It is used in many schools and other educational institutions across the globe. We have sold them
over 4000pcs in the world in the passed 4 years. It provides an low5cost easy5to5use platform with common
modules to bring you into the colorful embedded world. Of course, we are not perfect and we asking ourselves
what we can do to make such a board even better, and at the same time, we are looking forward to receiving your
valuable suggestions.
easyAVR128 Board is a complete solution for fast and simple development of embedded applications by using a
new Atmel® ATmega128A device connected to 7.3728Mhz oscillator. It has a bootloader inside the ATmega128A,
which allows you to achieve self5programming very easily without an external programmer or debugger.
Microcontroller
The ATmega128A is a low5power CMOS 85bit microcontroller based on the AVR enhanced RISC architecture. By
executing powerful instructions in a single clock cycle,the ATmega128A achieves throughputs approaching 1
MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.
Features
• High5performance, Low5power AVR® 85bit Microcontroller
• Advanced RISC Architecture
– 133 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers + Peripheral Control Registers
– Fully Static Operation
– Up to 16 MIPS Throughput at 16 MHz
– On5chip 25cycle Multiplier
• Nonvolatile Program and Data Memories
– 128K Bytes of In5System Reprogrammable Flash
Endurance: 1,000 Write/Erase Cycles
– Optional Boot Code Section with Independent Lock Bits
In5System Programming by On5chip Boot Program
True Read5While5Write Operation
– 4K Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
– 4K Bytes Internal SRAM
– Up to 64K Bytes Optional External Memory Space
– Programming Lock for Software Security
– SPI Interface for In5System Programming
• JTAG (IEEE std. 1149.1 Compliant) Interface
– Boundary5scan Capabilities According to the JTAG Standard
– Extensive On5chip Debug Support
– Programming of Flash, EEPROM, Fuses and Lock Bits through the JTAG Interface
easyAVR128™ Development Board Users Manual
www.LogiFind.com 4
• Peripheral Features
– Two 85bit Timer/Counters with Separate Prescalers and Compare Modes
– Two Expanded 165bit Timer/Counters with Separate Prescaler, Compare Mode and
Capture Mode
– Real Time Counter with Separate Oscillator
– Two 85bit PWM Channels
– 6 PWM Channels with Programmable Resolution from 1 to 16 Bits
– 85channel, 105bit ADC
8 Single5ended Channels
7 Differential Channels
2 Differential Channels with Programmable Gain (1x, 10x, 200x)
– Byte5oriented 25wire Serial Interface
– Dual Programmable Serial USARTs
– Master/Slave SPI Serial Interface
– Programmable Watchdog Timer with On5chip Oscillator
– On5chip Analog Comparator
• Special Microcontroller Features
– Power5on Reset and Programmable Brown5out Detection
– Internal Calibrated RC Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power5save, Power5down, Standby
and Extended Standby
– Software Selectable Clock Frequency
– ATmega103 Compatibility Mode Selected by a Fuse
– Global Pull5up Disable
• I/O and Packages
– 53 Programmable I/O Lines
– 645lead TQFP
• Operating Voltages
– 2.7 5 5.5V (ATmega128L)
– 4.5 5 5.5V (ATmega128)
• Speed Grades
– 0 5 8 MHz (ATmega128L)
– 0 5 16 MHz (ATmega128)
easyAVR128™ Development Board Users Manual
www.LogiFind.com 5
What’s on Board?
Figure 1"1.What’s on board
Tools Requirement
There is a cp2102 USB5RS232 circuit integrated on this board, which allows you to use the bootloader directly to
program the ATmega128A microcontroller. And we have provided the bootloader firmware for them in the CD
rom. Certainly, this board also supports other AVR programmer like:AVR ISP,AVR ISP MKII,AVR STK500 and
AVR USBASP etc.
Power Requirement
easyAVR128 can be powered in two different ways: with USB power supply (USB/POWER), or using external
adapters via adapter connector (POWER(7.10V)). External adapter voltage levels must be in range of 7510V DC.
Software Requirement
※AVR Studio + WinAVR free development IDE, AVRICC or other development IDE. All the example code are
written using AVRICC IDE.
※Programming software AVRUBD for uploading if you are using bootloader for ATmega128A on this board.
Electrostatic Warning
easyAVR128™ Development Board Users Manual
www.LogiFind.com 6
EasyAVR128 is shipped in protective anti5static packaging. The 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.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 7
Chapter 2: Hardware Details
Power Supply and CP2102 USB Bridge
Figure 2.1: Dual power supply unit schematic
EasyAVR128 Board contains power supply that creates stable voltage 5V and 3.3V and current levels necessary
for powering each part of the board. Power supply section contains two power regulators: 78M05, which
generates VCC.5V, and LM111753.3 which creates VCC.3.3V power supply. The board can be powered in two
different ways: with USB power supply (USB/POWER), or using external adapters via adapter connector Jack
(POWER(7.10V)). External adapter voltage levels must be in range of 7510V DC. Use J2 to specify whether you
are using 5V or 3.3V power supply for the system. Upon providing the power using either external adapter or
USB power source you can turn on power supply by using POWERSW (Figure 2.1). Power LED (PWR) will
indicate the presence of power supply.
Modern PC computers, laptops and notebooks are no longer equipped with RS5232 connectors and UART
controllers. They are nowadays replaced with USB connectors and USB controllers. Still, certain technology
enables UART communication to be done via USB connection. CP2102 from SILICON® convert UART signals
to the appropriate USB standard. In order to use USB5UART module on EasyAVR128, you must first install
CP2102 drivers on your computer. Drivers can be found on the Product DVD and also download in this link:
https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
USB5UART communication is being done through a CP2102 controller, USB connector (USB/POWER), and
microcontroller UART module. To establish this connection, you must connect RX and TX lines to the appropriate
pins of the microcontroller. This connection is done using Dial Switch SW1.At the same time, you must disenable
the associated bit in other module on this board avoid interference of RS5232 module.
In the following Chapter 4 we will show you how to use the bootloader to achieve self programming via this
easyAVR128™ Development Board Users Manual
www.LogiFind.com 8
USB bridge.
Microcontroller
EasyAVR128 board equips ATmega128A Microcontroller and all the IOs are taken out for easy DIY. PORT
headers are next to each other, and grouped together. It makes development easier, and the entire EasyAVR128
cleaner and well organized. It is easy for your DIY project. The ISP6,ISP10 and JTAG port are standard for
external programmer/debugger, like AVRISP, AVRISP MKII,AVRONE,AVRDREGON and AVR JTAG MKII etc.
Figure 2.2: Microcontroller
System Clock
EasyAVR128 board contains a 7.3728MHz crystal for system clock..
Figure 2.3: System Clock
Eight Digit 7.seg LED Display
One seven segment digit consist of 7+1 LEDs which are arranged in a specific formation which can be used to
represent digits from 0 to 9 and even some letters.One additional LED is used for marking the decimal dot, in case
you want to write a decimal point in the desired segment. easyAVR128 contains 85digit 75segment display.
Driving such a display is done using multiplexing techniques. Data lines are shared between segments, and
therefore the same segment LEDs in each digit are connected in parallel.
If you connect the LED to the MCU directly,16 IOs are need to drive. so in this application, in order to increase
the utilizing rate IO,we use a 74HC138 and a 74HC595 to drive the LED and only seven IOs connected.
74HC138 decodes three binary weighted address inputs (A0, A1 and A2) to eight mutually exclusive outputs (Y0
to Y7) and the outputs (Y0 to Y7) drive the digit15digit8 separately. The 74HC595 is 85stage serial shift registers
easyAVR128™ Development Board Users Manual
www.LogiFind.com 9
with a storage register and 35state outputs. The registers have separate clocks. Data is shifted on the positive5going
transitions of the shift register clock input (SHCP). The data in each register is transferred to the storage register
on a positive5going transition of the storage register clock input (STCP). If both clocks are connected together, the
shift register will always be one clock pulse ahead of the storage register. The shift register has a serial input (DS)
and a serial standard output (Q7S) for cascading. It is also provided with asynchronous reset (active LOW) for all
Figure 2.4: Six Digit 75seg Display Module
8 shift register stages. The storage register has 8 parallel 35state bus driver outputs. Data in the storage register
appears at the output whenever the output enable input (OE) is LOW. So in the 74HC595 application,only three
IOs can simulate 8 IOS parallel output,and light up the segment of the LED display.
Note: For detailed information of 74HC595 and 74HC138, please refer to the datasheet and you can find them as following
links.
Eight LEDs
LED (Light.Emitting Diode) is a highly efficient electronic light source. When connecting LEDs, it is necessary
to place a current limiting resistor in series so that LEDs are provided with the current value specified by the
manufacturer. The current varies from 0.2mA to 20mA, depending on the type of the LED and the manufacturer..
The EasyPIC540 board uses low5current LEDs with typical current consumption of 0.2mA or 0.3mA, depending
of VCC voltage selection. Board contains 8 LEDs which can be used for visual indication of the logic state on
http://www.nxp.com/documents/data_sheet/74HC_HCT138.pdf
http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf
easyAVR128™ Development Board Users Manual
www.LogiFind.com 10
PORT pins. An active LED indicates that a logic high (1) is present on the pin.
In order to enable LEDs, it is necessary to connected them to the appropriate IOs Port via connector (CN1) using
dupont wires. The CN1 connector does not be connected to any IOs, and it makes your experiments more flexible.
Figure 2.5: LEDs
Eight User Keys
The logic state of all microcontroller digital inputs may be changed using push buttons. In this application, 8 user
keys requiring eight IO ports.
Figure 2.6: User Keys
ULN2003A for Step Motor and Buzzer
The ULN2003A is high5voltage high5current Darlington transistor arrays. Each consists of seven npn Darlington
pairs that feature high5voltage outputs with common5cathode clamp diodes for switching inductive loads. The
collector5current rating of a single Darlington pair is 500 mA. The Darlington pairs can be paralleled for higher
current capability. Applications include relay drivers, hammer drivers, lamp drivers, display drivers (LED and gas
discharge), line drivers, and logic buffers. We use the ULN2003A to drive a Buzzer and a Stepper Motor (Figure
2.7).
Figure 2.7: ULN2003A Drive Module for Step Motor and Buzzer
easyAVR128™ Development Board Users Manual
www.LogiFind.com 11
Figure 2.8: BYJ54855V Step Motor
In order to enable the ULN2003A Drive Module, it is necessary to connected them to the appropriate IOs Port via
connector (CN4) using dupont wires. The CN4 connector does not be connected to any IOs, and it makes your
experiments more flexible.
DS18B20, ADC and External Interrupt
1.DS18B20 . Digital Temperature Sensor
DS18B20 is a digital temperature sensor that uses 15wire® interface for it’s operation. It is capable of measuring
temperatures within the range of 555 to 128°C, and provides ±0.5°C accuracy for temperatures within the range of
510 to 85°C. It requires 3V to 5.5V power supply for stable operation. It takes maximum of 750ms for the
DS18B20 to calculate temperature with 95bit resolution. 15wire® serial communication enables data to be
transferred over a single communication line, while the process itself is under the control of the master
microcontroller. The advantage of such communication is that only one microcontroller pin is used. Multiple
sensors can be connected on the same line. All slave devices by default have a unique ID code, which enables the
master device to easily identify all devices sharing the same interface.The easyAVR128 provides a separate socket
for the DS18B20.
2.ADC input
Digital signals have two discrete states, which are decoded as high and low, and interpreted as logic 1 and logic
0. Analog signals, on the other hand, are continuous, and can have any value within defined range. A/D converters
are specialized circuits which can convert analog signals (voltages) into a digital representation, usually in form of
an integer number. The value of this number is linearly dependent on the input voltage value. Most
microcontrollers nowadays internally have A/D converters connected to one or more input pins. Some of the most
important parameters of A/D converters are conversion time and resolution. Conversion time determines how fast
can an analog voltage be represented in form of a digital number. This is an important parameter if you need fast
data acquisition. The other parameter is resolution. Resolution represents the number of discrete steps that
supported voltage range can be divided into. It determines the sensitivity of the A/D converter. Resolution is
represented in maximum number of bits that resulting number occupies. Most PIC® microcontrollers have 105bit
resolution, meaning that maximum value of conversion can be represented with 10 bits, which converted to
integer is 210=1024. This means that supported voltage range, for example from 055V, can be divided into 1024
discrete steps of about 4.88mV. easyAVR128 provides two interfaces in form of potentiometer for simulating
analog input voltages that can be routed to any of the 10 supported analog input pins.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 12
3. External Interrupt
The AVR microcontrollers has two categories of interrupts as indicated in the tutorial on the AVR 85bits
Microcontroller Interrupt Sub5system. They are internal and external. ATmega128A has 8 external
interrupts:INT0, INT1, INT2, INT3, INT4, INT5, INT6 and INT7. easyAVR128 provides two keys(INT0 and
INT1) as the external interrupt input signal.
Figure 2.9: DS18B20, ADC and External Interrupt
Real Time Clock and EEPROM Module
1.EEPROM
EEPROM is short for Electrically Erasable Programmable Read Only Memory. It is usually a secondary storage
memory in devices containing data that is retained even if the device looses power supply. Because of the ability
to alter single bytes of data, EEPROM devices are used to store personal preference and configuration data in a
wide spectrum of consumer, automotive, telecommunication, medical, industrial, and PC applications.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 13
Figure 2.10: Real Time Clock and EEPROM Module
easyAVR128 supports serial EEPROM which uses I2C communication interface and has 1024 bytes of available
memory. Board contains socket for serial EEPROMs in DIP8 packaging, so you can easily exchange it with
different memory size EEPROM IC. EEPROM itself supports single byte or 165byte (page) write and read
operations. Data rate is 400 kHz for both 3.3V and 5V power supply. I2C is a multi5master serial single5ended bus
that is used to attach low5speed peripherals to computer or embedded systems. I²C uses only two open5drain lines,
Serial Data Line (SDA) and Serial Clock (SCL), pulled resistors. SCL line is driven by a master, while SDA is
used as bidirectional line either by master or slave Up to 112 slave devices can be connected to the same bus. Each
slave must have a unique address.
2.DS1302 Real Time Clock
The DS1302 Trickle Charge Timekeeping Chip contains a real time clock/calendar and 31 bytes of static RAM. It
communicates with a microprocessor via a simple serial interface. The real time clock/calendar provides seconds,
minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for
months with less than 31 days, including corrections for leap year. The clock operates in either the 24–hour or
12–hour format with an AM/PM indicator. Interfacing the DS1302 with a microprocessor is simplified by using
synchronous serial communication. Only three wires are required to communicate with the clock/RAM: (1) RST
(Reset), (2) I/O (Data line), and (3) SCLK (Serial clock). Data can be transferred to and from the clock/RAM 1
byte at a time or in a burst of up to 31 bytes. The DS1302 is designed to operate on very low power and retain data
and clock information on less than 1 microwatt. The DS1302 is the successor to the DS1202. In addition to the
basic timekeeping functions of the DS1202, the DS1302 has the additional features of dual power pins for primary
and back–up power supplies, programmable trickle charger for VCC1, and seven additional bytes of scratchpad
memory.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 14
Figure 2.11: DS1302 pin assignment
Num Name Function
1 VCC2 Power Supply Pins
2 X1, 32.768 kHz Crystal Pins
3 X2 32.768 kHz Crystal Pins
4 GND Ground
5 RST Reset
6 I/O Data Input/Output
7 SCLK Serial Clock
8 VCC1 Power Supply Pins
UART via RS.232
The UART (universal asynchronous receiver/transmitter) is one of the most common ways of exchanging data
between the MCU and peripheral components. It is a serial protocol with separate transmit and receive lines, and
can be used for full5duplex communication. Both sides must be initialized with the same baud rate, otherwise the
data will not be received correctly. RS5232 serial communication is performed through a 95pin SUB5D connector
and the microcontroller UART module. In order to enable this communication, it is necessary to establish a
connection between RX and TX lines on SUB5D connector and the same pins on the target microcontroller using
SW2. Since RS.232 communication voltage levels are different than microcontroller logic levels, it is
necessary to use a RS.232 Transceiver circuit, such as SP232 as shown on Figure 2.12.
Figure 2.12: RS232 Module
In order to connect RS232 Module to the microcontroller you must turn SW1 “OFF” and turn the relevant Bit of
easyAVR128™ Development Board Users Manual
www.LogiFind.com 15
SW2 “ON”. Prior to using The RS232 Module in your application, make sure to disconnect other unused
peripherals, and additional pull5up or pull5down resistors from the interface lines in order not to interfere with
signal/data integrity.
LCD 2x16 characters (Socket)
Liquid Crystal Displays or LCDs are cheap and popular way of representing information to the end user of some
electronic device. Character LCDs can be used to represent standard and custom characters in the predefined
number of fields. The easyAVR128 provides the connector and the necessary interface for supporting 2x16
character LCDs. This type of display has two rows consisted of 16 character fields. Each field is a 7x5 pixel
matrix. Board equips an universal socket allowing you to install 16x2 LCD very easily.
Connector pinout explained
15GND
255V
35Vo,LCD contrast level from potentiometer 16025VOL
45RS,Register Select Signal
55E,Display Enable
65R/W,Determines whether display is in Read or Write mode. It’s always connected to GND, leaving the display
in Write mode all the time.
7~145Data Port,Display is supported in 85bit data mode.
155LED+,Connection with 5V
165LED5,Connection with GND
Figure 2.13: LCD 2x16 characters Socket
IMPORTANT:
Make sure to Place the LCD1602 in the right direction.
Make sure to turn off the power supply before placing LCD onto the board. Otherwise your display can be
permanently damaged.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 16
Figure 2.14: LCD1602 Installing Direction
GLCD 128x64(Socket)
Graphical Liquid Crystal Displays, or GLCDs are used to display monochromatic graphical content, such as text,
images, humanmachine interfaces and other content. The easyAVR128 provides the connector and necessary
interface for supporting GLCD with resolution of 128x64 pixels and proper PINOUTs.It is compatible with the
most popular LCD12864 in the market with KS108 or ST7920 display controller.The example we provide is only
for LCD12864 with ST7920 display controller. easyAVR128 equips an universal socket allowing you to install
128*64 Graphical LCD very easily.
`
Figure 2.15: LCD12864 characters Socket
easyAVR128™ Development Board Users Manual
www.LogiFind.com 17
Connector pinout explained:
15GND
25VCC
35Vo,GLCD contrast level from potentiometer 128645VOL
45RS,Data (High), Instruction (Low) selection
55R/W,Determines whether display is in Read or Write mode.
65E,Display Enable line
7~14,D0–D7,Data lines
155PSB,Parallel/Serial Mode Selection
165NC
175RST
185VEE
195LEDA 5 5V
205LEDK – GND
Figure 2.16: LCD12864 Installing Direction
IMPORTANT:
Make sure to Place the LCD12864 in the right direction.
Make sure to turn off the power supply before placing LCD onto the board. Otherwise your display can be
permanently damaged.
Bootloader Indicator
easyAVR128 equips a LED(BOOT) to indicate the system is forced into Bootload Mode or not. Press Reset
Button, this LED will flash at a high frequency. It mean the microcontroller is in Bootload Mode.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 18
Figure 2.17: Bootloader Indicator
System Reset
easyAVR128 reset circuit is made with 10K pull5up resistor, RESET button connected to GND and a 0.1uF
capacitor for filtering.
Figure 2.18: System Reset
Power Supply Port for DIY
easyAVR128 equips three power supply interface GND,3.3V and 5.0V for DIY.
Figure 2.19: Power Supply Port
easyAVR128™ Development Board Users Manual
www.LogiFind.com 19
Chapter 3: Experiments
Project Name Hardware
Connections
Operations and Experiment Results
24CXX 1.CN2.0—PD0
2.CN2.1—PD1
3.CN2.2—PG4
4.CN15PORTC
Use the LEDs flashing to view the EEPROM’s read/write
state.
adc_1602 1.CN5.0—PF0
2.CN5.1—PF1
3.Install the
LCD1602 display
on the “LCD1602
Socket”
The ADC value will be displayed on the LCD1602 module.
BUZZER CN4.4—PG3 The buzzer will sound like a police car.
ds18b20+ds1302+lcd1602 1.CN2.3—PC0
2.CN2.4—PC1
3.CN2.5—PC6
4.CN5.2—PC7
5.Install the
LCD1602 display
on the “LCD1602
Socket”
The Real Time Clock and Temperature value will be
displayed on the LCD1602 module.
ds1302.seg 1.CN2.3—PC0
2.CN2.4—PC1
3.CN2.5—PC6
4. CN6—PORTA
Real Clock Time will be displayed on the SEG1 and SEG2.
eeprom CN15PORTC Use the LEDs flashing to view the EEPROM’s read/write
state.
INT0 and INT1 1.CN5.3—PD0
2.CN5.4—PD1
3.CN1—PORTC
Press INT0 or INT1 key will trigger an external interrupt,
which cause the LEDs flash in different way.
key 1.CN1—PORTC
2.CN3—PORTB
Different key value will be displayed on the SEG1 and SEG2.
LCD1602 Install the
LCD1602 display
on the “LCD1602
Socket”
Line1:I LOVE AVR!
Line2:Good Luck!
LCD12864 Install the
LCD12864 display
on the “LCD12864
Socket”
Line1:mega128DEV.BOARD
Line2:I LOVE AVR
Line3:NICE TO MEET YOU
Line4:634503119
easyAVR128™ Development Board Users Manual
www.LogiFind.com 20
LED1 CN1—PORTC
LEDs flash and run.
LED2 CN1—PORTC
LEDs flash and run.
LED3 CN1—PORTC
LEDs flash and run.
LED4 CN1—PORTC
LEDs flash and run.
SEG1 CN6—PORTA Number will be displayed on the SEG1 and SEG2.
SEG2 CN6—PORTA Number will be displayed on the SEG1 and SEG2.
stmotor 1.CN4.0—PC0
2.CN4.1—PC1
3.CN4.2—PC2
4. CN4.3—PC3
Install a 5V step motor with on “STEPMOTOR” socket in
proper direction. In this Experiment, we use “28BYJ.48 5V”
step motor, which has ABCD phase and VCC pin.
Timer0_smg CN6—PORTA The timer value will be displayed on the SEG1 and SEG2.
Timer1_smg CN6—PORTA The timer value will be displayed on the SEG1 and SEG2.
Timer2_smg CN6—PORTA The timer value will be displayed on the SEG1 and SEG2.
Timer3_smg CN6—PORTA The timer value will be displayed on the SEG1 and SEG2.
Timer4_smg CN6—PORTA The timer value will be displayed on the SEG1 and SEG2.
USART(7.3728MHz) SW2.2—ON
SW2.4—ON
Connect your board to the PC using a RS232 cable. Run
COM Debug Assistant software and set the Baud Rate as
4800BPS.
Important: In your application, make sure to disconnect other unused peripherals, and additional pull5up or
pull5down resistors from the interface lines in order not to interfere with signal/data integrity.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 21
Chapter 4: Bootloader Self.programming
This application note describes how to use a boot loader application with ATmega128A. We have uploaded a
bootloader application into the ATmega128A.The bootloader application is designed by us for Self5programming
without the need for an external programmer. It make you more easier to update the firmware.
In order to use the bootloader self5programming, it is necessary to make a proper configuration for SW1, show as
the following figure. At the same time, you must turn SW2 off.
Figure 4.1: SW1 Configurations
The following show the steps.
Step1.Instal CP2102 driver
Before you connect your easyAVR128 board to a computer running Microsoft Windows, you should install its
drivers:
Download the CP2102 drivers for Windows from here:
http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
Any details, pls see “Silicon CP2102 SETUP GUIDE.pdf” we provided in CD/DVD rom.
Step2.Run “AVRUBD” software
Figure 4.2
Step3.Go to the Device Manager to see which com port is created
easyAVR128™ Development Board Users Manual
www.LogiFind.com 22
Figure 4.3
Step4. Com Port Setting
Enter Option/Comport to set the correct Com Port,and click “OK”.
Figure 4.4
Step5. Load HEX file
Enter File/Load to load HEX file into the AVRUBD software,and click “Open”.
Figure 4.5
easyAVR128™ Development Board Users Manual
www.LogiFind.com 23
Step6. Start to Program
Press RESET key to force the AVR device into the bootloader MODE, and then you will see the BOOT led
blinking with about 3Hz frequency. At this time,the AVR device will stay in bootloader MODE within 4s.During
this time, you can enter Operation/Download or press F9 key(PC) or click to start to download HEX file.
Figure 4.6
After downloading is finished, the application program will be running.If you want to upload the new HEX file,
you have to press RESET key again to enter bootloader MODE.
PS:Sometimes an unknown error may occur when programming is finished,but it dosen’t affect the normal
running of the program.
Figure 4.7
Fuse Settings for Mega128A
The following fuse setting in AVRStudio has been made by factory, which ensure the bootloader can run properly.
easyAVR128™ Development Board Users Manual
www.LogiFind.com 24
Figure4.8
Figure 4.9
easyAVR128™ Development Board Users Manual
www.LogiFind.com 25
Contact Us
ebay Store 1: http://stores.ebay.com/logifind
ebay Store 2: http://stores.ebay.com/kitfind
ebay Store 3: http://stores.ebay.com/opendiy
LogiFind International CO,LTD
Address:Room 606,B# of Nanguo Building,NO.16,Zhuxi South Road,Nanning,Guangxi,P.R.China
Skype:love100mhz
E5MAIL:[email protected]
Website:www.LogiFind.com
Mobile:(86)15978193886
Disclaimer
© 2013 LogiFind International CO,. Ltd. All rights reserved. LogiFind®, logo and combinations thereof, are
registered trademarks of LogiFind International CO,. Ltd. Other terms and product names may be trademarks of
others.
The information in this document is provided in connection with LogiFind products. No license, express or
implied or otherwise, to any intellectual property right is granted by this document or in connection with the sale
of LogiFind products.Neither the whole nor any part of the information contained in or the product described in
this document may be adapted or reproduced in any material from except with the prior written permission of the
copyright holder.The product described in this document is subject to continuous development and improvements.
All particulars of the product and its use contained in this document are given by LogiFind 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. LogiFind
International CO,. Ltd.shall not be liable for any loss or damage arising from the use of any information in this
document or any error or omission in such information or any incorrect use of the product.