Você está na página 1de 36

EasyPIC

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.

Use it wisely and have fun!

Nebojsa Matic,
Owner and General Manager
of MikroElektronika
Introduction Connectivity
Table of contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

It's good to know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


04
05
mikroBUS™ sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Input/Output Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
22

Power Supply Displays


Dual power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 06 LCD 2x16 characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
GLCD 128x64. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Supported MCUs Touch panel controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Supported microcontrollers . . . . . . . . . . . . . . . . . . . . . . . . 08 4 digit 7-seg display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

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

Communication Additional GNDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33


UART via RS-232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
UART via USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 What’s Next
USB connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

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.

EasyPIC™ development Team

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

1 Damage resistant 2 EasyPIC™ v7 board in 3 USB cable 4 User Manuals and


protective box antistatic bag Board schematic

page 5
Dual power supply
power supply

Board contains switching power supply


that creates stable voltage and
current levels necessary for
powering each part of the
board. Power supply section
contains two power regulators:
MC34063A, which generates
VCC-5V, and MC33269DT3.3 which
creates VCC-3.3V power supply. The board
can be powered in three different ways: with USB
power supply (CN2), using external adapters via adapter
connector (CN31) or additional screw terminals (CN30). External
adapter voltage levels must be in range of 9-32V DC or 7-23V AC. Use
jumper J6 to specify which power source you are using and jumper J5 to specify
whether you are using 5V or 3.3V power supply. Upon providing the power using
either external adapter or USB power source you can turn on power supply by using SWITCH 1
(Figure 3-1). Power LED (Green ON) will indicate the presence of power supply. Figure 3-1: Dual power supply unit of EasyPIC™ v7

REG1 VCC-5V VCC-USB


1
GND
2
Vout VCC-3.3 L4
3 LD37
VCC-5V Vin FERRITE
CN2
MC33269DT3.3 E7
10uF R66 VCC 1
E4 C14
10uF 100nF 2K2
2

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

Figure 3-2: Dual power supply unit schematic

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

How to power the board?


1. With USB cable 1 2
Set J6 jumper to
USB position
To power the board with USB cable, place jumper J6 in
USB position and place jumper J5 in 5V or 3.3V position.
You can then plug in the USB cable as shown on images
1 and 2 , and turn the power switch ON.

2. Using adapter 3 4
Set J6 jumper to
EXT position

To power the board via adapter connector, place jumper


J6 in EXT position, and place jumper J5 in 5V or 3.3V
position. You can then plug in the adapter cable as shown
on images 3 and 4 , and turn the power switch ON.

3. With laboratory power supply 5 6


Set J6 jumper to
EXT position

To power the board using screw terminals, place jumper


J6 in EXT position, and place jumper J5 in 5V or 3.3V
position. You can then screw-on the cables in the screw
terminals as shown on images 5 and 6 , and turn the
power switch ON.

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

E14 C33 C9 C10 C13 C12 C11 C42 C40 C39


10uF 100nF 100nF 100nF 100nF 100nF 100nF 100nF 100nF 100nF

microcontrollers for PIC16F724/727

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

PIC18F45K22 microcontroller in a DIP40 package. PIC18F2XJ50, PIC18F2XJ11


