easypic6 manual v100
Post on 05-Apr-2018
221 Views
Preview:
TRANSCRIPT
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 1/28
EasyPIC
®
6User manual
A large number of useful peripherals, ready-to-use practical code
examples and a broad set of add-on boards make MikroElektronika
development systems fast and reliable tools that can satisfy the needs
of experienced engineers and beginners alike.
D e v
e l o p m e n t s y s t e m
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 2/28
TO OUR VALUED CUSTOMERS
MikroElektronika.
It is our intention to provide you with the best quality products. Furthermore, we will continue to improve our
performance to better suit your needs.
The Microchip® name and logo, PIC® and dsPIC® are registered trademarks of Microchip Technology Incorporated in the U.S.A. and
other countries. All other trademarks mentioned herein are property of their respective companies and are only used for the purpose of
Nebojsa Matic
General Manager
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 3/28
3
MikroElektronika
p a g e
EasyPIC6 Development System
TABLE OF CONTENTS
Introduction to EasyPIC6 Development System............................................................................................. 4
Key Features ................................................................................................................................................. 5
1.0. Connecting the System to your PC.........................................................................................................
62.0. Supported Microcontrollers...................................................................................................................... 7
3.0. On-Board Programmer............................................................................................................................ 8
4.0. mikroICD (Hardware In-Circuit Debugger)............................................................................................. 10
5.0. Power Supply.......................................................................................................................................... 11
6.0. RS-232 Communication Interface........................................................................................................... 12
7.0. PS/2 Communication Interface............................................................................................................... 13
8.0. ICD Connector........................................................................................................................................ 139.0. USB Communication.............................................................................................................................. 14
10.0. DS1820 Temperature Sensor............................................................................................................... 15
11.0. A/D Converter....................................................................................................................................... 16
12.0. LEDs..................................................................................................................................................... 17
13.0. Push Buttons........................................................................................................................................ 18
14.0. Keyboards............................................................................................................................................ 19
15.0. 2x16 LCD Display................................................................................................................................. 20
16.0. On-Board 2x16 LCD Display................................................................................................................. 21
17.0. 128x64 Graphic LCD Display................................................................................................................ 22
18.0. Touch Panel.......................................................................................................................................... 23
19.0. I/O Ports................................................................................................................................................24
20.0. Port Expander ......................................................................................................................................26
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 4/28
p a g e
Introduction to EasyPIC ® 6 Development Board
The EasyPIC6 development system is an extraordinary development tool suitable for programming and experimenting with PIC®microcontrollers from MICROCHIP®. The board includes an on-board programmer with mikroICD® support (In-Circuit Debugger) providing
and program your microcontroller using the ® programmer. Numerous on-board modules, such as 128x64 graphic LCD display, 2x16
LCD display, on-board 2x16 LCD display, keypad 4x4, port expander etc., allow you to easily simulate the operation of the target device.
EasyPIC6 Development System4
MikroElektronika
Full-featured and user-
friendly development board
for PIC microcontrollers
High-Performance USB 2.0
On-Board Programmer
Hardware In-Circuit Debug-
ger for step by step debug-
ging at hardware level
Port Expander provides easy
I/O expansion (2 additionalports) using serial interface
On-Board 2x16 serial LCD
Display
Graphic LCD display with
backlights
Power supply: over a DC connector (7V to 23V AC or 9V to 32V DC); or
over a USB cable (5V DC)
Power consumption: up to 40mA (depending on how many on-board modules
are currently active)
Size: 26,5 x 22cm (10,43 x 8,66inch)
Weight: ~417g (0.919lbs)
Development board:
CD: product CD with appropriate software
Cables:
Documentation: manual, mikroICD manual, manual, manual and
of the develop-
ment system
The program provides a complete list of all supported microcontrollers.
The latest version of this program with updated list of supported microcontrollers
can be downloaded from our website www.mikroe.com
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 5/28
5
MikroElektronika
p a g e
EasyPIC6 Development System
1 2 3 64 75 98 10
12
13
15
16171820 1921
28
27
26
22
11
14
Key Features
1. Power supply voltage regulator
2. On-board programmer USB connector
3. USB 2.0 programmer with mikroICD support
4. DS1820 temperature sensor socket
5. External MICROCHIP debugger (ICD2 or ICD3) connector
6. USB communication connector
7. A/D converter test inputs
8. PS/2 connector
9. On-board 2x16 LCD display
10. DIP switches to enable pull-up/pull-down resistors
11. Port pins’ pull-up/pull-down mode selection
12. I/O port connectors
13. PIC microcontroller sockets
14. Touch panel controller
15. Port expander
16. 128x64 graphic LCD display connector
17. 128x64 graphic LCD display contrast potentiometer
18. Touch panel connector 19. Menu keypad
20. Keypad 4x4
21. Push buttons to simulate digital inputs
22. Logic state selector
23. Protective resistor ON/OFF jumper
24. Reset button
25. 36 LEDs to indicate pins’ logic state
26. Alphanumeric LCD display contrast adjustment
27. Alphanumeric LCD display connector
28. RS-232 communication connector
23
24
25
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 6/28
6
MikroElektronika
p a g e
EasyPIC6 Development System
1.0. Connecting the System to your PC
Use the USB cable to connect the EasyPIC6 development system to your PC. One end of the USB cable provided with a connector of the USB
B type should be connected to the development system as shown in Figure 1-2, whereas the other end of the cable (USB A type) should be
connected to your PC. When establishing a connection, make sure that jumper J6 is placed in the USB position as shown in Figure 1-1.
Follow the instructions for installing USB drivers and the programmer provided in the relevant manuals. It is not possible to program
PIC microcontrollers without having these devices installed. In case that you already have some of the MikroElektronika’s compilers installed
on your PC, there is no need to reinstall the programmer as it will be automatically installed along with compiler installation.
Turn on your development system by setting the power supply switch to the ON position. Two LEDs marked as ‘POWER’ and ‘USB LINK’ will
be automatically turned on to indicate that your development system is ready for use. Use the programmer to dump a code into the
microcontroller and employ the board to test and develop your projects.
If you use some additional modules, such as LCD, GLCD, extra boards etc., it is necessary to place them properly on the develop-
ment system before it is turned on. Otherwise, they can be permanently damaged.
Connecting USB cable (jumper J6 in the USB position)
1 2
Power supply
Power OFF/ON switch
J6 power supply selector
DC connector
Placing additional modules on the board
USB connector
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 7/28
7
MikroElektronika
p a g e
2.0. Supported Microcontrollers
The development system provides eight separate sockets for PIC microcontrollers in DIP40, DIP28, DIP20, DIP18, DIP14 and
DIP8 packages. These sockets allow supported devices in DIP packages to be plugged directly into the development board.There are two sockets for PIC microcontrollers in DIP18 package provided on the board. Which of these sockets you will use depends solely
on the pinout of the microcontroller in use. The EasyPIC6 development system comes with the microcontroller in a DIP40 package.
EasyPIC6 Development System
Jumpers next to the sockets are used for selecting functions of
the microcontroller pins:
Jumper Position
J22RA0 - I/O pin
J23
RA0 - I/O pin
J16RA5 - I/O pin
VCC - 18F2331/2431 power supply
J13OSC - RA6, RA7 are OSC. pins
I/O - RA6, RA7 are I/O pins
J14OSC - RA4, RA5 are OSC. pins
I/O - RA4, RA5 are I/O pins
Microcontroller sockets
Prior to plugging the microcontroller into the appropriate socket, make sure that the power supply is turned off. Figure 2-2 shows how to
correctly plug a microcontroller. Figure 1 shows an unoccupied 40-pin DIP socket. Place one end of the microcontroller into the socket
as shown in Figure 2. Then put the microcontroller slowly down until all the pins thereof match the socket as shown in Figure 3. Check
again that everything is placed correctly and press the microcontroller easily down until it is completely plugged into the socket as shown
in Figure 4.
Only one microcontroller may be plugged into the development board at the same time.
PIC microcontrollers normally use a quartz crystal for the purpose of stabilizing clock frequency. The EasyPIC6 provides two sockets for
quartz-crystal. Microcontrollers in DIP18A, DIP18B, DIP28 and DIP40 packages use socket X1 (OSC1) for quartz-crystal. If microcontrollers
in DIP8, DIP14 and DIP20 packages are used, it is necessary to move quartz crystal from socket X1 to socket X2 (OSC2). Besides, it
is also possible to replace the existing quartz-crystal with another one. The value of the quartz-crystal depends on the maximum clock
frequency allowed. Microcontrollers being plugged into socket 10F use their own internal oscillator and are not connected to any of the
aforementioned quartz-crystal sockets.
Plugging microcontroller into appropriate socket
1 3 4
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 8/28
8
MikroElektronika
p a g e
EasyPIC6 Development System
The programmer is an obligatory tool when working with microcontrollers. The EasyPIC6 has an on-board programmer
with mikroICD support which allows you to establish a connection between the microcontroller and your PC. Use the programmer toprogrammer and microcontroller.
Jumpers J8 and J9 used for selecting socket
with the microcontroller
programmer
Jumper J7 used for selecting the MCLR pin’s
function
For more information on the programmer refer to the relevant manual provided in the EasyPIC6 development system package.
The programmer
window contains several options
for microcontroller settings. A
number of buttons which will
make the programming process
easier are provided on the right
side of the window. There is
also an option at the bottom of
the window which will enable
you to monitor the programming
progress.Write a code in some of PIC compilers, generate
care of loading data into the microcontroller.
3
Compiling
program
The principle of programmer’s operation
Write a program in some of PIC
Use the programmer to
select an appropriate microcontroller
Click the button to load the
program into the microcontroller.
21
2
1
3
Jumpers J10 used for connecting PGM line
Executing code in binary
and hexadecimal format
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 9/28
9EasyPIC6 Development System
MikroElektronika
p a g e
There are two ways of programming PIC microcontrollers: Low Voltage and High Voltage programming modes. The programmer uses
solely High Voltage programming mode during its operation. This mode requires voltage higher than the microcontroller’s power supply voltage
(the range between 8V to 14V, depending on the type of the microcontroller in use) to be brought to the MCLR/Vpp pin in order so that the
process of programming/debugging may be performed.
mode is enabled, the programming process is initiated by applying a logic one (1) to the PGM pin. Unlike this mode, the High Voltage programming
mode is always enabled and the programming process starts by applying a high voltage to the MCLR/Vpp pin.
All PIC microcontrollers have the Low Voltage programming mode enabled by default. In some rare cases, in order to enable the microcontroller
to be programmed in the High Voltage programming mode, it is necessary to apply a logic zero (0) to the PGM pin, which prevents the
microcontroller from entering the Low Voltage programming mode. Depending on the microcontroller in use, it is possible to select one of the
following pins RB3, RB4 and RB5 to be used as the PGM pin. Jumper J10 is used as the PGM pin selector as shown in Figure 3-3.
Jumper J10 position
when the PGM lineis connected to the
RB3 pin.
Jumper J10 position
when the PGM line isconnected to the RB4
pin.
Jumper J10 position
when the PGM lineis connected to the
RB5 pin.
Jumper J10 default position
when RB3, RB4 and RB5
pins are not connected to
the PGM line.
Various positions of jumper J10
Jumpers J8 and J9 are used for selecting the socket to receive theprogramming signal. Figure 3-5 shows the position of jumpers J8
and J9 depending on DIP sockets in use.
The position of jumpers J8 and J9
Microcontroler is pluggedinto one of the following
sockets: DIP40, DIP28
DIP18A or DIP18B.
(Default position)
Microcontroller is pluggedinto one of the following
sockets: DIP20, DIP14 or
DIP8.
The function of the MCLR (Master Clear) pin depends on the position
of jumper J7. When placed in the left-hand position, the MCLR pin
has default function, i.e. is used as MCLR/Vpp. Otherwise, when the
jumper is placed in the right-hand position, the MCLR pin is availableas an I/O pin.
The position of jumper J7
MCLR used as an
I/O pin.
MCLR used as the
MCLR/Vpp pin.
MCU-PGD
Multiplexer PGD
PROG USB
VCC
D+GND
D-
Build-in with mikroICDprogrammer
MCU-PGCPGC
MCLR
Programming lines User interface
MCLR
R
R
R
DATA
Programmer schematic
During programming, a multiplexer disconnects
the microcontroller pins used for programming
from the rest of the board and connects them to
the programmer. After the programming
is complete, these pins are disconnected from the
programmer and may be used as input/output
pins.
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 10/28
10 EasyPIC6 Development System
MikroElektronika
p a g e
4.0. mikroICD (In-Circuit Debugger)
The mikroICD (In-Circuit Debugger) is an integral part of the on-board programmer. It is used for the purpose of testing and debugging
programs in real time. The process of testing and debugging is performed by monitoring the state of all registers within the microcontroller while operating in real environment. The mikroICD software is integrated in all compilers designed by mikroElektronika (mikroBASIC®,
mikroC® and mikroPASCAL®
The mikroICD debugger communicates with the PC through the programming pins which cannot be used as I/O pins while the process of
the program debugging is in progress.
For more information on the mikroICD debugger refer to the manual.
Icon commands
A list of selected registers to be moni-
tored. The state of these registers
changes during the program execution,
which can be viewed in this window
A complete list of registers within the
programmed microcontroller
Double click on the
enables you to change data format
During operation, the program line to be executed next is
highlighted in blue, while the breakpoints are highlighted in
red. The Run command executes the program in real time
until it encounters a breakpoint.
Figure 4-1: mikroICD Watch Values window
In this example the 41st program
line is highlighted in blue, which
means that it will be executed
next. The current state of all
registers within the microontroller
can be viewed in the mikroICD
window.
After the command is
executed, the microcontroller will
execute the 41st program line.
The next line to be executed is
highlighted in blue. The state
of registers being changed by
executing this instruction may
be viewed in the
window.
The mikroICD debugger also offers functions such as running a program step by step (single stepping), pausing the program execution
to examine the state of currently active registers using breakpoints, tracking the values of some variables etc. The following example
illustrates a step-by-step program execution using the command.
Start Debugger [F9]
Run/Pause Debugger [F6]
Stop Debugger [Ctrl+F2]Step Into [F7]
Step Over [F8]
Step Out [Ctrl+F8]
Toggle Breakpoint [F5]
Show/Hide Breakpoints [Shift+F4]
Clear Breakpoints [Ctrl+Shift+F4]
Each of these commands is activated viakeyboard shortcuts or by clicking appropriateicon within the window.
1
2
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 11/28
11EasyPIC6 Development System
MikroElektronika
p a g e
5.0. Power Supply
The EasyPIC6 development system may use one of two power supply sources:
1. +5V PC power supply through the USB programming cable;2. External power supply connected to a DC connector provided on the development board.
The MC34063A voltage regulator is used for enabling external power supply voltage to be either AC (in the range of 7V to 23V) or DC(in the range of 9V to 32V). Jumper J6 is used as power supply selector. When using USB power supply, jumper J6 should be placed inthe USB position. When using external power supply, jumper J6 should be placed in the EXT position. The development system is turnedOFF/ON by changing the setting on the OFF/ON switch respectively.
CN16
AC/DC
R55
3K
R57
0.22
R56
1K
E2
J6
10uF
E3
330uF
E1
U10
D12
4x1N4007
D13 D14
D15330uF
OFF ON
C8
220pF
VCC-5VVCC-USB
MC34063A
L2220uH
D7
MBRS140T3
R142K2
LD42POWER
VCC
VCC-MCU
MOSFET
switch
on-board
programmer
SWC
SWE
CT
GND
DRVC
IPK
Vin
CMPR
Side view
Top view
221
Bottom viewSide view
3 3 0
3 5 A
8 N 6
Side view
Side view
A K1 0 6
1 0 V
Side view A K
Side view
+1 0 6
1 0 V
Side view
M C
3 4 0 6 3 A
Figure 5-2: Power supply source schematic
AC/DC connector
USB connector power supply
Power supply voltage regulator DC connector (2)
Jumper J6 used for
selecting power supply
OFF/ON switch
USB connector (1)
Figure 5-1: Power supply
The programmer uses the MOSFET switch for suspending power supply on the development system during programming. When theprocess of programming is complete, the programmer enables the development system to be supplied with power.
SMD MOSFET
IRFR9024N
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 12/28
12 EasyPIC6 Development System
MikroElektronika
p a g e
6.0. RS-232 Communication Interface
RS-232 serial communication is performed through a 9-pin SUB-D connector and the microcontroller USART module. In order to enable
such communication, it is necessary to establish a connection between RX and TX communication lines ( lines CTS andRTS are optionally used) and microcontroller pins provided with USART module using a DIP switch. The microcontroller pins used in such
communication are marked as follows: RX - , TX - , CTS - and RTS - . Baud rate
goes up to 115kbps.
The USART (universal synchronous/asynchronous receiver/transmitter) is one of the most common ways of exchanging data between the
PC and peripheral components. In order to enable the USART module of the microcontroller to receive input signals with different voltage
levels, it is necessary to provide a voltage level converter such as MAX-202C.
P I C x x x x
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
R54
1K
R3
1K
MAX202
16
59
Bottom view
SUB-D 9p
Figure 6-2: RS-232 module schematic
Make sure that your microcontroller is provided with the USART module as it is not necessarily integrated in all microcontrollers.
The function of DIP switches SW7 and SW8 is to determine which of the microcontroller pins are to be used as RX and TX lines. The
microcontroller pinout varies depending on the type of the microcontroller. Figure 6-2 shows the microcontroller in DIP40 package
(PIC16F887).
Figure 6-1: RS-232 module
RS-232 connector
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 13/28
13EasyPIC6 Development System
MikroElektronika
p a g e
7.0. PS/2 Communication Interface
The PS/2 connector enables input units, such as keyboard and mouse, to be connected to the development system. In order to enable
PS/2 communication, it is necessary to correctly place jumpers J20 and J21, thus connecting DATA and CLK lines to the microcontroller pins RC0 and RC1. Do not connect/disconnect input units to the PS/2 connector while the development system is turned on as it may
permanently damage the microcontroller.
+5V
DATANC
NC CLK
VCC-MCUVCC
PS/2
J20RC0
RC1J21
DATA
CLK
NC
GND
VCC
NC
R371K
R381K
Front view
Bottom view
1
6
2 34
5
VCC-MCU
VCC-MCU
X1
8MHz
C6
22pF
C7
22pF
P I C x x x x
OSC2
RC0
RC1
RC2
RC3RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2RB3
RB4
RB5
RB6
RB7
DIP40
Figure 7-3: PS/2 connector connection schematic
Figure 7-1: PS/2 connector
(J20 and J21 are not connected)
Figure 7-2: PS/2 connector
(J20 and J21 are connected)
PS/2 connector
8.0. ICD Connector
ICD (In-Circuit Debugger) connector enables the microcontroller to communicate with external ICD debugger (ICD2 or ICD3)* from
MICROCHIP. Jumpers J8 and J9 are placed in the same way as when using the programmer with mikroICD designed by
MikroEektronika.
1
CN1
RJ12
CLK-PIC
DATA-PIC
GND
VCC
MCLR
23
4
56
Front view Bottom view
1
2
3
4
5
6
Side view
ICD connector pinout and pin labels
Figure 8-1: ICD connector
ICD connector
*ICD2 and ICD3 are registered trademarks of MICROCHIP®
Figure 7-4: EasyPIC6 connected to keyboard
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 14/28
14 EasyPIC6 Development System
MikroElektronika
p a g e
9.0. USB Communication
The USB connector enables PIC microcontrollers with a built-in USB communication module to be connected to peripheral components. In
order to enable USB communication, it is necessary to change the position of jumpers J12 from left-hand to right-hand, thus connecting the USBDATA lines (D+ i D-) to RC4 and RC5 microcontroller pins and the RC3/VUSB pin to capacitors C16 and C17. If USB communication is not used,
jumpers J12 should be left in the left-hand position. The status of USB communication (OFF/ON) is indicated by LED. Figures 9-3 and 9-4 show
schematics of the most commonly used microcontrollers with integrated USB module.
Figure 9-1: USB communication
disabled (default position)
Figure 9-2: USB communication
enabled
USB connector
VCC-MCU
VCC-MCU
X1
8MHz
C6
22pF
C7
22pF
P I C 1 8 F 4 5 5 0 OSC2
RC0
RC1
RC2
RC3/VUSB
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
RC3
RC4
RC5J12
CN4
USB B
D +
G N D
V C C
- B U S
D -
R424K7
LD44USB ON
C16
100nF
C17
100nF
Bottom view
VCC
GNDD+
D-
Figure 9-3: PIC18F4550 USB communication schematic
RC3
RC4
RC5J12
CN4
USB B
D +
G N D
V C C
- B U S
D -
R424K7
LD44USB ON
C16
100nF
C17
100nF
Bottom view
VCC
GNDD+
D-
VCC-MCU
X18MHz
C6
22pF
C7
22pF DIP28
RB6RA0
RB5RA1
RB4RA2
RB3RA3
RB2RA4
RB1RA5
RB0GND
VCC
GND
RC7RC6
RC5
RC4
OSC1
OSC2
RC0RC1
RC2
RC3
RB7MCLR
P I C 1 8 F 2 5 5 0
Figure 9-4: PIC18F2550 USB communication schematic
J u m p e r
J12 in the
left-hand
position
J u m p e r
J12 in the
left-hand
position
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 15/28
15EasyPIC6 Development System
MikroElektronika
p a g e
Figure 10-1: DS1820
connector (1-wire com-
munication is not used)
Figure 10-2: J11 in the
left-hand position (1-wire
communication throughthe RA5 pin)
Figure 10-3: J11 in the
right-hand position (1-wire
communication throughthe RE2 pin)
Figure 10-4: DS1820
plugged into appropriate
socket
NOTE: Make sure that half-
circle on the board matches
the round side of the
DS1820
10.0. DS1820 Temperature Sensor
1-wire® serial communication enables data to be transferred over one single communication line while the process itself is under the
control of the master microcontroller. The advantage of such communication is that only one microcontroller pin is used. All deviceshave by default a unique ID code, which enables the master device to easily identify all devices sharing the same interface.
DS1820 is a temperature sensor that uses 1-wire® standard for its operation. It is capable of measuring temperatures within the range of
-55 to 125°C and provides ±0.5°C accuracy for temperatures within the range of -10 to 85°C. Power supply voltage of 3V to 5.5V is required
for its operation. It takes maximum 750ms for the DS1820 to calculate temperature with 9-bit resolution. The EasyPIC6 development
system provides a separate socket for the DS1820. It may use either RA5 or RE2 pin for communication with the microcontroller. Jumper
J11’s purpose is selection of the pin to be used for 1-wire® communication. Figure 10-5 shows 1-wire® communication with microcontroller
through the RA5 pin.
Figure 10-5: 1-wire communication schematic
Jumper J11
in the upper position
VCC-MCU
VCC-MCU
DS1820DQ
J11
VCC-MCU
X1
8MHz
C6
22pF
C7
22pF
R1
1KP I C x x x x
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5RE0
RE1
RE2
VCC
RB0RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
Botoom view
VCC-MCU
DQ
GND
VCC-MCU
DQ
GND
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 16/28
16 EasyPIC6 Development System
MikroElektronika
p a g e
11.0. A/D Converter
An A/D converter is used for the purpose of converting an analog signal into the appropriate digital value. A/D converter is linear, which means
that the converted number is linearly dependent on the input voltage value.The A/D converter built into the microcontroller provided with the EasyPIC6 development system converts an analog voltage value into a
10-bit number. Voltages varying from 0V to 5V DC may be supplied through the A/D test inputs. Jumper J15 is used for selecting some of the
through the potentiometer or the microcontroller pin. The value of the input analog voltage can be changed linearly using potentiometer P1.
Figure 11-1: ADC (default
jumper positions)
Figure 11-2: The RA0 pin
used as A/D conversion input
VCC-MCU
VCC-MCU
VCC-MCUJ15
R63
220R
P110K
P110K
X1
8MHz
C6
22pF
C7
22pF
P I C x x x x
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4RA5
RE0
RE1
RE2
VCC
RB0
RB1RB2
RB3
RB4
RB5
RB6
RB7
DIP40
Top view
Figure 11-4: Microcontroller in DIP40 package and A/D converter test
inputs connectiion
Figure 11-5: Microcontroller in DIP28 package and A/D converter test
inputs connection
VCC-MCU
VCC-MCUJ15
R63
220R
P110K
P110K
X1
8MHz
C6
22pF
C7
22pF
Top view
VCC-MCU
VCC-MCU
J15
R63
220R
P110K
P110K
X1
8MHz
C6
22pF
C7
22pFTop view DIP18A
RB2RA1
OSC1RA4
OSC2MCLR
VCCGND
RB7RA2
RB6RA3
RB5RB0
RB4RB1
RB3RA0
Figure 11-3: Microcontroller in DIP18A package and A/D converter test
inputs connection
In order to enable the microcontroller to accurately perform A/D conversion, it is necessary to turn off LED diodes and
pull-up/pull-down resistors on port pins used by the A/D converter.
RA0 is A/D input RA0 is A/D input
RA0 is A/D input
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 17/28
17EasyPIC6 Development System
MikroElektronika
p a g e
12.0. LEDs
limiting resistor the value of which is calculated using formula R=U/I where R is referred to resistance expressed in ohms, U is referred tovoltage on the LED and I stands for LED diode current. A common LED diode voltage is approximately 2.5V, while the current varies from
1mA to 20mA depending on the type of LED diode. The EasyPIC6 development system uses LEDs with current I=1mA.
The EasyPIC6 has 36 LEDs which visually indicate the logic state of each microcontroller I/O pin. An active LED diode indicates that
a logic one (1) is present on the pin. In order to enable LEDs, it is necessary to select appropriate port PORTA/E, PORTB, PORTC or
PORTD using the DIP switch SW9.
Figure 12-2: LED diode and PORTB connection schematic
Figure 12-1: LEDs
Notch indicating the
SMD LED cathode
SMD LEDR
IR=U/I
472 A K
RB3
RB4
RB5
RB6
RB7
Microcontroller
SMD resistor limiting current
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 18/28
18 EasyPIC6 Development System
MikroElektronika
p a g e
13.0. Push Buttons
The logic state of all microcontroller digital inputs may be changed using push buttons. Jumper J17 is used to determine the logic state to be
applied to the desired microcontroller pin by pressing the appropriate push button. The purpose of the protective resistor is to limit maximumcurrent thus preventing a short circuit from occurring. Advanced users may, if needed, disable such resistor using jumper J24. Just next to the
push buttons, there is a RESET button which is not connected to the MCLR pin. The reset signal is generated by the programmer.
Figure 13-2: PORTB push button connection schematic
Jumper J17 in the
pull-up position
Figure 13-1: Push buttons
By pressing any push button (R0-R7) when jumper J17 is in the VCC-MCU position, a logic one (5V) will be applied to the appropriate
microcontroller pin as shown in Figure 13-2.
RESET button
Jumper J17 used for
selecting logic state to
be applied to the pin by
pressing button
Push buttons used for
simulating digital inputs
Jumper J24 used for en-
abling protective resistor
R1710K
RSTbut
VCC-MCU
C14100nF
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 19/28
19EasyPIC6 Development System
MikroElektronika
p a g e
14.0. Keypads
There are two keypads provided on the EasyPIC6 development system. These are keypad 4x4 and keypad MENU . Keypad 4x4 is a standard
alphanumeric keypad connected to the microcontroller PORTD. The performance of such a keypad is based on the ‘scan and sense’ principle
performed from within software. For example, pressing button ‘6’ will cause a logic one (1) to appear on the RD2 pin. In order to determine
which of the push buttons is pressed, a logic one (1) is applied to each of the following output pins RD4, RD5, RD6 and RD7.
Keypad MENU buttons are connected in a similar way to the PORTA buttons. The only difference is in the button arrangement. The keypad
MENU buttons are arranged so as to provide easy navigation through menus.
R58220R
VCC-MCU
J17
J24
VCC-MCU
VCC-MCU
X1
8MHz
C6
22pF
C7
22pF
P I C x x x x
OSC2
RC0
RC1
RC2
RC3RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2RB3
RB4
RB5
RB6
RB7
DIP40
BAT43
Side view A K
T37
T38
T39
T40 T45
T44
T43
T46 T50
T47
T48
T49 T53
T52
T51
T42
R D 1
R D 0
R D 0
R D 1
R D 2
R D 3
R D 4
R D 5
R D 6
R D 7
D8
D9
D10
D11
R D 2
R D 3
RD4
RD5
RD6
RD7
R59
R60
R61
R62
220R
220R
220R
220R
T54
T55 T56
T57
T59T58
R A 0
R A 1
R A 2
R A 3
R A 4
R A 5
VCC-MCU
J4
SW4
RN4 8x10K
Figure 14-4: Keypads (4x4 and MENU) and microcontroller connection schematic
Jumper J17 is
in the pull-up
position. Pins
RD2 and RD3
are connected
to pull-downresistors through
DIP switch SW4
Keypad 4x4 Keypad MENU
Keypad 4x4 performance
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 20/28
20 EasyPIC6 Development System
MikroElektronika
p a g e
15.0. 2x16 LCD Display
The EasyPIC6 development system provides an on-board connector to plug alphanumeric 2x16 LCD display into. Such connector is
connected to the microcontroller through the PORTB port. Potentiometer P4 is used for display contrast adjustment. The LCD switchon the DIP switch SW6 is used for turning on/off display backlight. Communication between an LCD display and the microcontroller is
established using a 4-bit mode. Alphanumeric digits are displayed in two lines each containing up to 16 characters of 7x5 pixels.
VCC-MCU VCC-MCU
VCC-MCU
SW6
VCC
LCD-GLCDBACKLIGHT
CN7
VCC-MCU
X1
8MHz D 7
L E D +
L E D
- D 6
D 5
D 4
D 3
D 2
D 1
D 0 E
R / W R
S V O
V C C
G N D
P410K
C6
22pF
C7
22pF
P
I C x x x x
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
R4310
Top view
R B
3
R B 2
R B 1
R B 0
G N D
G N D
G N D
G N D
G N D
V O
G N D
R B 5
R B 4
2x16 LCD display connection schematic
Figure 15-2: 2x16 LCD display
Contrast adjustment
potentiometer
Figure 15-1: Alphanumeric LCD connector
Connector for alphanumeric
LCD display
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 21/28
21EasyPIC6 Development System
MikroElektronika
p a g e
16.0. On-Board 2x16 LCD Display
On-board 2x16 display is connected to the microcontroller through a port expander. In order to use this display, it is necessary to set the DIP
switch SW10 to the ON position, thus connecting the on-board LCD display to port expander’s port 1. The DIP switch SW6 enables the portexpander to use serial communication. Potentiometer P5 is used for display contrast adjustment.
Unlike common LCD display, the on-board LCD display has no backlights and receives data to be displayed through the port expander
which employs SPI communication for the purpose of communicating with the microcontroller. Similar to standard 2x16 LCD display, the
on-board 2x16 LCD display also displays digits in two lines each containing up to 16 characters of 7x5 pixels.
VCC-MCU
VCC-MCU
X1
8MHz
C6
22pF
C7
22pF
C O G - D 7
R B 0
P E - I N T A
P E - I N T B
R B 1
D 7
C O G - D 6
D 6
C O G - D 5
D 5
C O G - D 4
D 4 D 3 D 2 D 1 D 0
R / W
C O G - E
E
C O G - R S
R S
V C C - M C U
G N D V o
VCC-MCU
VCC-MCU
RA2SW6
SW10
CN17
RA3RC3RC4RC5
P1.2
U5
P 1 . 2
P1.3
P 1 . 3
P1.4
P 1 . 4
P1.5
P 1 . 5
P1.6
P 1 . 6
P1.7
P 1 . 7
SCKSPI-
SPI-SCK
CS#PE-PE-CS#
MOSISPI-
SPI-MOSI MISOSPI-SPI-MISO
PE- #RST
PE- #RST
PE-INTB
PE-INTA
MCP23S17
P510K
Top view
GND
CS
SCK
SI
SO
GPA7
GPA6
GPA5
GPA4
GPA3
GPA2
GPA1
GPA0
INTA
INTB
RESET
A2
A1
A0
VCC
GPB0
GPB1
GPB2
GPB3
GPB4
GPB5
GPB6
GPB7VCC-MCU
P I C x x x x
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0RE1
RE2
VCCRB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
R2100K
Figure 16-2: On-board 2x16 LCD display connection schematic
Figure 16-1: On-board 2x16 LCD display
DIP switch SW10 to
turn the on-board 2x16
LCD display ON Contrast adjustment
potentiometer
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 22/28
22 EasyPIC6 Development System
MikroElektronika
p a g e
17.0. 128x64 Graphic LCD Display
128x64 graphic LCD display (128x64 GLCD) provides an advanced method for displaying graphic messages. It is connected to the
microcontroller through PORTB and PORTD. GLCD display has the screen resolution of 128x64 pixels which allows you to display diagrams,tables and other graphical contents. Since the PORTB port is also used by 2x16 alphanumeric LCD display, you cannot use both displays
simultaneously. Potentiometer P3 is used for the GLCD display contrast adjustment. Switch 8 on the DIP switch SW6 is used for turning
on/off display backlight.
.
22pF
P I C x x x x
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5RE0
RE1
RE2
VCC
RB0RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
SW6
VCC
R2810
Top viewLCD-GLCDBACKLIGHT
Figure 17-3: GLCD display connection schematic
Figure 17-1: GLCD display
GLCD connector
Figure 17-2: GLCD connector
Touch panel connector
Contrast adjustment
potentiometer
23
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 23/28
23EasyPIC6 Development System
MikroElektronika
p a g e
Now you can plug a GLCD display into the appropriate connector as shown in Figure 4.
LEDs and pull-up/pull-down resistors on the RA0 and RA1 pins of the PORTA port must be turned off when using a touch panel.
shown in Figure 4.
18.0. Touch Panel
The touch panel is a thin, self-adhesive, transparent panel sensitive to touch. It is placed over a GLCD display. The main purpose of this
Switches 5,6,7 and 8 on the DIP switch SW9 are used for connecting touch panel to the microcontroller.
TOUCHPANELCONTROLLER
GLCD
Q14
BC856
Q12
BC846
VCC-MCU
VCC-MCU
VCC-MCU
VCC-MCU
Q
BC856
15
Q
BC846
13
R48
1K
R47
1 K0
R46
1 K0
CN13
R45
1 K0
R44
1K
R52
K100
R50
1K
R51
1 K0
R53
K100
C 2 5
1 0 0 n
F
C 2 6
1 0 0 n
F
R491 K0
Q
BC846
16
VCC-MCU
VCC-MCU
SW9
BO TOMT
LEFTDRIVEADRIVEB
X1
8MHz
C6
22pF
C7
22pF
P I C x x x x
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2
RB3
RB4RB5
RB6
RB7
DIP40
LEFT
LEFT
TOP
TOP
RIGHT
RIGHT
BOTTOMBOTTOM
Figure 18-2: Touch panel connection schematic
Figure 18-3: Placing touch panel
431
Figure 18-1: Touch panel
1 3 4
24 E PIC6 D l S
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 24/28
24 EasyPIC6 Development System
MikroElektronika
p a g e
19.0. Input/Output Ports
Along the right side of the development system, there are seven 10-pin connectors which are connected to the microcontroller’s I/O ports.
Some of the connector’s pins are directly connected to the microcontroller pins, whereas some of them are connected using jumpers. DIPswitches SW1-SW5 enable each connector pin to be connected to one pull-up/pull-down resistor. Whether port pins are to be connected to
a pull-up or pull-down resistor depends on the position of jumpers J1-J5.
Jumper for pull-up/ pull-
down resistor selection
2x5 PORTA male connector
Figure 19-1: I/O ports
DIP switch to turn
on pull-up/pull-down
resistors for each pin
Figure 19-4: PORTB schematic connection
Jumper J2 in the pull-down position
Figure 19-2: J2 in thepull-down position
J2 in the
pull-up position
Additional module connected
to PORTC
25EasyPIC6 Development System
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 25/28
25EasyPIC6 Development System
MikroElektronika
p a g e
Pull-up/pull-down resistors enable voltage signal to be brought to the microcontroller pins. The logic level at pin idle state depends on the
pull-up/pull-down jumper position. The RB0 pin along with the relevant DIP switch SW2, jumper J2 and RB2 push button with jumper J17 are
used here for the purpose of explaining the performance of pull-up/pull-down resistors. The principle of their operation is identical for all the
microcontroller pins.
In order to enable PORTB pins to be connected to
pull-down resistors, it is necessary to set jumper J2
in the lower position, thus providing 8x10K resistor
network with a logic zero (0V). To bring a signal to
the RB0 pin, it is necessary to set switch 1 on the DIP
switch SW2 to the ON position. This will cause the
microcontroller RB0 pin to be ‘pulled down’ to the low
logic level (0V) in its idle state.
Jumper J17, used to determine the pin logic state
provided by pressing push-buttons, should be set inthe opposite position of jumper J2.
Accordingly, every time you press the RB0 push
button, a logic one (1) will appear on the RB0 pin.
In order to enable PORTB pins to be connected to
pull-up resistors, it is necessary to set jumper J2 in
the upper position (5V) and jumper J17 in the lower
position (0V). This enables each PORTB pin to be
‘pulled up’ to the high logic level (5V) in its idle state.
In order to do this, it is necessary to set appropriate
switch on the DIP switch SW2 to the ON position.
Accordingly, every time you press the RB0 push
button, a logic zero (0) will appear on the RB0 pin.
In this case, jumpers J2 and J17 have the same logic
state which means that pressing push button will not
cause any pin to change its logic state.
Jumpers J2 and J17 in the same position
Figure 19-5: Jumper J2 in pull-down and J17 in pull-up positions
Jumper J2 in pull-up and J17 in pull-down positions
26 EasyPIC6 Development System
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 26/28
26 EasyPIC6 Development System
MikroElektronika
p a g e
20.0. Additional I/O Ports
The SPI communication lines and MCP23S17 circuit provide the EasyPIC6 development system with a means of increasing the number of
available I/O ports by two. If the port expander is connected over the DIP switch SW6, the following pins RA2, RA3, RC3, RC4 and RC5 willbe used for SPI communication and thus cannot be used as I/O pins. Switches INTA and INTB on the DIP switch SW10 enable interrupt.
Figure 20-3: Port expander schematic
Jumpers J18 and J19 in the upper position
Figure 20-1: Port expander
DIP switch connecting port
expander to the microcontroller
Jumper for selecting
pull-up/pull-down resistor
PORT0
PORT1
Figure 20-2: DIP switch SW6 when port
expander is enabled
DISCLAIMER
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 27/28
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, may 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 is prohibited.
purpose.
MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may
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.
All the product and corporate names appearing in this manual may or may not be registered trademarks
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
life support machines or weapons systems in which the failure of Software could lead directly to death,
Copyright 2003 – 2009 by MikroElektronika. All rights reserved.
8/2/2019 Easypic6 Manual v100
http://slidepdf.com/reader/full/easypic6-manual-v100 28/28
I f y o u w a n t t o l e a r n m o r e a b o u t o u r p r o d u c t s , p l e a s
e v i s i t o u r w e b s i t e a t w w w . m
i k r o e . c o m
I f y o u a r
e e x p e r i e n c i n g s o m e
p r o b l e m s w i t h a n y o f
o u r p r o d u c t s o r j u s t n e e d a d d i t i o n a l i n f o r m a
t i o n , p l e a s e p l a c e y o u r t i c k e t a t
w w w . m i
k r o e . c o m / e n / s u p p o r t
top related