Easyavr v7 Manual v101
Easyavr v7 Manual v101
Easyavr v7 Manual v101
v7
USER'S GUIDE
65
microcontrollers supported Supports 3.3V and 5V devices Easily add extra boards Four connectors for each port As fast as it gets
The ultimate AVR® board Dual Power Supply mikroBUS™ sockets Amazing Connectivity USB 2.0 programmer
To our valued customers
Making the best and the most comprehensive AVR® board in the world was our idea from the start. And this
is by no means an easy task. Driven by passion for excellence we never look at how hard the job is, but what
our users get when it's done. And EasyAVR® v7 brings a whole new perspective to AVR developers.
The 7th generation of the board brings many exciting new features. We hope that you will like it as much as
we do.
Nebojsa Matic,
Owner and General Manager
of mikroElektronika
Introduction Connectivity
Table of contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input/Output Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
18
page 3
Introduction
introduction
EasyAVR™ is your old friend. It has been here for you for several generations.
Today it has many users among students, hobbyists, enthusiasts and
professionals. We asked ourselves what else could be done to make such
a great board even greater. As a result some brilliant changes have been
made. We focused all of our creativity and knowledge on making a
revolutionary new design different from any previous version of the
board. We have gone through the process of fine tuning the board
performance, and used 4-layer PCB to achieve maximum efficiency. We
now present you with the new version of EasyAVR - a powerful, well
organized board with on-board programmer - ready to be your strong
ally in development.
Four Connectors for each port Everything is already here 3.3V and 5V power supply For easier connections
Amazing connectivity mikroProg on board
™
Dual Power Supply mikroBUS support
™
EasyAVR™ v7 is all about Powerful on-board mikroProg™ EasyAVR™ v7 is among few Just plug in your Click™ board,
connectivity. Having four programmer can program about development boards which and it’s ready to work. We
different connectors for 65 AVR® microcontrollers support both 3.3V and 5V picked up a set of the most
each port, you can connect from Atmel®. You will need it, microcontrollers. This feature useful pins you need for
accessory boards, sensors and whether you are a professional greatly increases the number of development and made a
your custom electronics easier or a beginner. supported MCUs. It’s like having pinout standard you will
then ever before. two boards instead of one! enjoy using.
EasyAVR
v7
page 4
It's good to know
introduction
ATmega32 is the default microcontroller! System Specification
Atmel® AVR® 8-bit ATmega32 in DIP is the default chip of - Great choice for both beginners power supply
and professionals 7–12V AC or 9–15V DC
EasyAVR v7. It has up to 16 MIPS operation, 32K bytes of
™
or via USB cable (5V DC)
Flash program memory, 2K byte of internal SRAM memory - Rich with modules
and 1K byte of EEPROM memory. It has 40-pin with 32 - Enough RAM and Flash power consumption
General purpose I/O pins, 10-bit Analog-to-Digital converter - Comes with examples for ~80mA when all peripheral
with up to 8 channels (ADC), two 8-bit and one 16-bit mikroC, mikroBasic and modules are disconnected
Package contains
ILERS
• • • • • • • •
COMP
• MIK
ROC
• •
• , MI
KRO
• • BA
• • SIC
• • ,M
RE IK
WA RO
FT PA
L SO SC
AL
NA CO
IO
M
DI
PI
AD
PRODUCT DVD
LE
RS
•
•
•
•
•
•
•
•
• •
• •
• •
• •
• •
S
PLE
DRI
www.mikroe.com
EXAM
VER
www.libstock.com
We
S
present you
with a comp
• • • •
BOARDS • • • • • • • • •
to make electr lete color schem
onics more atics for EasyP
understand IC ™ v7 devel
• • • • •
most used able, even
SMD comp for absolu opment board
what your onents, and te beginners, . We wante
board is consis made additi so we provid d
onal comm
PROGRAMM
ted of, and ents and drawi ed photos
how it actua ngs so you of
lly works. can get to
know
SSORY
ERS A
ACCE
ND D
•
EBU
• •
• •
GG
ER
• •
S
• •
• •
S
TIC
• •
•
MA
•
•
•
HE
•
Copyright ©2012 Mikroelektronika.
M
All rights reserved. MikroElektronika, MikroElektronika logo and other
IK
RO
SC MikroElektronika trademarks are the property of MikroElektronika.
M
ED
All other trademarks are the property of their respective owners.
• IA
•
• BO
Unauthorised copying, hiring, renting, public performance
•
•• AR
• • and broadcasting of this DVD
DS
S• • •
RD is strictly prohibited.A • •
••
MAN BO • •
NT •
UALS PME
• • •• • • • • • D
EVELO
1 Damage resistant 2 EasyAVR™ v7 board in 3 USB cable 4 User Manuals and 5 DVD with examples
protective box antistatic bag Board schematic and documentation
EasyAVR
v7
page 5
Dual power supply
power supply
REG1
VCC-USB VCC-BRD VCC-5V 1
GND
2
Vout VCC-3.3V
3
FP1
AVCC POWER VCC-5V Vin
FP2 LD41 C26 E8
CN1 MC33269DT3.3
10uF
100nF
C30 100nF
C31 100nF
C32 100nF
C27 10uF
R45 E9
VCC 1 100nF
2K2 10uF
2
E6
3
C3
100nF GND 4
AVCC 3.3V VOLTAGE REGULATOR
VCC-BRD
USB
SWITCH1
VCC-5V VCC-3.3V
J5
VCC-5V
D1 D2
3
2
1
220uF/35V/LESR
C28 R54
E11
R56
20K
5V SWITCHING POWER SUPPLY
EasyAVR
v7
page 6
power supply
EasyAVR™ v7 development board supports both Power supply: via DC connector or screw terminals
3.3V and 5V power supply on a single board. (7V to 12V AC or 9V to 15V DC),
This feature enables you to use wide range of or via USB cable (5V DC)
peripheral boards. Power capacity: up to 500mA with USB, and up to 1500mA
with external power supply
2. Using adapter 3 4
Set J22 jumper
to EXT position
EasyAVR
v7
page 7
Supported microcontrollers
supported MCUs
DIP20A
Microcontroller sockets PB0 1
SKT3
DIP40A VCC-BRD
40 RST_PA2
VCC-BRD
1
SKT2
20
VCC-BRD
provided on the board. Which of these sockets you will use depends solely on PD2
PD3
12
13
29
28
PE2
PC7
DIP SKT 20A
the pinout of the microcontroller in use. The EasyAVR™ v7 development system PD4
PD5
14
15
27
26
PC6
PC5
DIP20B AVCC
comes with the ATmega32 microcontroller in a DIP40 package. PD6
PD7
16
17
25
24
PC4
PC3 MOSI_PB0 1
SKT5
20 PA0
18 23 PC2 MISO_PB1 2 19 PA1
CLK 19 22 PC1 SCK_PB2 3 18 PA2
20 21 PC0 PB3 4 17 PA3
AREF jumper
5 16
DIP SKT 40A 6 15
CLK_PB4 7 14 PA4
PB5 8 13 PA5
PB6 9 12 PA6
If you use DIP28 microcontroller socket with jumper J11 you can set PC7 pin VCC-BRD
DIP40B AVCC
RST_PB7 10 11 PA7
J17
Figure 4-1: Schematic of on-board DIP sockets, quartz-crystal oscillator and decoupling capacitors
EasyAVR
v7
page 8
How to properly place your microcontroller into the DIP socket?
supported MCUs
1 2 3
Figure 4-2: Place both ends of microcontroller on Figure 4-3: with both fingers, evenly distribute Figure 4-4: Properly placed microcontroller will
the socket so the pins are aligned correctly the force and press the chip into the socket. have equally leveled pins.
Before you plug the microcontroller into the a half circular cut in the microcontroller DIP packaging all the pins match the socket as shown in Figure 4-3.
appropriate socket, make sure that the power matches the cut in the DIP socket. Place both ends of Check again if everything is placed correctly and press
supply is turned off. Images above show how to the microcontroller into the socket as shown in Figure the microcontroller until it is completely plugged into
correctly plug a microcontroller. First make sure that 4-2. Then put the microcontroller slowly down until the socket as shown in Figure 4-4.
IMPORTANT: Only one microcontroller may be plugged into the development board at the same time.
Figure 4-5: Position of Figure 4-6: Position of Figure 4-7: Position of Figure 4-8: Position of Figure 4-9: Position of Figure 4-10: Position of
the jumpers for DIP40x the jumpers for DIP28 the jumpers for DIP20A the jumpers for DIP20B the jumpers for DIP14 the jumpers for DIP8
AVR microcontrollers can use either built-in (internal) or quartz-crystal external clock for quartz-crystal depends on the maximum clock frequency allowed and your application
the purpose of providing clock signal source. The EasyAVR™ v7 contains one quartz- as well. You can always replace the default 8MHz crystal with another one. If you want to
crystal socket for all microcontroller sockets. DIP40A and DIP40B sockets are directly use microcontrollers in DIP40A and DIP40B packages, it is necessary to place jumpers
connected to quartz-crystal socket unlike DIP28, DIP20A, DIP20B, DIP14 and DIP8 J13-J17 into the I/O position, Figure 4-5.The position of jumpers for DIP28, DIP20A,
sockets which are connected to it through the pin jumpers (J13-J17). The value of the DIP20B, DIP14 and DIP8 sockets is shown in Figure 4-6 to Figure 4-10.
EasyAVR
v7
page 9
On-board programmer
programming
What is mikroProg™?
mikroProg™ is a fast USB 2.0 programmer. Smart engineering allows mikroProg™
to support about 65 AVR® microcontrollers from Atmel® in a single programmer!
Outstanding performance and easy operation are among it's top features.
How do I start?
In order to start using mikroProg™ and program your microcontroller, you just have to
follow two simple steps:
RESET or I/O?
Reset selection jumpers J6, J7, J8, J9, and J10 are used to set PC6, PA2, PB7, PB3
or PB5 pin either as RST or I/O pin, respectively. Each of the pins belongs to different
Programming with JTAGICE mkll programmer socket. For example, if you want to use PC6 pin (DIP28 socket) as I/O pin place
jumper into the PC6 position. Other jumpers must be in RST position. For DIP40A
EasyAVR™ v7 is equipped with JTAG connector compatible with Atmel® AVR® and DIP40B sockets, all the reset selection jumpers must be in RST position.
JTAGICE mkII external programmer. You can use either the on-board mikroProg™
programmer or external programmer at the time. Place your programmer cable NOTE: Before using the programmer, make sure that reset selection
onto connector CN6, as shown in image. jumpers J6, J7, J8, J9, and J10 are placed into the mRST position for
all sockets.
EasyAVR
v7
page 10
programming
VCC-BRD VCC-5V
VCC-USB
VCC-3.3V VCC-5V
VCC-5V
VCC-BRD
FP1
LD2 LD1 LD3 CN1
R8 R9 R10 VCC 1
LED-DATA
2K2 4K7 6K8 LED-ACTIVE
USB-PROG_N D- 2
LED-DATA LED-LINK USB-PROG_N
LED-ACTIVE
USB-PROG_P D+ 3
LED-LINK USB-PROG_P
GND 4
C3
100nF
USB
GND
VCC-BRD
SCK_MOSI_PB5
PC2 R20 TCK
MISO_PA5
MOSI_PA6
MISO_PB1
MOSI_PB0
MISO_PB4
MOSI_PB3
MISO_PB6
MCU_RST
BTN_RST
SCK_PA4
SCK_PB2
SCK_PB7
PC4 R22 TDO
PC3 R24 TMS mRST PA4
PA5
PA6
PB2
PB1
PB0
PB5
PB4
PB3
PB7
PB6
PC5 R25 TDI
CN6
SCK_MOSI_PB5
AVR JTAG
MISO_PA5
MOSI_PA6
MISO_PB1
MOSI_PB0
MISO_PB4
MOSI_PB3
MISO_PB6
BTN_RST
SCK_PA4
SCK_PB2
SCK_PB7
mRST
PA4
PA5
PA6
PB2
PB1
PB0
PB5
PB4
PB3
PB7
PB6
mRST
mRST
mRST
mRST
mRST
PC6
VCC-5V
PA2
PB7
PB3
PB5
R21
10K
T9
BTN_RST
J6 J7 J8 J9 J10
RST_PC6
RST_PA2
RST_PB7
RST_PB3
RST_PB5
C5
100nF
RESET SELECTION
EasyAVR
v7
page 11
Installing programmer drivers
programming
COMP
• MIK
ROC
• • , MI
• • KRO
• • BA
• • • SIC
,M
RE IK
WA RO
FT PA
L SO SC
AL
NA CO
IO
T
M
DI
PI
AD
PRODUCT DVD
LE
RS
•
•
•
•
•
•
•
•
• •
• •
• •
• •
• •
DVD://download/eng/software/
S
PLE
DRI
www.mikroe.com
EXAM
VER
www.libstock.com
S
• • • •
BOARDS • • • • • • • • •
development-tools/avr/avrprog2/
PROGRAMM • • • • •
SSORY
avrprog2_drivers_v200.zip
ERS A
ACCE
ND D
•
EBU
• •
• •
GG
ER
• •
S
• •
• •
S
TIC
• •
•
MA
•
•
•
HE
RO
SC MikroElektronika trademarks are the property of MikroElektronika.
M
ED
All other trademarks are the property of their respective owners.
• IA
•
• BO
Unauthorised copying, hiring, renting, public performance
•
D!
•• AR
ai
• • and broadcasting of this DVD
DS
DV
Av
S• • •
RD is strictly prohibited.A • •
••
MAN BO • •
lab
NT •
UALS PME
• • •• • • • • • D
EVELO
le on Product
When you locate the drivers, please
extract files from the ZIP archive. Folder with extracted
files contains sub folders with drivers for different
operating systems. Depending on which operating system
you use, choose adequate folder and open it.
EasyAVR
v7
page 12
Programming software
programming
AVRFlash software
Installation wizard - 6 simple steps
On-board mikroProg™ programmer requires special programming software called
AVRFlash. This software is used for programming AVR® microcontrollers from
Atmel®. Software has intuitive interface and SingleClick™ programming technology.
To begin, first locate the installation archive on the Product DVD: • •
• • COMP
ILERS
• • • • • • • •
• MIK
ROC
, MI
KRO
• • BA
• • • SIC
,M
RE IK
WA RO
FT PA
L SO SC
AL
NA CO
IO
T
M
DI
PI
AD
PRODUCT DVD
LE
RS
•
•
•
•
•
•
•
•
• •
• •
• •
• •
• •
S
PLE
DRI
www.mikroe.com
DVD://download/eng/software/development-tools/avr/avr-
EXAM
VER
www.libstock.com
S
• • • •
BOARDS • • • • • • • • •
• • • • •
prog2/avrprog2_programmer_v214.zip
PROGRAMM
SSORY
ERS A
ACCE
ND D
•
EBU
• •
• •
GG
ER
• •
S
• •
• •
S
TIC
• •
•
MA
•
•
•
HE
RO
SC MikroElektronika trademarks are the property of MikroElektronika.
M
ED
All other trademarks are the property of their respective owners.
• IA
•
• BO
Unauthorised copying, hiring, renting, public performance
•
•• AR
D!
ai
DS
RD is strictly prohibited. A • •
••
MAN BO • •
NT •
PME
lab
UALS EVELO
• • •• • • • • • D
le on Product
executable setup file, to start installation.
Step 1 - Start Installation Step 2 - Accept EULA and continue
EasyAVR
v7
page 13
UART via RS-232
communication
U3
1 16 E2
C1+ VCC
10uF
1
2 15 1
RX-232 C11 V+ GND
CONNECTOR
6
6
100nF
3 14 2
RX-FTDI C1- T1OUT
RS-232
7
J23 RX PD0 4 13 3
O
N
C2+ R1IN
1 2 3 4 5 6 7 8
TX PD1 8
C20
PD2 5 12 4
100nF C2-C2- R1OUT
PD3 9
6 11 5
V- V- T1IN
9
5
7 10
T2OUT T2IN
TX-232 8 9
R2IN R2OUT
SW10
TX-FTDI MAX3232 DB-9
C21 C22
J12
100nF 100nF
VCC-BRD
R35
100K
TX-232
RX-232
Figure 6-1: RS-232 connection schematic
EasyAVR
v7
page 14
UART via USB
communication
Modern PC computers, laptops and notebooks are
no longer equipped with RS-232 connectors and
Enabling USB-UART UART controllers. They are nowadays replaced with
USB connectors and USB controllers. Still, certain technology
enables UART communication to be done via USB connection.
FT232RL from FTDI® convert UART signals to the appropriate USB
standard. In order to use USB-UART module on EasyAVR™ v7, you must
first install FTDI drivers on your computer. Drivers can be ILERS
• • • • • • • •
COMP
• MIK
ROC
M
DI
PI
AD
PRODUCT DVD
LE
RS
•
•
•
•
•
•
•
•
• •
• •
• •
• •
• •
S
PLE
DRI
www.mikroe.com
EXAM
DVD://download/eng/software/development-tools/
VER
www.libstock.com
S
• • • •
BOARDS • • • • • • • • •
• • • • •
universal/ftdi/vcp_drivers.zip
PROGRAMM
In order to enable USB-UART
SSORY
ERS A
ACCE
ND D
•
EBU
• •
• •
GG
ER
• •
• •
S
TIC
• •
•
MA
•
•
•
HE
•
Copyright ©2012 Mikroelektronika.
M
All rights reserved. MikroElektronika, MikroElektronika logo and other
IK
RO
SC MikroElektronika trademarks are the property of MikroElektronika.
M
ED
All other trademarks are the property of their respective owners.
• IA
•
• BO
Unauthorised copying, hiring, renting, public performance
•
D!
•• AR
and J12 jumpers in the USB-UART ai USB-UART communication is being done through
• • and broadcasting of this DVD
DS
DV
S•
Av
• •
RD is strictly prohibited. A • •
••
MAN BO • •
NT
lab
•
UALS PME
• • •• • • • • • D
EVELO
le on Product
position, and enable desired RX a FT232RL controller, USB connector (CN4), and
and TX lines via SW10 DIP switch. microcontroller UART module. To establish this connection,
For example, if you want to enable you must put J23 and J12 jumpers in the USB-UART
USB-UART connection on UART position, and connect RX and TX lines to the
module of the default ATmega32 appropriate pins of the microcontroller.
chip, you should enable SW10.1 This connection is done using DIP
(RD0) and SW10.2 (RD1) lines. switch SW10.
C1 C2 E1
R57 100nF 100nF 10uF
RX-232 100K VCC-BRD VCC-5V VCC-BRD VCC-BRD
CN4
RX-FTDI
CONNECTOR
R15 R16
USB UART I
U1 VCC 1
J23 RX PD0
O
N
EasyAVR
v7
page 15
mikroBUS sockets ™
connectivity
1 2 3
VCC-3.3V 3.3V 5V VCC-5V VCC-3.3V 3.3V 5V VCC-5V VCC-3.3V 3.3V 5V VCC-5V
Reset and Chip Select. Pinout contains two power GND GND GND GND GND GND
DATA BUS
SCK SCK2 PB5 SCL SCL4 PB2
O
N
O
N
SPI SELECTION
O
N
DIP20A DIP28
DIP20B
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
I2C SELECTION
SPI and I2C interface. In order to connect the SPI and MOSI MOSI2 PB3 SCK SCK4 PA4 DIP14 SCL3 PC0
DIP40B
SPI SELECTION
SCK1 PB7 MISO MISO4 PA5 SDA3 PC1
DIP40A
DIP40B
I2C pins of the mikroBUS™ with the desired socket, you MISO1
MOSI1
PB6
PB5
MOSI MOSI4
SCK3
PA6
PB2
SCL2
SDA2
PC5
PC4 DIP28
DIP20B
have to change appropriate SW3, SW5 or SW6 DIP MISO3 PB1 SCL1 PA4
DIP8
EasyAVR
v7
page 16
connectivity
WiFi PLUS click™ GSM2 click™ GPS2 click™ RELAY click™ THERMO click™
PORT headers, PORT buttons and PORT LEDs are next to each
other, and grouped together. It makes development easier, and the entire
EasyAVR™ v7 cleaner and well organized. We have also provided an additional
Figure 9-1: I/O group contains PORT headers, tri-state pull
PORT headers on the left side of the board, so you can access any pin you want
up/down DIP switch, buttons and LEDs all in one place
from both sides of the board.
Tri-state DIP switches, like SW1 on Figure 9-2, are used DATA BUS
to enable 4K7 pull-up or pull-down resistor on any desired
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
port pin. Each of these switches has three states: PB0
1
4k7 PB1
1. middle position disables both PB0 PB1 PB0 PB1 PB0 PB1 PB2
2
3
PB2 PB3 PB2 PB3 PB2 PB3 PB3
pull-up and pull-down feature from UP
+1 2 3 4 5 6 7 8
PB4 PB5 PB4 PB5 PB4 PB5 PB4
4
5
PULL PB6 PB7 PB6 PB7 PB6 PB7 PB5
the PORT pin DOWN PB6
6
_ VCC-BRD VCC-BRD VCC-BRD 7
2. up position connects the resistor SW4 CN9 CN10 CN27
PB7
8
VCC-BRD 9
in pull-up state to the selected pin VCC-BRD
10
CN11
3. down position connects the
Figure 9-2: Tri-state resistor in pull-down state to the
DIP switch on PORTB selected PORT pin.
O
N
1
2
PORTB_LED
6
+1 2 3 4 5 6 7 8
PB2
PB1
PB0
PB7
PB6
PB5
PB4
PB3
VCC
8
J1 J2
SW10
GND
_
PB6
PB5
PB4
PB3
PB2
PB1
PB0
PB7
PORTB_LEVEL
Figure 9-3: Schematic of the single I/O group connected to microcontroller PORTB
EasyAVR
v7
page 18
connectivity
Headers Buttons
With enhanced connectivity as one of the key features The logic state of
LEDs LED (Light-Emitting
of EasyAVR v7, we have provided three connection all microcontroller PA0 Diode) is a highly
headers for each PORT. I/O PORT group contains two digital inputs PA1 efficient electronic
PA2
male IDC10 headers (like CN9 and CN10 on Figure may be changed light source. When
PA3
9-3). These headers are all compatible with over 70 using push connecting LEDs, it
Figure 9-5: Button press
mikroElektronika accessory boards, and enable simple buttons. Tri-state Microcontroller is necessary to place
level DIP switch (tri-state)
connection. There is one more IDC10 header available DIP switch SW1 SMD resistor a current limiting
on the left side of the board, next to the section with is available for selecting which logic state will be applied limiting current resistor in series
displays. I/O PORT group also contains 1x10 connection to corresponding MCU pin when button is pressed, for through the LED so that LEDs are
pad (like CN11 on Figure 9-3) which can be used for each I/O port separately. If you, for example, place SW1.2 provided with the
connecting mikroElektronika PROTO boards, or custom in VCC position, then pressing any of push buttons in current value specified by the manufacturer. The current
user boards. PORTB I/O group will apply logic one to the appropriate varies from 0.2mA to 20mA, depending on the type of the
microcontroller pin. The same goes for GND. If DIP switch LED and the manufacturer.. The EasyAVR™ v7 board uses
is in the middle position neither of two logic states will low-current LEDs with typical current consumption of
be applied to the appropriate microcontroller pin. You 0.2mA or 0.3mA, depending of VCC voltage selection.
can disable pin protection 220ohm resistors by placing Board contains 35 LEDs
jumpers J1 and J2, which will connect your push buttons which can be used for
directly to VCC or GND. Be aware that doing so you may visual indication of the
accidentally damage MCU in case of wrong usage. logic state on PORT pins.
An active LED indicates
that a logic high (1) is
Reset Button present on the pin. In order
to enable PORT LEDs, it
In the far upper right section of the is necessary to enable
Figure 9-6: SW10.5
board, there is a RESET button, which the corresponding DIP
through SW10.8
Figure 9-4: IDC10 male headers enable easy can be used to manually reset the switches on SW10 (Figure
switches are used to
connection with mikroElektronika accessory boards microcontroller. 9-6).
enable PORT LEDs
EasyAVR
v7
page 19
LCD 2x16 characters
displays
O
N
1
BCK PWM PD5
VCC-5V R/W - Determines whether display is in Read or Write mode. It’s
2
P2
3
always connected to GND, leaving the display in Write mode all
4
the time.
5
6
D0–D3 - Display is supported in 4-bit data mode, so lower half of
7
8
10K
SW3
the data byte interface is connected to GND.
R32 VCC-BRD D4–D7 - Upper half of the data byte
VCC-5V
56
Q5
BC846 R36 DATA BUS LED+ - Connection with the back-light LED anode
PD6
PC4
PC5
PC6
PC7
4K7
GND
GND
GND
GND
GND
GND
D0
RS
D1
D2
D3
D4
D5
D6
D7
Vdd
Vee
E
R/W
A
K
IMPORTANT: In order to use PWM back-light both SW3.1 and SW3.2 switches must
be enabled at the same time.
EasyAVR
v7
page 20
GLCD 128x64
displays
Graphical Liquid Crystal Displays, or GLCDs are used to display Display connector is routed to PB0, PB1, PA2,
monochromatic graphical content, such as text, images, human- PA3, PD6, PD7 (control lines) and PORTC (data
machine interfaces and other content. EasyAVR™ v7 provides lines) of the microcontroller sockets. Since the
the connector and necessary interface for supporting GLCD with same ports are used by 2x16 character LCD display,
resolution of 128x64 pixels, driven by the KS108 or compatible you cannot use both displays simultaneously. You
display controller. Communication with the display module is can control the display contrast using dedicated
done through CN16 display connector. Board is fitted with potentiometer P4. Full brightness display back light
uniquely designed plastic display distancer, which allows the can be enabled with SW3.1 switch, and PWM-driven
GLCD module to perfectly and firmly fit into place. back light with SW3.2 switch.
DATA BUS
SW3 VCC-5V
BCK LIGHT
O
N
Figure 11-1: GLCD 128x64
1
BCK PWM PD5
2
connection schematic
3
4
5
6
P4
7
8
10K
Connector pinout explained
R34 VCC-BRD
Q5 CS1 and CS2 - Controller Chip Select lines E - Display Enable line
20 R36
BC846
1K VCC - +5V display power supply D0–D7 - Data lines
GLCD BCK PWM
VCC-5V
PD6
PD7
PB0
PB1
PA2
PA3
PC0
PC1
PC2
PC3
PC4
PC5
PC6
PC7
R37
GND - Reference ground RST - Display reset line
4K7
Vo - GLCD contrast level from potentiometer P4 Vee - Reference voltage for GLCD contrast
RS - Data (High), Instruction (Low) selection line potentiometer P3
R/W - Determines whether display is in Read or LED+ - Connection with the back-light LED anode
CN16
GLCD-TFT SOCKET2
Write mode. LED- - Connection with the back-light LED cathode
1 20
LED-
CS1
CS2
D0
D1
D2
D3
D4
D5
D6
D7
Vo
RS
Vcc
LED+
GND
R/W
Vee
E
RST
IMPORTANT: In order to use PWM back-light both SW3.1 and SW3.2 switches must
be enabled at the same time.
EasyAVR
v7
page 21
Touch panel controller
displays
Touch panel is a glass panel whose surface is EasyAVR™ v7 is equipped with touch panel controller
covered with two layers of resistive material. When and connector for 4-wire resistive touch panels. It
the screen is pressed, the outer layer is pushed can very accurately register pressure at a specific point,
onto the inner layer and appropriate controllers can representing the touch coordinates in the form of analog
measure that pressure and pinpoint its location. This voltages, which can then be easily converted to X and Y
is how touch panels can be used as an input devices. values. Touch panel comes as a part of display.
1 2 3
Figure 12-1: Put Touch panel flat cable in Figure 12-2: Use a tip of your finger Figure 12-3: Now place GLCD with
the connector to push it inside Touch panel into GLCD socket
BOTTOM
LEFT
CN16 VCC-BRD
GLCD-TFT SOCKET2
1 20
LED-
CS1
CS2
Vo
RS
D0
D1
D2
D3
D4
D5
D6
D7
Vcc
LED+
GND
R/W
Vee
E
RST
Q6 R38
BC856 1K
R40
RIGHT
10K Q13
BC846
R41
Enabling Touch panel
10K VCC-BRD
VCC-BRD
Q9 R43
Touch panel is enabled using SW8.5,
BC856
SW8.6, SW8.7 and SW8.8 switches.
1K
R44 DRIVEA
TOP
10K
They connect READ-X and READ-Y lines
CN20
LEFT
Q10
VCC-BRD of the touch panel with PA0 and PA1
analog inputs, and DRIVEA and DRIVEB
BC846
C24 E7
R46 R47
10uF
100nF 10K
TOP
RIGHT
VCC-BRD
BOTTOM
Q11
BC846
R52
1K
disconnect other peripherals, LEDs and
additional pull-up or pull-down resistors
C33
Figure 12-5: Turn on switches
R55 R53 DRIVEB
100K
DATA BUS
O
N
100nF 10K
1
PA0 BOTTOM
interfere with signal/data integrity. Touch panel controller
5
PA1 LEFT
controller and connection
6
PA2 DRIVEA
7
PA3 DRIVEB
8
schematic SW8
EasyAVR
v7
page 22
4 digit
displays
7-seg display
One seven segment digit consist of 7+1 which is used to enable the digit
LEDs which are arranged in a specific to which the data is currently being Enabling the display
formation which can be used to represent sent. By multiplexing data through all
digits from 0 to 9 and even some letters. four segments fast enough, you create To enable digit select lines for the 4-digit
One additional LED is used for marking an illusion that all four segments are in 7-segment display you have to turn
the decimal dot, in case you want to operation simultaneously. on SW8.1, SW8.2, SW8.3 and SW8.4
write a decimal point in the desired switches. Digit select lines are connected
segment. EasyAVR™ v7 contains four of This is possible because human eye has to PA0 – PA3 pins on the microcontroller
these digits put together to form 4-digit a slower reaction time than the mention sockets, while data lines are connected to
7-segment display. Driving such a display changes. This way you can represent PC0 – PC7 pins. Make sure to disconnect
is done using multiplexing techniques. numbers in decimal or hexadecimal form. other peripherals from the interface lines
Data lines are shared between segments, Eight data lines that are common for all in order not to interfere with signal/data Figure 13-1: Turn on switches
and therefore the same segment LEDs in the digits are connected to PORTC, and integrity. 1 through 4 on SW8 to enable
each digit are connected in parallel. Each digit select lines are connected to PA0– 4-digit 7-seg display
digit has it’s unique digit select line, PA3 lines on the microcontroller sockets.
COM3
COM2
COM1
COM0
SEG G
SEG F
SEG G
SEG G
SEG G
SEG F
SEG F
SEG F
SEG B
SEG B
SEG B
SEG A
SEG A
SEG B
SEG A
SEG A
COM1 COM3
10
10
10
10
R27 R14
9
8
7
6
9
8
7
6
9
8
7
6
9
8
7
6
DIS1 DIS3
b
b
g
g
f
f
cc
cc
cc
cc
a
10K 10K
Q3 Q1 DIS0 PA0 PC0 R1 470 seg A
O
N
BC846 BC846
1
DIS1 PA1 PC1 R2 470 seg B
2
DIS2 PA2 PC2 R3 470 seg C
3
DIS3 PA3 PC3 R4 470 seg D
4
PC4 R5 470 seg E
COM0 COM2
5
PC5 R6 470 seg F
6
PC6 R7 470 seg Q
7
PC7 R11 470 seg DP
dp
dp
dp
dp
d
e
e
c
8
10K 10K
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
SW8
Q4 Q2
SEG DP
SEG DP
SEG DP
SEG DP
SEG D
SEG D
SEG D
SEG D
SEG C
SEG C
SEG C
SEG C
SEG E
SEG E
SEG E
SEG E
BC846 BC846
DATA BUS
EasyAVR
v7
page 23
DS1820 - Digital
modules
Temperature Sensor
DS1820 is a digital temperature of 750ms for the DS1820 to calculate sensors can be connected on the same
sensor that uses 1-wire® temperature with 9-bit resolution. line. All slave devices by default have
interface for it’s operation. It is 1-wire® serial communication enables a unique ID code, which enables the
capable of measuring temperatures data to be transferred over a single master device to easily identify all
within the range of -55 to 128°C, communication line, while the process devices sharing the same interface.
and provides ±0.5°C accuracy for itself is under the control of the master EasyAVR™ v7 provides a separate socket
temperatures within the range of -10 to microcontroller. The advantage of (TS1) for the DS1820. Communication
85°C. It requires 3V to 5.5V power supply such communication is that only one line with the microcontroller is connected
for stable operation. It takes maximum microcontroller pin is used. Multiple via jumper J18.
C12
100nF
DATA BUS
connected placed in connected connected
socket to PB4 pin to PA7 pin VCC-BRD
DQ
DQ R31
EasyAVR™ v7 enables you to establish 1-wire® communication between DS1820 VCC
and the microcontroller via PB4 or PA7 microcontroller pins. The selection of either
1K
of those two lines is done using J18 jumper. When placing the sensor in the socket
make sure that half-circle on the board’s silkscreen markings matches the rounded
part of the DS1820 sensor. If you accidentally connect the sensor the other way, it
may be permanently damaged. Make sure to disconnect other peripherals (except
Figure 14-5: J18
1-wire), LEDs and additional pull-up or pull-down resistors from the interface lines PA7
DS1820
in order not to interfere with signal/data integrity.
connected
to PB4 pin PB4
EasyAVR
v7
page 24
LM35 - Analog
modules
Temperature Sensor
The LM35 is a low-cost precision obtain convenient Centigrade scaling. a separate socket (TS2)
integrated-circuit temperature sensor, It has a linear +10.0 mV/°C scale factor for the LM35 sensor in
whose output voltage is linearly and less than 60 μA current drain. As it TO-92 plastic packaging.
proportional to the Celsius (Centigrade) draws only 60 μA from its supply, it has Readings are done with
temperature. The LM35 thus has an very low self-heating, less than 0.1°C microcontroller using single
advantage over linear temperature in still air. EasyAVR™ v7 enables you analog input line, which is
sensors calibrated in ° Kelvin, as the to get analog readings from the LM35 selected with jumper J19. Jumper
user is not required to subtract a large sensor in restricted temperature range connects the sensor with either PA7
constant voltage from its output to from +2ºC to +150ºC. Board provides or PB4 microcontroller pins.
Figure 15-1: Figure 15-2: Figure 15-3: Figure 15-4: DATA BUS
LM35 not LM35 placed LM35 LM35
VCC
connected in socket connected connected
to PB4 pin to PA7 pin VOUT
100
R33
C23
GND 100nF
EasyAVR™ v7 enables you to get analog readings from the LM35 sensor using
VOUT
PA7 or PB4 microcontroller pins. The selection of either of those two lines
is done using J19 jumper. When placing the sensor in the socket make sure
that half-circle on the board’s silkscreen markings matches the rounded part of
the LM35 sensor. If you accidentally connect the sensor the other way, it can J19
be permanently damaged and you might need to replace it with another one.
Figure 15-5:
During the readings of the sensor, make sure that no other device uses the PB4
LM35
selected analog line, because it may interfere with the readings.
connected
PA7 to PA7 pin
EasyAVR
v7
page 25
ADC inputs
modules
VCC-BRD
PB0 P1
Figure 16-1: use J3 and J4 jumpers to
PB2
PD6 R17 connect analog input lines
PB4 220
PB5 In order to connect the output of the
PC3 10K
potentiometer P1 to PB0, PB2, PD6,
DATA BUS J3 C4
PB4, PB5 or PC3 analog microcontroller
100nF
VCC-BRD inputs, you have to place the jumper J3
PB1 P3 in the desired position. If you want to
Figure 16-2: PB3
R29 connect potentiometer P3 to any of the
PD7
Schematic of ADC PB1, PB3, PD7, PC4, PA5 or PA6 analog
PC4 220
input PA5 microcontroller inputs, place jumper J4
PA6 10K in the desired position. By moving the
J4 C10 potentiometer knob, you can create
100nF
voltages in range from GND to VCC-BRD.
EasyAVR
v7
page 26
I C EEPROM
2
modules
EEPROM is short for Electrically Erasable
Programmable Read Only Memory. It is
Enabling I2C EEPROM 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.
DATA BUS
SCL4 PB2
O
N
I2C SELECTION
2
2 7 1K 1K SDA2 PC4
A1 WP connected to
6
pins
24C08 SW5 SW6
EasyAVR
v7
page 27
Piezo Buzzer
modules
Piezo electricity is the charge which accumulates a sequence of logic zeros and ones. Frequency of the square
in certain solid materials in response to mechanical signal determines the pitch of the generated sound, and duty
pressure, but also providing the charge to the cycle of the signal can be used to increase or decrease the
piezoelectric material causes it to physically volume in the range from 0% to 100% of the duty cycle. You
deform. One of the most widely used applications can generate PWM signal using hardware capture-compare
of piezo electricity is the production of sound module, which is usually available in most microcontrollers,
generators, called piezo buzzers. Piezo buzzer is an or by writing a custom software which emulates the desired
electric component that comes in different shapes and signal waveform.
sizes, which can be used to create sound waves when
provided with analog electrical signal. EasyAVR™ v7 comes
with piezo buzzer which can be connected either to PB1 or
Supported sound frequencies
PD4 microcontroller pins, which is determined by the position
of J21 jumper. Buzzer is driven by transistor Q8 (Figure 18-1). Piezo buzzer’s resonant frequency (where you can expect it's
Microcontrollers can create sound by generating a PWM (Pulse Width best performance) is 3.8kHz, but you can also use it to create
Modulated) signal – a square wave signal, which is nothing more than sound in the range between 2kHz and 4kHz.
VCC-5V
TOP
VIEW
R39 PZ1
Figure 18-1: Piezo VCC-5V In order to use the on-board Piezo Buzzer in
buzzer connected to TOP
PB1 PB1 Q8 your application, you first have to connect the
BUZZER R42 BC846
TO SOCKETS
microcontroller pin VIEW PD4
transistor driver of piezo buzzer to the appropriate
10K
VCC-5V J21 microcontroller pin. This is done using jumper
R3
PZ1 1K J21. You can place the jumper in two positions,
TOP
thus connecting the buzzer driver to either PB1
TO SOCKETS
VIEW
PERSPECTIVE VCC-5V
or PD4 microcontroller pin.
R3 J21
VIEW
PZ1 R27
1K RC2
Freq = 3kHz, Duty Cycle = 50% TOP
Freq = 3kHz, HowBUZZER
to make it sing?RE1 Figure 18-2:
TO SOCKETS
VIEW
10K Use jumper
PERSPECTIVEVolume =Q8
50%
J21
R3 Buzzer starts "singing"
VIEW PZ1 BC846 when you provide
RC2 J12 to
1K
R27
Freq = 3kHz, Duty Cycle = 80% Freq = 3kHz, PWM BUZZER
signal from the microcontroller connect
80% 10K to the buzzer driver. The pitch of the
RE1 Piezo buzzer
PERSPECTIVEVolume =Q8
VIEW BC846
sound is determined
J21 by the frequency,
on PB1 or
R27 RC2
Freq = 3kHz, Duty Cycle = 20% and amplitude
BUZZER is determined by the PD4 pin
Freq = 3kHz,
duty cycle of the PWM signal. RE1
Volume =Q820% 10K
BC846
EasyAVR
v7
page 28
Additional GNDs
modules
EasyAVR™ v7 contains three GND pins located in three different sections of the
board, which allow you to easily connect oscilloscope GND reference when you
monitor signals on microcontroller pins, or signals of on-board modules.
3
Figure 19-1:
3 oscilloscope
GND pins are 1
conveniently
positioned so
each part of the
board can be
reached with
an oscilloscope
probe
2 2
3
EasyAVR
v7
page 29
What’s Next?
what’s next?
You have now completed the journey through each and every feature of EasyAVR™ v7 board. You got to know it’s modules, organization, supported microcontrollers,
programmer. Now you are ready to start using your new board. We are suggesting several steps which are probably the best way to begin. We invite you to join
thousands of users of EasyAVR™ brand. You will find very useful projects and tutorials and can get help from a large ecosystem of users. Welcome!
Compiler
You still don’t have an appropriate compiler? Locate AVR compiler that
suits you best on the Product DVD provided with the package:
DVD://download/eng/software/compilers/ ILERS
• • • • • • • •
COMP
• MIK
ROC
• • , MI
• • KRO
• • BA
• • • SIC
,M
RE
M
DI
PI
AD
PRODUCT DVD
LE
RS
•
•
•
•
download fully functional demo version, so you can begin building
•
•
•
• •
• •
• •
• •
• •
S
PLE
DRI
www.mikroe.com
EXAM
VER
your AVR applications.
www.libstock.com
S
• • • •
BOARDS • • • • • • • • •
PROGRAMM • • • • •
SSORY
ERS A
ACCE
ND D
•
EBU
• •
• •
GG
ER
• •
S
• •
• •
S
TIC
• •
•
MA
•
•
•
HE
•
Copyright ©2012 Mikroelektronika.
M
All rights reserved. MikroElektronika, MikroElektronika logo and other
IK
RO
SC MikroElektronika trademarks are the property of MikroElektronika.
M
ED
All other trademarks are the property of their respective owners.
• IA
•
• BO
Unauthorised copying, hiring, renting, public performance
•
•• AR
D!
• • and broadcasting of this DVD
DS
ai
S• • •
DV
is strictly prohibited.
Av
RD A • •
••
MAN BO • •
NT •
UALS PME
lab
• • •• • • • • • D
EVELO
le on Product
Projects Community Support
Once you have chosen your compiler, If you want to find answers to your We all know how important it is that
and since you already got the board, questions on many interesting topics we can rely on someone in moments
you are ready to start writing your we invite you to visit our forum at when we are stuck with our projects,
first projects. We have equipped our http://www.mikroe.com/forum facing a deadline, or when we just
compilers with dozens of examples that and browse through more than 150 want to ask a simple, basic question,
demonstrate the use of each and every thousand posts. You are likely to find that’s pulling us back for a while.
feature of the EasyAVR™ V7 board, and just the right information for you. We do understand how important
all of our accessory boards as well. On the other hand, if you want to this is to people and therefore our
This makes an excellent starting point download free projects and libraries, Support Department is one of the
for your future projects. Just load the or share your own code, please visit pillars upon which our company is
example, read well commented code, the Libstock™ website. With user based. MikroElektronika offers Free
and see how it works on hardware. profiles, you can get to know other Tech Support to the end of product
Browse through the compiler Examples programmers, and subscribe to receive lifetime, so if something goes wrong,
path to find the following folder: notifications on their code. we are ready and willing to help!
EasyAVR
v7
page 30
DISCLAIMER
All the products owned by MikroElektronika are protected by copyright law and international copyright treaty. Therefore, this manual is to be treated as any other copyright
material. No part of this manual, including product and software described herein, must be reproduced, stored in a retrieval system, translated or transmitted in any form or by
any means, without the prior written permission of MikroElektronika. The manual PDF edition can be printed for private or local use, but not for distribution. Any modification
of this manual is prohibited.
MikroElektronika provides this manual ‘as is’ without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties or conditions of
merchantability or fitness for a particular purpose.
MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may appear in this manual. In no event shall MikroElektronika, its
directors, officers, employees or distributors be liable for any indirect, specific, incidental or consequential damages (including damages for loss of business profits and business
information, business interruption or any other pecuniary loss) arising out of the use of this manual or product, even if MikroElektronika has been advised of the possibility of
such damages. MikroElektronika reserves the right to change information contained in this manual at any time without prior notice, if necessary.
TRADEMARKS
The MikroElektronika name and logo, the MikroElektronika logo, mikroC™, mikroBasic™, mikroPascal™, mikroProg™, EasyAVR™, READY™, mikroBus™, mikromedia™, MINI™ and Click
boards™ are trademarks of MikroElektronika. All other trademarks mentioned herein are property of their respective companies.
All other product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies, and are only used for
identification or explanation and to the owners’ benefit, with no intent to infringe.
0 100000 023297