RA4
MCLR-RE3
RA0
1
2
28
27
RB7-MCU
RB6-MCU
RA1
RA2
3
4
26
25
RB5
RB4
VCC-MCU DIP14
IMPORTANT: When using PIC18F2331 or PIC18F2431 microcontrollers it is necessary J10
E13
RA3
RA4-DIP28
5
6
24
23
RB3
RB2 RA5-MCU
1
2
14
13 RA0-MCU
RA5-DIP28 7 22 RB1 RA4-MCU 3 12 RA1-MCU
to place J20 jumper, in order to route VCC power line to RA5 pin (Figure 4-1) 10uF
RA7-MCU
8
9
21
20
RB0 MCLR-RA3
RC5
4
5
11
10
RA2
RC0
RA4-DIP28 RA6-MCU 10 19 RC4 6 9 RC1
RC0 11 18 RC7 RC3 7 8 RC2
RC1 12 17 RC6
RC2 13 16 RC5-MCU DIP SKT 14
for PIC16F722/723/726 RC3-MCU 14 15 RC4-MCU
RA5
DIP SKT 28
VCC-MCU DIP8
VCAP jumpers explained J23
C37
100nF
C38
100nF
VCC-MCU DIP20 RA5-MCU
RA4-MCU
1
2
3
8
7
6
RA0-MCU
RA1-MCU
1 20 MCLR-RA3 4 5 RA2
RA5-MCU 2 19 RA0-MCU
Some PIC16F, PIC18FK and all PIC18FJ microcontrollers have cores that work RA5-DIP28 RA4-MCU
MCLR-RA3
3
4
18
17
RA1-MCU
RA2-MCU
DIP SKT 8

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)

J7 VCAP position for PIC18F44J10 and PIC18F45J10


J10 VCAP for PIC18F24J10, PIC18F25J10 PIC18F2XJ50, PIC18F2XJ11
RA7 RA6 RA5 RA4
RA7-MCU RA6-MCU RA5-MCU RA4-MCU
RA7-OSC1 RA6-OSC2 RA5-OSC2 RA4-OSC1
J13 J14

J23 VCAP for PIC16F722, PIC16F723, PIC16F726 X1 X2

8MHz SYS 8MHz SEC


C6 C7 C22 C21

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.

Using crystal oscillators


1 2 3 4

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:

1. Install the necessary software


- Install USB drivers
- Install mikroProg Suite™ for PIC® software

2. Power up the board, and you are ready to go.


- Plug in the programmer USB cable
- LINK LED should light up.
MCLR pin Programing MCLR pin
selection lines selection function
Before using the programmer, Jumpers J8 and J9 are Using jumper J19 you can
Why so many LEDs? make sure to set MCLR pin jumpers used to select PGC and specify whether MCLR
J1 and J2, so that MCLR line is PGD programming lines pin of your microcontroller
Three LEDs indicate specific programmer routed to the correct socket for for your microcontroller. is connected to the on-
operation. Link LED lights up when USB your microcontroller. If you are Make sure to place board reset circuit, or
link is established with your PC, Active using the default PIC18F45K22, jumpers in the proper acts just as I/O pin.
LED lights up when programmer is active. jumpers are supposed to be set for position for your socket.
Data is on when data is being transferred DIP40, as shown below.
between the programmer and PC software
(compiler or mikroProg Suite™ for PIC®).

DIP40, DIP18A, DIP20 DIP40, DIP20, MCLR MCLR


NOTE: If you use other than the default PIC18F45K22 MCU,
DIP28 DIP28, DIP14, as as I/O
DIP18B DIP14
make sure that programmer jumpers are placed in proper
DIP8 DIP18A, DIP8 MCLR
positions for your microcontroller socket.
DIP18B

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

Figure 5-1: mikroProg™ block schematic

Programming with ICD2/ICD3


EasyPIC™ v7 is equipped with RJ-12 connector compatible with
Microchip® ICD2® and ICD3® external programmers. You can
either use the on-board mikroProg™ programmer or external
programming tools as long as you use only one of them in the
same time. But you still have to set the appropriate jumpers,
as described in the previous page. Insert your ICD programmer
cable into connector CN28, as shown in images 1 and 2 .
1 2

page 11
Installing programmer drivers
programming

On-board mikroProg™ requires drivers in order to work.


Drivers can be found on the link below:

http://www.mikroe.com/downloads/get/1202/
mikroprog_for_pic_drivers_v200.zip

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.

Step 1 - Start Installation Step 2 - Accept EULA


Welcome screen of the installation. Just click on Next Carefully read End User License Agreement. If you
button to proceed. agree with it, click Next to proceed.

In the opened folder you should


be able to locate the driver
setup file. Double click on setup Step 3 - Installing drivers Step 4 - Finish installation
file to begin installation of the
programmer drivers. Drivers are installed automatically in a matter of You will be informed if the drivers are installed correctly.
seconds. Click on Finish button to end installation process.

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

