Escolar Documentos
Profissional Documentos
Cultura Documentos
v7
USER'S GUIDE
connectivity
microcontrollers supported Supports 3.3V and 5V devices Easy-add extra boards Four connectors for each port Fast USB 2.0 programmer and
The ultimate PIC® board Dual Power Supply mikroBUS™ sockets Amazing Connectivity In-Circuit Debugger
To our valued customers
From the day one, we in MikroElektronika gave ourselves the highest possible goals in pursuit of excellence.
That same day, the idea of EasyPIC™ development board was born. And we all grew together with EasyPIC™.
In its each and tiniest piece we had put all of our energy, creativity and sense of what’s best for an engineer.
I’ve personally assembled hundreds of early EasyPIC™ boards myself with my home soldering iron.
Today, we present you the 7th generation of the board, which brings us some 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
22
Programming Modules
On-board programmer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 DS1820 - Digital Temperature Sensor . . . . . . . . . . . . . . 28
Installing programmer drivers . . . . . . . . . . . . . . . . . . . . . . 12 LM35 - Analog Temperature Sensor . . . . . . . . . . . . . . . . 29
Programming software . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 ADC inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
mikroICD™ - In Circuit Debugger . . . . . . . . . . . . . . . . . . . . 14 I2C EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Piezo Buzzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
page 3
Introduction
introduction
EasyPIC™ is an old friend. It has been with us for six generations. Many of
us made our first steps in embedded world with EasyPIC™. Today it has
thousands of users: students, hobbyists, enthusiasts and professionals.
It’s used in many schools and other educational institutions across the
globe. We may say that it’s the most famous PIC development system
in the world. We asked ourselves what we can do to make such a great
board even greater. And we made some brilliant changes. We focused
all of our creativity and knowledge into making a revolutionary new
design, unlike any previous version of the board. We now present
you with the new version 7 that brings so much more, and we
hope that you will be thrilled with your new board, just as we are.
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
™
EasyPIC™ v7 is all about Powerful on-board mikroProg™ EasyPIC™ v7 is among few Just plug in your Click™ board,
connectivity. Having four programmer and In-Circuit development boards which and it’s ready to work. We
different connectors for debugger can program support both 3.3V and 5V picked up a set of the most
each port, you can connect and debug over 350 microcontrollers. This feature useful pins you need for
accessory boards, sensors and microcontrollers. You will greatly increases the number of development and made a
your custom electronics easier need it, whether you are a supported MCUs. It’s like having pinout standard you will
then ever before. professional or a beginner. two boards instead of one! enjoy using.
page 4
It's good to know
introduction
PIC18F45K22 is the new default microcontroller! System Specification
Until now, EasyPIC™ development boards were equipped - More power than ever before
power supply
with PIC16 as the default chip. Now we are giving you more
®
- Great choice for both beginners 7–23V AC or 9–32V DC
power than ever before. PIC18F45K22 is the new default and professionals or via USB cable (5V DC)
chip of EasyPIC™ v7! It has 16 MIPS operation, 32K bytes of - Rich with modules
power consumption
linear program memory, 1536 bytes of linear data memory, - Enough RAM and Flash
~85mA when all peripheral
and support for a wide range of power supply from 1.8V to - Comes with examples for
modules are disconnected
5V. It’s loaded with great modules: 36 General purpose I/O mikroC, mikroBasic and
pins, 30 Analog Input pins (AD), Digital-To-Analog Converter mikroPascal compilers board dimensions
266 x 220mm (10.47 x 8.66 inch)
(DAC), support for Capacitive Touch Sensing using Charge
Time Measurement Unit (CTMU), three 8-bit timers and four
16-bit timers. It also has pair of CCP, Comparators and weight
~445g (0.981 lbs)
MSSP modules (which can be either SPI or I2C).
Package contains
We present
you with a
to make electr complete color
onics more schematics
understand for EasyPIC
most used able, even ™ v7 devel
SMD comp for absolu opment board
what your onents, and te beginners, . We wante
board is consis made additi so we provid d
ted of, and onal comm ed photos
ents and drawi of
how it actua ngs so you
lly works. can get to
know
page 5
Dual power supply
power supply
C19 3
100nF
VCC-BRD GND 4
3.3V VOLTAGE REGULATOR
SWITCH1
VCC-5V USB
VCC-5V VCC-3.3
VCC-5V J5
E6
220uF/35V LESR
1
2
3
U3
VCC-USB 1 8 R65
SWC DRVC 0.22 D13 D12
L2 220uH CN30
VCC-SW 2 7 CN31
SWE IPK
J6 1N4007 1N4007
3 6 VCC-EXT
CT VIN
D14 D15
E2 D1 4 5 VCC-SW
GND CMPR
220uF/35V LESR MBRS140T3 C8
220pF R34
MC34063A E1
3K 1N4007 1N4007
220uF/35V LESR
R35
5V SWITCHING POWER SUPPLY 1K
page 6
power supply
EasyPIC™ 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 23V AC or 9V to 32V 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 600mA
with external power supply
2. Using adapter 3 4
Set J6 jumper to
EXT position
page 7
Supported
supported MCUs
VCC-MCU VCC-MCU VCC-MCU VCC-MCU VCC-MCU VCC-MCU VCC-MCU VCC-MCU VCC-MCU VCC-MCU
J22
C35
100nF
RA5
C36
100nF
MCLR-RE3
RA0
RA1
RA2
RA3
RA4-DIP40
RA5-DIP40
VCC-MCU
1
2
3
4
5
6
7
DIP40 VCC-MCU
40
39
38
37
36
35
34
RB7-MCU
RB6-MCU
RB5
RB4
RB3
RB2
RB1
RA0
RA1
RA4
MCLR-RA5
RA2
RA3
1
2
3
4
5
6
7
DIP18A VCC-MCU
18
17
16
15
14
13
12
RB3
RB2
RA7-MCU
RA6-MCU
RB7-MCU
RB6-MCU
RE0 8 33 RB0 RB0 8 11 RB5
The board contains eight DIP sockets: DIP40, DIP28, DIP20, DIP18A, DIP18B, DIP14, RA5-DIP40
RE1 9 32 RB1 9 10 RB4
RE2 10 31
DIP8 and support for PIC10F MCUs. With dual power supply and smart on-board 11
12
30
29
RD7
RD6
DIP SKT 18
RA7-MCU 13 28 RD5
mikroProg, board is capable of programming over 350 microcontrollers from PIC10F, for PIC18F44J10, PIC18F45J10 RA6-MCU 14 27 RD4
RA4 RC0 15 26 RC7 DIP18B VCC-MCU
PIC12F, PIC16F, PIC16Enh, PIC18F, PIC18FJ and PIC18FK families. RC1
RC2
16
17
25
24
RC6
RC5-MCU RA2 1 18 RA1
RC3-MCU 18 23 RC4-MCU RA3 2 17 RA0
J7 RA4 3 16 RA7-MCU
RD0 19 22 RD3
E11 RD1 20 21 RD2 MCLR-RA5 4 15 RA6-MCU
There are two DIP18 sockets for PIC microcontrollers provided on the board - DIP18A 10uF
DIP SKT 40 RB0
5
6
14
13 RB7-MCU
and DIP18B. Which of these sockets you will use depends solely on the pinout of
RB1 7 12 RB6-MCU
RA4-DIP40 RB2 8 11 RB5
RB3 9 10 RB4
the microcontroller in use. The EasyPIC™ v7 development system comes with the for PIC18F24J10, PIC18F25J10 DIP28 VCC-MCU DIP SKT 18
on 1.8V-2.5V voltage range, and peripherals that work with 3.3V and 5V RC5
RC4
5
6
16
15
RC0
RC1
VCC-MCU 10F MCU
for PIC18F2331/2431 RC3 7 14 RC2 1 8 MCLR-RA3
voltages. Internally, those microcontrollers have power regulators, which adjust J20
RA5-DIP28
RC6
RC7
8
9
13
12
RB4
RB5 RA2
2
3
7
6
RA7 RA6
the core voltage levels. In order for those devices to have a stable operation of M1X2
VCC-MCU
RB7 10 11 RB6 RA1-MCU RA7-MCU
RA7-OSC1
4 5 RA0-MCU
RA6-MCU
RA6-OSC2
DIP SKT 20 DIP SKT 8J13
the core, manufacturer recommends that decoupling capacitive filters should X1
be provided, and connected between specific microcontroller pins designated 8MHz SYS
with VCAP and GND. EasyPIC v7 board provides jumpers which are used for this
C6 C7
22pF 22pF
purpose. Here is list of devices that require jumpers placed in VCAP position:
Figure 4-1: Schematic of on-board DIP sockets and VCAP jumpers
J22 VCAP position when using PIC16F724/16F727
(see figure 4-1)
IMPORTANT: If you do not place VCAP jumper for the MCUs that need it, 22pF 22pF 22pF 22pF
Figure 4-2:
you might experience some instabilities in program execution. crystal
oscillators
page 8
RA5 RA4
RA5-MCU RA4-MCU
How to properly place your microcontroller into the DIP socket?
supported MCUs
1 2 3
Figure 4-3: Place both ends of microcontroller on Figure 4-4: with both fingers, evenly distribute Figure 4-5: 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-4.
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-3. Then put the microcontroller slowly down until the socket as shown in Figure 4-5.
IMPORTANT: Only one microcontroller may be plugged into the development board at the same time.
Figure 4-6: RA6 and RA7 as I/O pins Figure 4-7: RA6 and RA7 connected Figure 4-8: RA4 and RA5 as I/O pins Figure 4-9: RA4 and RA5 connected
(when using internal oscillator) to X1 quartz-crystal (when using internal oscillator) to X2 quartz-crystal
PIC microcontrollers normally use a quartz crystal for the purpose of providing If you want to use microcontrollers in DIP8, DIP14 and DIP20 packages, it is
clock frequency. The EasyPIC™ v7 provides two sockets for quartz-crystal. necessary to put quartz crystal into socket X2 (OSC2). The value of the quartz-
Microcontrollers in DIP18A, DIP18B, DIP28 and DIP40 packages use socket crystal depends on the maximum clock frequency allowed and your application.
X1 (OSC1) for quartz-crystal. You can always exchange the default 8MHz crystal with another one.
IMPORTANT: Microcontrollers which are plugged into socket 10F use their own internal oscillator and are not connected to any of the mentioned quartz-crystal sockets.
page 9
On-board programmer
programming
What is mikroProg™?
mikroProg™ is a fast USB 2.0 programmer with mikroICD™ hardware
In-Circuit Debugger. Smart engineering allows mikroProg™ to support
all PIC10, PIC12, PIC16, PIC18, devices in a single programmer! It
supports over 350 microcontrollers from Microchip®. 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:
page 10
programming
VCC-MCU VCC-BRD VCC-3.3V VCC-5V
LINK ACTIVE DATA
VCC-3.3 VCC-3.3 VCC-5V
VCC-USB
LD38 LD39 LD40
VCC-BRD
L4
R67 R68 R69 FERRITE CN2
C18 2K2 4K7 6K8 VCC 1
100nF
LED-DATA
DATA BUS
LED-ACT USBPROG_N D- 2
LED-USB
USBPROG_P D+ 3
VCC-BRD
C19 GND 4
R7 100nF
10K USB
T65 R6 #RST
1K BRD-PGD
MCU-VPP BRD-PGC MCLR-RE3 RE3
C41 MCU-PGC BRD-VPP MCU-VPP MCLR-RA5 RA5 I/O
100nF MCU-PGD MCLR-RA3 RA3
J2 J1
VCC-BRD
CN28 RB6-MCU RB7-MCU
MCU-PGC MCU-PGD
RA1-MUX RA0-MUX
1 RB6 RB7
MCU-PGC BRD-PGC BRD-PGD
2 RA1 RA0
MCU-PGD
3 J8 J9
4 BRD-VPP
5
MCU-VPP RST# I/O
6
J19
ICD
page 11
Installing programmer drivers
programming
http://www.mikroe.com/downloads/get/1202/
mikroprog_for_pic_drivers_v200.zip
page 12
Programming software
programming
mikroProg Suite™ for PIC®
Installation wizard - 6 simple steps
On-board mikroProg™ programmer requires special programming software called
mikroProg Suite™ for PIC®. This software is used for programming all of Microchip®
microcontroller families, including PIC10, PIC12, PIC16, PIC18, dsPIC30/33, PIC24 and
PIC32. Software has intuitive interface and SingleClick™ programming technology.
To begin, first locate the installation archive on our website:
http://www.mikroe.com/downloads/get/1201/mikroprog_suite_for_pic.zip
After downloading, extract the package and double click the executable setup
file, to start installation.
Step 1 - Start Installation Step 2 - Accept EULA and continue
page 13
mikroICD - In Circuit Debugger ™
programming
What is Debugging?
mikroICD
™
Every developer comes to a point where he has to monitor the How do I use the debugger? bugger
code execution in order to find errors in the code, or simply in-circuit de
to see if everything is going as planed. This hunt for bugs, or When you build your project for debugging, and program
errors in the code is called debugging. There are two ways the microcontroller with this HEX file, you can start the
to do this: one is the software simulation, which enables debugger using [F9] command. Compiler will change layout
you to simulate what is supposed to be happening on the to debugging view, and a blue line will mark where code
microcontroller as your code lines are executed, and the other, execution is currently paused. Use debugging toolbar in
most reliable one, is monitoring the code execution on the the Watch Window to guide the program execution and
MCU itself. And this latter one is called In-Circuit debugging. stop anytime. Add the desired variables to Watch Window and
"In-Circuit" means that it is the real deal - code executes right monitor their values. Complete guide to using mikroICD™ with Figure 5-2: mikroICD™ manual
on the target device. your compiler is provided within the EasyPIC™ v7 package. explains debugging thoroughly
What is mikroICD™?
Supported Compilers
page 14
mikroICD™ commands
programming
Here is a short overview of which debugging commands are supported in MikroElektronika compilers. You can see what each command does,
and what are their shortcuts when you are in debugging mode. It will give you some general picture of what your debugger can do.
Toolbar
Command Name Shortcut Description
Icon
Run To Cursor [F4] Executes the program until reaching the cursor position.
page 15
UART via RS-232
communication
10uF
1
RB2
1
2 15 1
C28 V+ GND
2
RX-232 RB1
CONNECTOR
6
6
100nF
3
RX RB4 3 14 2
C1- T1OUT
4
RX-FTDI RA3
RS2 32
7
5
RB5 4 13 3
J3 C2+ R1IN
6
RC5 C30 8
7
RD7 100nF 5 12 4
C2- R1OUT
8
9
SW1
6 11 5
V- T1IN
9
RC6
5
O
N
7 10
1
TX-232 RB2 8 9
3
RD6
8
SW2 R32
100K
TX-232
RX-232
Figure 6-1: RS-232 connection schematic
page 16
UART via USB
communication
Modern PC computers, laptops and notebooks are
no longer equpped with RS-232 connectors and
Enabling USB-UART UART controllers. They are nowdays replaced with USB
connectors and USB controllers. Still, certain technology
enables UART communication to be done over USB connection.
Controllers such as FT232RL from FTDI® convert UART signals
to the appropriate USB standard. In order to use USB-UART module
on EasyPIC™ v7, you must first install FTDI drivers on your computer.
Drivers can be found on link bellow:
DATA BUS
VCC-MCU VCC-5V VCC-MCU VCC-MCU
CN32
RC7
O
N
CONNECTOR
U2 VCC 1
1
RB2 R8 R9
US B UA RT
RX-FTDI 1 28
2
GND CBUS1
SW1 8
NC
FT232RL GND 21
USB B
9 20
DSR# VCC
RC6 10 19
DCD# RESET#
O
N
11 18 R79
1
RB7
J4 FT232RL 100nF 100nF 10uF
6
RC4 C32
7
RD6 100nF
8
SW2
page 17
communication
USB connection
USB is the acronym for Universal Serial USB connector (CN4) which enables the target microcontroller.
Bus. This is a very popular industry microcontrollers that support USB When communication lines are headers.
standard that defines cables, connectors communication to establish a connection routed from the microcontroller to the Dedicated USB ON LED
and protocols used for communication with the target host (eg. PC, Laptop, etc). USB connector using mentioned jumpers, signalizes the presence of USB connection,
and power supply between computers Selection of communication lines is done they are cut off from the rest of the when the USB cable is inserted into the
and other devices. EasyPIC™ v7 contains using jumpers J12 or J18, depending on board, and cannot be accessed via PORT USB connector.
CONNECTOR
VCC 1
RC4-MCU
D- 2
RC5
US B
RC5-MCU D+ 3
J18
RA2 L44 GND 4
USB ON
RA2-MCU
R11 USB B
RA1-MUX 4K7
RA1-MCU
RA0-MUX
Figure 8-1: Figure 8-2: Figure 8-3: RA0-MCU
USB function disabled USB enabled on PORTC USB enabled on PORTA PIC18F1XK50
PIC18LF1XK50
page 18
mikroBUS sockets ™
connectivity
Easier connectivity and simple configuration are already routed to the most appropriate pins of
imperative in modern electronic devices. Success the microcontroller sockets.
of the USB standard comes from it’s simplicity of
usage and high and reliable data transfer rates.
As we in MikroElektronika see it, Plug-and-Play
mikroBUS™ host connector
devices with minimum settings are the future in mikroBUS™ pinout explained
embedded world too. This is why our engineers Each mikroBUS™ host connector consists of
have come up with a simple, but brilliant pinout two 1x8 female headers containing pins AN - Analog pin PWM - PWM output line
with lines that most of today’s accessory boards that are most likely to be used in the target RST - Reset pin INT - Hardware Interrupt line
require, which almost completely eliminates the accessory board. There are three groups CS - SPI Chip Select line RX - UART Receive line
need of additional hardware settings. We called of communication pins: SPI, UART and I2C SCK - SPI Clock line TX - UART Transmit line
this new standard the mikroBUS™. EasyPIC™ v7 communication. There are also single pins MISO - SPI Slave Output line SCL - I2C Clock line
is the first development board in the world to for PWM, Interrupt, Analog input, Reset MOSI - SPI Slave Input line SDA - I2C Data line
support mikroBUS™ with two on-board sockets. and Chip Select. Pinout contains two power +3.3V - VCC-3.3V power line +5V - VCC-5V power line
As you can see, there are no additional DIP groups: +5V and GND on one header and GND - Reference Ground GND - Reference Ground
switches, or jumper selections. Everything is +3.3V and GND on the other 1x8 header.
DATA BUS
Figure 9-1:
mikroBUS™
RA2
AN PWM
RC0 RA3
AN PWM
RC1 connection
RE1 R90 1K RB0 RE2 R91 1K RB1
RE0
RST INT
RC7 RA5
RST INT
RC7 schematic
CS RX CS RX
RC3 RC6 RC3 RC6
SCK TX SCK TX
RC4 RC3 RC4 RC3
MISO SCL MISO SCL
RC5 RC4 RC5 RC4
MOSI SDA MOSI SDA
1 2
VCC-3.3V 3.3V 5V VCC-5V VCC-3.3V 3.3V 5V VCC-5V
GND GND GND GND
http://www.mikroe.com/mikrobus/
page 19
connectivity
ADC click™ RFiD click™ BlueTooth click™ MP3 click™ GSM click™
LightHz click™ microSD click™ DAC click™ DIGIPOT click™ SHT1x click™
page 20
connectivity
WiFi PLUS click™ GPS click™ RS485 click™ CAN SPI click™ THERMO click™
Code Examples
It easy to get your Click™ board
up and running. We provided
the examples for mikroC™,
mikroBasic™ and mikroPascal™
compilers on our Libstock
community website. Just
download them and you are
ready to start:
http://www.libstock.com
page 21
Input/Output Group
connectivity
PORT headers, PORT buttons and PORT LEDs are next to each other, and
grouped together. It makes development easier, and the entire EasyPIC™ v7
Figure 10-1: I/O group contains PORT headers, tri-state pull
cleaner and well organized. We have also provided an additional PORT headers
up/down DIP switch, buttons and LEDs all in one place
on the left side of the board, so you can access any pin you want from both sides of
the board. Some PORT pins are directly connected to the microcontroller, and some that are connected to other on-board modules are enabled via jumpers (for
example USB jumpers, J12 and J18).
Tri-state DIP switches, like SW7 on Figure 10-2, are used to DATA BUS
enable 4K7 pull-up or pull-down resistor on any desired port
RC7
RC6
RC5
RC4
RC3
RC2
RC1
RC0
pin. Each of these switches has three states: RC0
1
4k7 RC1
1. middle position disables both RC0 RC1 RC0 RC1 RC0 RC1 RC2
2
3
RC2 RC3 RC2 RC3 RC2 RC3 RC3
pull-up and pull-down feature from UP
+1 2 3 4 5 6 7 8
RC4 RC5 RC4 RC5 RC4 RC5 RC4
4
5
PULL RC6 RC7 RC6 RC7 RC6 RC7 RC5
the PORT pin DOWN RC6
6
_ VCC-BRD VCC-BRD VCC-BRD 7
2. up position connects the resistor SW7 CN15 CN10 CN20
RC7
8
VCC-BRD 9
in pull-up state to the selected pin VCC-MCU
10
CN25
3. down position connects the
Figure 10-2: Tri-state resistor in pull-down state to the
DIP switch on PORTC selected PORT pin.
O
N
1
2
J24 VCC-MCU
RC5
RC3
RC2
RC1
RC0
RC7
RC6
RC4
8
SW3
PRESS_LEVEL R80
RC6
RC5
RC4
RC3
RC2
RC1
RC0
J17 T24 T23 T22 T21 T20 T19 T18 T17
RC7
220
DISABLE
PROTECTION
Figure 10-3: Schematic of the single I/O group connected to microcontroller PORTC
page 22
connectivity
Headers Buttons
With enhanced connectivity as one of the key features of The logic state of all
LEDs LED (Light-Emitting
EasyPIC v7, we have provided four connection headers microcontroller digital Diode) is a highly
for each PORT. I/O PORT group contains two male IDC10 inputs may be changed efficient electronic
headers (like CN10 and CN15 on Figure 10-3). These using push buttons. light source. When
headers are all compatible with over 70 MikroElektronika Jumper J17 is available connecting LEDs, it
accessory boards, and enable simple connection. There is Figure 10-5: Button press for selecting which logic Microcontroller is necessary to place
one more IDC10 header available on the left side of the level jumper (J17) state will be applied SMD resistor a current limiting
board, next to the section with displays. to corresponding MCU pin when button is pressed limiting current resistor in series
in any I/O port group. If you, for example, place J17 through the LED so that LEDs are
NOTE: Because of it's orientation, header on the left side
in VCC position, then pressing of any push button in provided with the
of the board is not meant for placing accessory boards
PORT I/O group will apply logic one to the appropriate current value specified by the manufacturer. The current
directly. Instead, use wire jumpers or other ways to
microcontroller pin. The same goes for GND. If the varies from 0.2mA to 20mA, depending on the type of the
establish connection and utilize these pins.
jumper is taken out, then neither of two logic states LED and the manufacturer.. The EasyPIC™ v7 board uses
I/O PORT group also contains 1x10 connection pad (like will be applied to the appropriate microcontroller pin. You low-current LEDs with typical current consumption of
CN25 on Figure 10-3) which can be used for connecting can disable pin protection 220ohm resistors by placing 0.2mA or 0.3mA, depending of VCC voltage selection.
MikroElektronika PROTO boards, or custom user boards. jumper J24, which will connect your push buttons Board contains 36 LEDs
directly to VCC or GND. Be aware that doing so you may which can be used for visual
accidentally damage MCU in case of wrong usage. indication of the logic state
on PORT pins. An active LED
indicates that a logic high
Reset Button (1) is present on the pin. In
order to enable PORT LEDs,
In the far upper right section of the it is necessary to enable the
board, there is a RESET button, which corresponding DIP switches
Figure 10-6: SW3.1
can be used to manually reset the on SW3 (Figure 10-6).
through SW3.4
Figure 10-4: IDC10 male headers enable easy microcontroller. This button is directly
switches are used to
connection with MikroElektronika accessory boards connected to the MCLR pin.
enable PORT LEDs
page 23
LCD 2x16 characters
displays
O
N
1
VCC-5V R/W - Determines whether display is in Read or Write mode. It’s
2
P4
3
always connected to GND, leaving the display in Write mode all
4
LCD-GLCD BPWM RC2
the time.
5
LCD-GLCD BCK
6
D0–D3 - Display is supported in 4-bit data mode, so lower half of
7
8
10K
SW4
the data byte interface is connected to GND.
R93 VCC-MCU D4–D7 - Upper half of the data byte
VCC-5V
56
Q11
BC846 R10 DATA BUS LED+ - Connection with the back-light LED anode
K-LCD
RB4
RB5
RB0
RB1
RB2
RB3
Vee
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 SW4.5 and SW4.6 switches must
be enabled at the same time.
page 24
GLCD 128x64
displays
Graphical Liquid Crystal Displays, or GLCDs are used to Display connector is routed to PORTB
display monochromatic graphical content, such as text, images, (control lines) and PORTD (data lines) of the
human-machine interfaces and other content. EasyPIC™ v7 microcontroller sockets. Since the same ports are
provides the connector and necessary interface for supporting used by 2x16 character LCD display, you cannot
GLCD with resolution of 128x64 pixels, driven by the KS108 or use both displays simultaneously. You can control
compatible display controller. Communication with the display the display contrast using dedicated potentiometer
module is done through CN6 display connector. Board is fitted P3. Full brightness display back light can be enabled
with uniquely designed plastic display distancer, which allows with SW4.5 switch, and PWM-driven back light with
the GLCD module to perfectly and firmly fit into place. SW4.6 switch.
VCC-5V
DATA BUS
O
N
1
2
Figure 12-1: GLCD 128x64
3
4
connection schematic LCD-GLCD BPWM RC2
5
LCD-GLCD BCK
6
7
P3
8
SW4
10K
Connector pinout explained
R92 VCC-MCU
Q11 CS1 and CS2 - Controller Chip Select lines E - Display Enable line
20 R10
BC846
1K VCC - +5V display power supply D0–D7 - Data lines
VCC-5V
K-GLCD
LCD-GLCD BCK
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
RB0
RB1
RB2
RB3
RB4
RB5
Vo
R89
GND - Reference ground RST - Display reset line
4K7
Vo - GLCD contrast level from potentiometer P3 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
CN6
GLCD 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 SW4.5 and SW4.6 switches must
be enabled at the same time.
page 25
Touch panel controller
displays
Touch panel is a glass panel whose surface is EasyPIC™ 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 13-1: Put Touch panel flat cable in Figure 13-2: Use a tip of your finger Figure 13-3: Now place GLCD with
the connector to push it inside Touch panel into GLCD socket
BOTTOM
LEFT
CN6 VCC-MCU
GLCD SOCKET2
1 20
LED-
CS1
CS2
Vo
RS
D0
D1
D2
D3
D4
D5
D6
D7
Vcc
LED+
GND
R/W
Vee
E
RST
Q15 R16
BC856 1K
R22
RIGHT
10K Q13
BC846
R15
Enabling Touch panel
10K VCC-MCU
VCC-MCU
Q14 R12
Touch panel is enabled using SW3.5,
BC856
SW3.6, SW3.7 and SW3.8 switches.
1K
R14 DRIVEA
TOP
10K
They connect READ-X and READ-Y lines
CN29
LEFT
Q12
VCC-MCU of the touch panel with RA0 and RA1
analog inputs, and DRIVEA and DRIVEB
BC846
C25 E3
R25 R45
10uF
100nF 10K
TOP
RIGHT
VCC-MCU
BOTTOM
Q16
BC846
R23
1K
disconnect other peripherals, LEDs and
additional pull-up or pull-down resistors
C26
Figure 13-5: Turn on switches
R26 R24 DRIVEB
100K
DATA BUS
O
N
100nF 10K
1
RA0 BOTTOM
interfere with signal/data integrity. Touch panel controller
5
RA1 LEFT
controller and connection
6
RC0 DRIVEA
7
RC1 DRIVEB
8
schematic SW3
page 26
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 write operation simultaneously. on SW4.1, SW4.2, SW4.3 and SW4.4
a decimal point in the desired segment. This is possible because human eye has switches. Digit select lines are connected
EasyPIC™ v7 contains four of these digits a slower reaction time than the mention to RA0 – RA3 pins on the microcontroller
put together to form 4-digit 7-segment changes. This way you can represent sockets, while data lines are connected to
display. Driving such a display is done numbers in decimal or hexadecimal RD0 – RD7 pins. Make sure to disconnect
using multiplexing techniques. Data form. Eight data lines that are common other peripherals from the interface lines
lines are shared between segments, and for all the digits are connected to PORTD, in order not to interfere with signal/data Figure 14-1: Turn on switches
therefore the same segment LEDs in and digit select lines are connected to integrity. 1 through 4 on SW4 to enable
each digit are connected in parallel. Each RA0–RA3 lines on the microcontroller 4-digit 7-seg display
digit has it’s unique digit select line, sockets.
seg g
seg b
seg g
seg b
seg g
seg b
seg g
seg b
seg a
seg a
seg a
seg a
seg f
seg f
COM3
COM2
seg f
COM1
seg f
COM0
COM1 COM3
10
10
10
10
R30 R28
9
8
7
6
9
8
7
6
9
8
7
6
9
8
7
6
DIS1 DIS3
b
b
f
f
g
g
cc
cc
cc
cc
a
10K 10K
Q2 Q4 DIS0 RA0 RD0 R81 470 seg a
O
N
BC846 BC846
1
DIS1 RA1 RD1 R82 470 seg b
2
DIS2 RA2 RD2 R83 470 seg c
3
DIS3 RA3 RD3 R84 470 seg d
4
RD4 R85 470 seg e
COM0 COM2
5
RD5 R86 470 seg f
6
RD6 R87 470 seg g
7
R31 R29 RD7 R88 470 seg dp
dp
dp
dp
dp
DIS0 DIS2
d
8
e
e
c
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
Q1 Q3
seg dp
seg dp
seg dp
seg dp
BC846 BC846
seg d
seg d
seg d
seg d
seg e
seg e
seg e
seg e
seg c
seg c
seg c
seg c
DATA BUS
page 27
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 EasyPIC™ 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 J11.
DATA BUS
connected placed in connected connected
socket to RE2 pin to RA4 pin VCC-MCU
DQ
DQ R2
EasyPIC™ v7 enables you to establish 1-wire® communication between DS1820 and VCC
the microcontroller via RA4 or RE2 microcontroller pins. The selection of either of
1K
those two lines is done using J11 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 J11
may be permanently damaged. Make sure to disconnect other peripherals (except
Figure 15-5: RA4
1-wire), LEDs and additional pull-up or pull-down resistors from the interface lines
DS1820
in order not to interfere with signal/data integrity.
connected
to RE2 pin RE2
page 28
LM35 - Analog
modules
Temperature Sensor
The LM35 is a low-cost precision obtain convenient Centigrade scaling. separate socket (TS2) for
integrated-circuit temperature sensor, It has a linear +10.0 mV/°C scale factor the LM35 sensor in TO-92
whose output voltage is linearly and less than 60 μA current drain. As it plastic packaging. Readings
proportional to the Celsius (Centigrade) draws only 60 μA from its supply, it has are done with microcontroller
temperature. The LM35 thus has an very low self-heating, less than 0.1°C using single analog input line,
advantage over linear temperature in still air. EasyPIC™ v7 enables you to which is selected with jumper J25.
sensors calibrated in ° Kelvin, as the get analog readings from the LM35 Jumper connects the sensor with
user is not required to subtract a large sensor in restricted temperature range either RE2 or RE1 microcontroller pins.
constant voltage from its output to from +2ºC to +150ºC. Board provides a
Figure 16-1: Figure 16-2: Figure 16-3: Figure 16-4: DATA BUS
LM35 not LM35 placed LM35 LM35
VCC
connected in socket connected connected
to RE1 pin to RE2 pin VOUT
VOUT
GND
EasyPIC™ v7 enables you to get analog readings from the LM35 sensor using
RE1 or RE2 microcontroller pins. The selection of either of those two lines
is done using J25 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 J25
be permanently damaged and you might need to replace it with another one.
Figure 16-5:
During the readings of the sensor, make sure that no other device uses the RE1
LM35
selected analog line, because it may interfere with the readings.
connected
RE2 to RE1 pin
page 29
ADC inputs
modules
VCC-MCU
RA0 P1
Figure 17-1: use J15 and J16 jumpers
RA1
RA2 R63 to connect analog input lines with
RA3 potentiometers P1 and P2
220
RA5
J15 10K
In order to connect the output of the
DATA BUS potentiometer P1 to RA0, RA1, RA2,
VCC-MCU RA3 or RA5 analog microcontroller inputs,
RB0 P2 you have to place the jumper J15 in the
Figure 17-2: RB1
R64 desired position. If you want to connect
RB2
Schematic of ADC potentiometer P2 to any of the RB0 – RB4
RB3 220
input RB4 analog microcontroller inputs, place jumper
J16 10K J16 in the desired position. By moving
the potentiometer knob, you can create
voltages in range from GND to VCC.
page 30
I C EEPROM
2
modules
EEPROM is short for Electrically Erasable
Programmable Read Only Memory. It is usually
Enabling I2C EEPROM a secondary storage memory in devices containing
data that is retained even if the device looses power
Figure 18-1: supply. Because of the ability to alter single bytes
Activate SW4.7 and of data, EEPROM devices are used to store personal
SW4.8 switches preference and configuration data in a wide spectrum
to connect of consumer, automotive, telecommunication, medical,
microcontroller industrial, and PC applications.
I2C lines to Serial EasyPIC™ v7 supports serial EEPROM which uses I2C
EEPROM. 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 16-byte (page)
In order to connect I2C EEPROM to the write and read operations. Data rate is 400 kHz for both 3.3V and 5V
microcontroller you must enable SW4.7 and power supply.
SW4.8 switches, as shown on Figure 18-1. 1kΩ
pull-up resistors necessary for I2C communication
are already provided on SDA and SCL lines once
switches are turned on. Prior to using EEPROM in
your application, make sure to disconnect other What is I2C?
peripherals, LEDs and additional pull-up or pull-
down resistors from the interface lines in order I2C is a multi-master serial single-ended bus that is used to attach low-speed peripherals to computer or embedded
not to interfere with signal/data integrity. systems. I²C uses only two open-drain lines, Serial Data Line (SDA) and Serial Clock (SCL), pulled up with
resistors. SCL line is driven by a master, while SDA is used as bidirectional line either by master or slave device.
Up to 112 slave devices can be connected to the same bus. Each slave must have a unique address.
DATA BUS
O
N
VCC-MCU VCC-MCU VCC-MCU
1
2
3
U8 C24
4
R5 R4 8 1 100nF
1K 1K VCC A0 5
7 2
6
WP A1 EEPROM-SCL RC3
EEPROM-SCL 6 3
7
page 31
Piezo Buzzer
modules
Piezo electricity is the charge which than a sequence of logic zeros and ones. Frequency of the
accumulates in certain solid materials in response square signal determines the pitch of the generated sound,
to mechanical pressure, but also providing the and duty cycle of the signal can be used to increase or decrease
charge to the piezoelectric material causes it to the volume in the range from 0% to 100% of the duty cycle.
physically deform. One of the most widely used You can generate PWM signal using hardware capture-compare
applications of piezo electricity is the production of module, which is usually available in most microcontrollers, or
sound generators, called piezo buzzers. Piezo buzzer by writing a custom software which emulates the desired
is an electric component that comes in different shapes signal waveform.
and sizes, which can be used to create sound waves
when provided with analog electrical signal. EasyPIC™ v7
comes with piezo buzzer which can be connected either to
Supported sound frequencies
RC2 or RE1 microcontroller pins, which is determined by the
position of J21 jumper. Buzzer is driven by transistor Q8 (Figure Piezo buzzer’s resonant frequency (where you can expect it's
19-1). Microcontrollers can create sound by generating a PWM (Pulse best performance) is 3.8kHz, but you can also use it to create
Width Modulated) signal – a square wave signal, which is nothing more sound in the range between 2kHz and 4kHz.
VCC-5V
TOP
VIEW
R3 PZ1
Figure 19-1: Piezo VCC-5V In order to use the on-board Piezo Buzzer in
buzzer connected to TOP
RE1 RE1 Q8 your application, you first have to connect the
BUZZER R27 BC846
TO SOCKETS
microcontroller pin VIEW RC2
transistor driver of piezo buzzer to the appropriate
10K
VCC-5V J21 microcontroller pin. This is done using jumper J21.
R3
PZ1 1K You can place the jumper in two positions, thus
TOP
connecting the buzzer driver to either RE1 or RC2
TO SOCKETS
VIEW
PERSPECTIVE VCC-5V
microcontroller pin.
R3 J21
VIEW
PZ1 R27
1K RC2
Freq = 3kHz, Duty Cycle = 50% TOP
Freq = 3kHz, HowBUZZER
to make it sing?RE1 Figure 19-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 RE1 or
R27 RC2
Freq = 3kHz, Duty Cycle = 20% and amplitude
BUZZER is determined by the RC2 pin
Freq = 3kHz,
duty cycle of the PWM signal. RE1
Volume =Q820% 10K
BC846
page 32
Additional GNDs
modules
EasyPIC™ 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.
2 GND is located in the cross section between DIP18 and DIP14 sockets
3 1
Figure 20-1:
3 oscilloscope
GND pins are
conveniently
positioned so each
part of the board
can be reached with
an oscilloscope probe
page 33
What’s Next?
what’s next?
You have now completed the journey through each and every feature of EasyPIC™ v7 board. You got to know it’s modules, organization, supported microcontrollers,
programmer and debugger. 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 EasyPIC™ 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 PIC® compiler
that suits you best on our website:
www.mikroe.com/pic/compilers/
page 34
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™, EasyPIC™, EasyPIC PRO™, 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.