Step 3 - Install for All users or Step 4 - Choose destination folder


current user

Step 5 - Installation in progress Step 6 - Finish Installation

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™?

The on-board mikroProg™ programmer supports mikroICD™ - a


highly effective tool for a Real-Time debugging on hardware
level. The mikroICD™ debugger enables you to execute your
program on the host PIC microcontroller and view variable
values, Special Function Registers (SFR), RAM, CODE and
EEPROM memory along with the mikroICD™ code execution
on hardware. Whether you are a beginner, or a professional,
this powerful tool, with intuitive interface and convenient
set of commands will enable you to track down bugs quickly.
mikroICD™ is one of the fastest, and most reliable debugging
tools on the market.

Supported Compilers

All MikroElektronika compilers, mikroC™, mikroBasic™ and


mikroPascal™ for PIC®, dsPIC® and PIC32® natively support
mikroICD™. Specialized mikroICD™ DLL module allows compilers
to exploit the full potential of fast hardware debugging.
Along with compilers, make sure to install the appropriate
programmer drivers and mikroProg Suite™ for PIC®
programming software, as described on pages 12 and 13. Figure 5-3: mikroC PRO for PIC® compiler in debugging view, with SFR registers in Watch Window

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

Start Debugger [F9] Starts Debugger.

Run/Pause Debugger [F6] Run/Pause Debugger.

Stop Debugger [Ctrl + F2] Stops Debugger.

Executes the current program line, then halts. If the executed


Step Into [F7] program line calls another routine, the debugger steps into the
routine and halts after executing the first instruction within it.
Executes the current program line, then halts. If the executed program
line calls another routine, the debugger will not step into it. The whole
Step Over [F8]
routine will be executed and the debugger halts at the first instruction
following the call.
Executes all remaining program lines within the subroutine. The
Step Out [Ctrl + F8]
debugger halts immediately upon exiting the subroutine.

Run To Cursor [F4] Executes the program until reaching the cursor position.

Toggle breakpoints option sets new breakpoints or removes those


Toggle Breakpoint [F5]
already set at the current cursor position.

Show/Hide breakpoints [Shift+F4] Shows/Hides window with all breakpoints

Clears breakpoints [Shift+Ctrl+F5] Delete selected breakpoints

Opens window with available interrupts (doesn't work in mikroICD™


Jump to interrupt [F2]
mode)

page 15
UART via RS-232
communication

The UART (universal asynchronous


receiver/transmitter) is one of the most
Enabling RS-232 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 full-duplex
communication. Both sides must be initialized with
the same baud rate, otherwise the data will not be
received correctly.

RS-232 serial communication is performed through a


In order to enable RS-232 9-pin SUB-D connector and the microcontroller UART
communication, you must set J3 module. In order to enable this communication, it
and J4 jumpers in the RS-232 is necessary to establish a connection between
position, and enable desired RX RX and TX lines on SUB-D connector and the
and TX lines via SW1 and SW2 same pins on the target microcontroller using
DIP switches. For example, if you DIP switches. Since RS-232 communication
want to enable RS-232 connection voltage levels are different than
on UART1 module of the default microcontroller logic levels, it is
PIC18F45K22 chip, you should necessary to use a RS-232
enable SW1.1 (RC7) and SW2.1 Transceiver circuit, such as
(RC6) lines. MAX3232 as shown
on Figure 6-1.

VCC-MCU VCC-MCU CN37


DATA BUS
U4
1 16 E8
RC7 C1+ VCC
O
N

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

RB5 T2OUT T2IN


2

TX-232 RB2 8 9
3

TX RB1 R2IN R2OUT


4

TX-FTDI RA2 MAX3232 RS232


5

RB7 C31 C29


J4
6

RC4 100nF 100nF VCC-MCU


7

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:

In order to enable USB-UART http://www.ftdichip.com/Drivers/VCP.htm


communication, you must set J3
and J4 jumpers in the USB-UART USB-UART communication is being done through a FT232RL
position, and enable desired RX controller, USB connector (CN32), and microcontroller UART
and TX lines via SW1 and SW2 DIP module. To establish this connection, you must put J3 and
switches. For example, if you want J4 jumpers in the USB-UART position, and connect
to enable USB-UART connection RX and TX lines to the appropriate pins of the
on UART1 module of the default microcontroller. This connection is done
PIC18F45K22 chip, you should using DIP switches SW1 and SW2.
enable SW1.1 (RC7) and SW2.1
(RC6) lines.

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

RX-232 RB1 TXD OSCO 2K2 4K7


2 27 D- 2
3

RX RB4 DTR# OSCI


3 26
4

RX-FTDI RA3 RTS# TEST


4 25 D+ 3
5

RB5 VCCIO AGND R78


J3 TX-FTDI 5 24
6

RC5 RXD NC RX TX 4K7


6 23 RX-LED GND 4
7

RD7 RI# CBUS0


7 22 TX-LED
8

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

RB5 CTS# GND 10K


12 17 VCC-MCU VCC-5V VCC-5V
2

TX-232 RB2 CBUS4 3V3OUT


13 16
3

TX RB1 CBUS2 USBDM


14 15
4

TX-FTDI RA2 CBUS3 USBDP


C34 C50 E12
5

RB7
J4 FT232RL 100nF 100nF 10uF
6

RC4 C32
7

RD6 100nF
8

SW2

Figure 7-1: USB-UART connection schematic

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.

Figure 8-4: USB connection schematic


DATA BUS
Enabling USB connection PIC18F4550
(jumpers are in USB disabled position)
PIC18F2XJ50
Depending on your target microcontroller, USB communication can be enabled on J12 VCC-3.3
PORTA or PORTC. For PIC18(L)F1XK50 you should put J18 jumpers in the USB RC3

position (Figure 8-3). For PIC18Fxx(J)50, PIC18Fxx(J)53, PIC18Fxx(J)55 RC3-MCU


CN4
and PIC18Fxx58 place J12 jumpers in the USB position (Figure 8-2). RC4

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

Integrate mikroBUS™ in your design


mikroBUS™ is not made to be only a part of our development boards. You can freely
place mikroBUS™ host connectors in your final PCB designs, as long as you clearly mark
them with mikroBUS™ logo and footprint specifications. For more information, logo
artwork and PCB files visit our website:

http://www.mikroe.com/mikrobus/

page 19
connectivity

ADC click™ RFiD click™ BlueTooth click™ MP3 click™ GSM click™

Click Boards are plug-n-play! ™


MikroElektronika portfolio of over 200 accessory boards is now enriched hardware configuration. Just plug and play. Visit the Click boards™ webpage
by an additional set of mikroBUS™ compatible Click Boards™. Almost each for the complete list of available boards:
month several new Click boards™ are released. It is our intention to provide
the community with as much of these boards as possible, so you will be able
http://www.mikroe.com/click/
to expand your EasyPIC™ v7 with additional functionality with literally zero

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

One of the most distinctive features of


EasyPIC™ v7 are it’s Input/Output PORT groups.
They add so much to the connectivity potential of
the board.

Everything is grouped together

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 pull-up/down DIP switches

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

PC_LED RN8-8 RN8-7 RN8-6 RN8-5 RN8-4 RN8-3 RN8-2 RN8-1


3

10K 10K 10K 10K 10K 10K 10K 10K


4
5
6

LD24 LD23 LD22 LD21 LD20 LD19 LD18 LD17


7

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

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. EasyPIC™ v7 provides the connector and the
necessary interface for supporting 2x16 character
LCDs in 4-bit mode. This type of display has two rows
consisted of 16 character fields. Each field is a 7x5 pixel
matrix. Communication with the display module is done
through CN7 display connector. Board is fitted with uniquely
designed plastic display distancer, which allows the LCD module Figure 11-1: On-board LCD 2x16 display connector
to perfectly and firmly fit into place.
Connector pinout explained
IMPORTANT: Make sure to turn off the power supply before placing LCD onto
the board. Otherwise your display can be permanently damaged. GND and VCC - Display power supply lines
Vo - LCD contrast level from potentiometer P4
VCC-5V
RS - Register Select Signal line
E - Display Enable line

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

1K LED- - Connection with the back-light LED cathode


R89 LCD-GLCD BPWM
4K7
GND

GND
GND
GND
GND
GND

Figure 11-2: 2x16 LCD


connection schematic Standard and PWM-driven back-light
CN7 We have allowed LCD back-light to be enabled in two different
LCD SOCKET
ways:
1. It can be turned on with full brightness using SW4.6 switch.
Vss

D0
RS

D1
D2
D3
D4
D5
D6
D7
Vdd
Vee

E
R/W

A
K

2. Brightness level can be determined with PWM signal from the


microcontroller, allowing you to write custom back-light controlling
software. This back-light mode is enabled with SW4.5 switch.

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

Standard and PWM-driven back-light


As for LCD, we have allowed GLCD back-light to be enabled in two
different ways:
1. It can be turned on with full brightness using SW4.6 switch.
2. Brightness level can be determined with PWM signal from the
microcontroller, allowing you to write custom back-light controlling
software. This back-light mode is enabled with SW4.5 switch.

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.

Correctly placing the touch panel cable into the connector

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

with RC0 and RC1 digital outputs on


100K
21
22
23
24

100nF 10K
TOP
RIGHT

microcontroller sockets. Make sure to


LEFT
BOTTOM

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

from the interface lines in order not to 5 through 8 on SW3 to enable


2

Figure 13-4: Touch Panel


3
4

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

10K 10K SW4


1
2
3
4
5

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

Figure 14-2: 4-digit 7-segment display schematic

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.

Enabling DS1820 Sensor


1 2 3 4

Figure 15-1: Figure 15-2: Figure 15-3: Figure 15-4:


DS1820 not DS1820 DS1820 DS1820 GND

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

Enabling LM35 Sensor


1 2 3 4

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

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 Enabling ADC inputs
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 10-bit 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 0-5V, can be divided into 1024 discrete steps of about 4.88mV.
EasyPIC™ v7 provides an interface in form of two potentiometers for simulating analog input voltages that can be routed to
any of the 10 supported analog input pins.

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

SCL A2 EEPROM-SDA RC4


EEPROM-SDA 5 4
8

SDA VSS Figure 18-1:


SW4
24C08 Schematic of
I2C EEPROM
module

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

Enabling Piezo Buzzer


PERSPECTIVE
DATA BUS 1K BUZZER VIEW

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.

1 1 GND is located between UART module and 4-digit 7-seg display.

2 GND is located in the cross section between DIP18 and DIP14 sockets

3 GND is located between PORTD I/O group and DIP28 socket.

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/

Choose between mikroC™, mikroBasic™ and mikroPascal™, and


download fully functional demo version, so you can begin building
your PIC® applications.

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 and browse through more than 150 want to ask a simple, basic question,
that demonstrate the use of each and thousand posts. You are likely to find that’s pulling us back for a while.
every feature of the EasyPIC™ board, just the right information for you. We do understand how important
and 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 programmers, and subscribe to receive lifetime, so if something goes wrong,
Examples available on this link: notifications on their code. we are ready and willing to help!

www.mikroe.com/easypic/ www.libstock.com/ www.mikroe.com/support/

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.

HIGH RISK ACTIVITIES


The products of MikroElektronika are not fault – tolerant nor designed, manufactured or intended for use or resale as on – line control equipment in hazardous environments
requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support
machines or weapons systems in which the failure of Software could lead directly to death, personal injury or severe physical or environmental damage (‘High Risk
Activities’). MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities.

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.

Copyright © MikroElektronika™, 2014, All Rights Reserved.


If you want to learn more about our products, please visit our website at www.mikroe.com
If you are experiencing some problems with any of our products or just need additional
information, please place your ticket at www.mikroe.com/support/
If you have any questions, comments or business proposals,
do not hesitate to contact us at office@mikroe.com

Você também pode gostar