background image

EasyPIC

ICD

4

S O F T W A R E A N D H A R D W A R E S O L U T I O N S F O R T H E E M B E D D E D W O R L D

MikroElektronika

Development tools - Books - Compilers

Software and Hardware

solutions for Embedded World 

With useful implemented peripherals, plentiful practical
code examples and a broad set of additional add-on
boards (Serial Ethernet, Compact Flash,  MMC/SD,
ADC, DAC, CAN, RTC, RS-485, etc.), MikroElektronika
development boards make fast and reliable tools that
can satisfy the needs of experienced engineers and
beginners alike.

EasyPIC4

User

s Manual

3

in

1

ICD

mikro

IN-CIRCUIT

DEBUGGER

ICD

mikro

IN-CIRCUIT

DEBUGGER

MICROCHIP

DEVELOPMENT

BOARD

MICROCHIP

DEVELOPMENT

BOARD

PIC

PIC

USB 2.0

IN-CIRCUIT

PROGRAMMER

USB 2.0

IN-CIRCUIT

PROGRAMMER

Summary of Contents for EasyPIC4

Page 1: ...de examples and a broad set of additional add on boards Serial Ethernet Compact Flash MMC SD ADC DAC CAN RTC RS 485 etc MikroElektronika development boards make fast and reliable tools that can satisfy the needs of experienced engineers and beginners alike EasyPIC4 User s Manual 3 in 1 ICD mikro IN CIRCUIT DEBUGGER ICD mikro IN CIRCUIT DEBUGGER MICROCHIP DEVELOPMENT BOARD MICROCHIP DEVELOPMENT BOA...

Page 2: ...HANTABILITY OR FITNESS FOR A PARTICULAR PUROSE IN NO EVENT SHALL MIKROELEKTRONIKA ITS DIRECTORS OFFICERS EMPLOYEES OR DISTRIBUTORS BE LIABLE FOR ANY INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING DAMAGES FOR LOSS OF PROFITS LOSS OF BUSINESS LOSS OF USE OR DATA INTERRUP TION OF BUSINESS AND THE LIKE EVEN IF MIKROELEKTRONIKA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES ARISING...

Page 3: ...n board USB 2 0 programmer page 11 Jumpers page 7 Switches page 6 MCU sockets page 8 LEDs page 16 Pushbutton switches page 18 PS 2 keyboard page 28 7 segment displays page 21 Graphic LCD page 22 LCD 2x16 in 4 bit mode page 23 LCD 2x16 in 8 bit mode page 24 A D Converter input page 30 CONTENTS DESCRIPTION OF THE DEVELOPMENT SYSTEM page 5 USB Communication page 27 Direct Port Access page 32 RS 232 C...

Page 4: ...o the PC Please use USB ports on the back of the PC with direct con nection to the motherboard Install the PICFLASH2 programmer and drivers Start the installation from the product CD CD_Drive product zip PICFlash2_setup exe After the installation connect the USB cable to the EasyPIC4 board Run and use PICFLASH2 as explained in the document PICflash2 programmer After these 4 steps your EasyPIC4 is ...

Page 5: ... It allows PIC microcontrollers to be interfaced with external circuits and a broad range of peripheral devices allowing a user to concentrate on software development Figure 1 illustrates the development board Each component is marked on a silkscreen both top and bottom These marks describe connections to the microcon troller operation modes and provide some useful notes The need for additional sc...

Page 6: ...tches The first group SW1 enables connections between the microcontroller port with analog capabilities PORTA and external pull up down resistors The pull up down resistors should be disconnected from the analog input pins otherwise they will affect the input voltage level When PORTA pins are used as digital inputs outputs the appropriate pull up down resistors should be enabled The upper four swi...

Page 7: ...pins For example the jumper group JP10 have two jumpers used as switches They are used to connect or disconnect PS 2 CLK pin to RC1 and PS 2 DATA pin to RC0 pin of the microcontroller A connection is made when the jumpers are placed between two contacts More often jumpers are used as a selector between two possible connections by using a three pin connector As illustrated in Fig 4 the middle conta...

Page 8: ...ave parallel connections there must not be more than one microcontroller on the board at a time Figure 5 MCU sockets Note Make sure to place jumper JP18 in lower position labeled as VCC while using PIC18F2331 microcontroller When using some other 28 pin MCU this jumper must be at upper position labeled as RA5 Note There are two DIP18 sockets with different pinouts DIP18A and DIP18B When putting 18...

Page 9: ... SW2 SW1 Microcontroller s pins are routed to various peripherals as illustrated in Fig 6 All ports have direct connections to Direct Port Access connectors Such connectors are typically used for connecting external peripherals to the board or for providing use ful points for connecting digital logic probe All ports are connected to LEDs push button switches and pull up down resistors which allow ...

Page 10: ...an LM7805 voltage regulator The external power supply can be AC or DC with a voltage between 8V and 16V and the jumper JP1 should be set in the left hand posi tion In Fig 7 you can see USB and external power supply connectors GND Vin Vout VCC CN1 8 12V AC DC E1 470uF C8 100nF E2 470uF C15 100nF 1 2 VCC D D GND 5V 5V USB FP1 1 2 3 USB y Power Suppl External Power Supply EXT EXT USB USB REG1 7805 E3...

Page 11: ...ramming software which is sup plied with EasyPIC4 On the right of the USB programmer there is the JP5 jumpers group These jumpers are used for PGM pin selection There are two different programming modes for PIC MCUs Low Voltage and High Voltage programming mode PICflash2 supports only High Voltage programming mode which can be applied regardless of MCU s programming state Since some PIC MCUs are b...

Page 12: ...g on MCU that you are using When JP2 is in the lower position the hardware reset pressing reset button is enabled and MCLR pin can not be used as an I O pin When JP2 is in the upper position the MCLR pin can be used as an I O pin but the hardware reset is disabled MCLR pin used as I O MCLR pin used as RESET When using DIP40 DIP28 DIP18A and DIP18B sockets jumpers JP3 and JP4 should be in the upper...

Page 13: ...board there are two oscillators that are connected with two main sections of the MCU sockets The first oscillator is labeled as OSC1 and is connected to DIP40 DIP28 DIP18A and DIP18B socket The second oscillator is labeled as OSC2 and is connected to DIP20 DIP14 and DIP8 socket Figure 15 JP2 jumper explanation Note As you can see from the picture above 10F MCU socket is not connected to any of the...

Page 14: ...lator on Fig 16 EasyPIC ICD 4 PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 RB2 RB3 RB4 RB5 RB7 RB6 RC2 VDD VSS RA7 OSC1 RA6 OSC2 MCLR VDD VSS vcc X1 8MHz C6 22pF C7 22pF RA7 RA6 JP13 RA6 and RA7 pins are used as oscillator input RA6 and RA7 pins are used as digital I O Figure 16 Oscillator connection with MCU Note If the used DIP s...

Page 15: ...Debugger F6 Toggle Breakpoints F5 Run to cursor F4 Step Into F7 Step Over F8 Flush RAM F2 Stop Debugger Ctrl F2 Figure 17 On Board USB programmer with mikroICD ICD mikro IN CIRCUIT DEBUGGER ICD mikro IN CIRCUIT DEBUGGER You can use mikroICD within any of MikroElektronika s compilers for PIC mikroC mikroBasic or mikroPascal All you have to do is to select appropriate build type Release or ICD Debug...

Page 16: ...splaying pin s digital state EasyPIC4 has 36 LEDs that are connected to the microcontroller s PORTA PORTB PORTC PORTD and PORTE LEDs Figure 18 Light Emitting Diodes Each group of eight LEDs can be enabled or disabled using the switch SW2 The exception is PORTE which has 4 LEDs and is connected to the same switch as PORTA Fig 19 illustrates the connection of a LEDs to PORTB of the microcontroller A...

Page 17: ...y the state of the corresponding microcontroller pin otherwise the LEDs will always be off no matter what the port state is as no current can flow through LED RN7 R SIL 8 9 1 2 3 4 5 6 7 8 9 RB0 RB1 RB2 RB3 RB4 RB5 RB6 RB7 1 ON 4 3 2 5 8 7 6 PORTD LED PORTC LED PORTB LED PORTA E LED VCC PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 ...

Page 18: ...K A S O F T W A R E A N D H A R D W A R E S O L U T I O N S F O R T H E E M B E D D E D W O R L D MikroElektronika Development tools P P U U S S H H B B U U T T T T O O N N S S W W I I T T C C H H E E S S EasyPIC ICD 4 EasyPIC4 has 36 push buttons which can be used to change states of digital inputs to microcontroller s ports There is also one switch that acts as a RESET Reset switch schematic is ...

Page 19: ...T R O N I K A S O F T W A R E A N D H A R D W A R E S O L U T I O N S F O R T H E E M B E D D E D W O R L D 1 19 9 page MikroElektronika Development tools EasyPIC ICD 4 P P U U S S H H B B U U T T T T O O N N S S W W I I T T C C H H E E S S Figure 23 Buttons schematics Buttons connections to PORTA PORTB PORTC PORTD and PORTE are shown in Fig 23 Jumper JP17 determines whether a button press will br...

Page 20: ...ise the pin state will always be logical one On Fig 25 the JP21 switch is set to pull down therefore when the button is not pressed pull down resistor pulls the microcontroller s RB4 pin to 0V A button press causes the port pin to be connected to 5V JP17 is in the higher position Thus only when the button is pressed the microcontroller will sense a logical one oth erwise the pin state will always ...

Page 21: ... PORTA dp R10 10K Q1 d e f a g dp c b Q4 Q3 Q2 10K 10K 10K R11 R12 R13 VCC 8 8 a b c d e f g PORTA E LEDs ON PORTB LEDs ON PORTC LEDs ON PORTD LEDs ON DIS3 DIS3 DIS2 DIS1 DIS0 RA3 DIS2 RA2 DIS1 RA1 DIS0 RA0 1 ON 8 7 6 5 4 3 2 SW2 PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 RB2 RB3 RB4 RB5 RB7 RB6 RC2 VDD VSS OSC1 OSC2 MCLR VDD VSS...

Page 22: ...r needs to set the jumper JP12 Fig 28 to the right hand position The GLCD s contrast can be adjusted using the potentiometer P3 which is placed to the right of the GLCD P3 10K Vee Vo Contrast Adjustment JP12 GRAPH CHAR D0 D1 D2 D3 D4 D5 D6 D7 CS1 CS2 RS R W E RST VCC VCC VCC D5 D4 D3 D2 D1 D0 E R W RS LED Vo LED VCC Vee GND RST CS2 D7 CS1 D6 1 20 PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2...

Page 23: ...r on EasyPIC4 For 4 bit data bus use the LCD should be placed in the upper left of the board just above the LEDs The connection to the microcontroller is shown in Fig 32 where there are only four data lines It is important to note that the LCD should be placed or removed from EasyPIC4 only when the power is off LCD 2X16 IN 4 BIT MODE D7 D6 D5 D4 D3 D2 D1 D0 E R W RS VEE VCC GND P4 10K Contrast Adj...

Page 24: ...ing poten tiometer P3 which is located to the right of the GLCD LCD connector EasyPIC ICD 4 L L C C D D 2 2 X X 1 1 6 6 I I N N 8 8 B B I I T T M M O O D D E E LCD 2X16 IN 8 BIT MODE When using a character LCD in 8 bit mode the connector that is shared with the GLCD should be used Since this connector has 20 pins and the character LCD has only 14 pins special attention is required when placing the...

Page 25: ...E VCC VCC PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 RB2 RB3 RB4 RB5 RB7 RB6 RC2 VDD VSS OSC1 OSC2 MCLR VDD VSS LCD8 contrast selected GLCD and LCD8 contrast not selected GLCD contrast selected X1 8MHz C6 22pF C7 22pF VCC D7 D6 D5 D4 D3 D2 D1 D0 E R W RS VEE VCC GND 1 14 LCD Display 8 bit mode Figure 34 LCD 8 bit mode schematics ...

Page 26: ...d to the MAX232 through the two jumper groups JP7 and JP8 The jumper group JP7 is used to connect the Rx line to RC7 RB2 or RB1 The jumper group JP8 is used to connect the Tx line to RC6 RB5 or RB2 Note that JP7 and JP8 must not be connected to RB2 at the same time JP6 enables the connections of RB0 pin to CTS and RC2 pin to RTS line for implementing hardware handshaking RS 232 COMMUNICATION VCC V...

Page 27: ...ble connection between the microcontroller and USB commu nication connector the JP9 jumpers group should be set to the right position As the result microcontroller pins RC3 RC4 and RC5 are dis connected from the rest of the system and con nected to the USB communication connector USB COMMUNICATION RC4 U RC4 RC5 U RC5 RC3 U 100n 100n RC3 VCC JP9 JP9 RC3 U RC4 U RC5 U are available to other peripher...

Page 28: ...keyboard to capture pressed keys or it can be connected to a PC to act as a keyboard CLK and DATA lines are used for data tansfer In this case they are connected to pins RC1 and RC0 respectively PS 2 COMMUNICATION 5V DATA NC NC CLK VCC PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 RB2 RB3 RB4 RB5 RB7 RB6 RC2 VDD VSS OSC1 OSC2 MCLR V...

Page 29: ...d on EasyPIC4 with its rounded side to the right as marked on the board see Fig 42 other wise the DS1820 could be permanently dam aged DS1820 s data pin can be connected to either RA5 or RE2 pin which is determined by jumper JP11 JP11 DS1820 VCC R1 10K GND DQ PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 RB2 RB3 RB4 RB5 RB7 RB6 RC2 ...

Page 30: ...nected on two different analog input pins at the same time The jumpers group JP15 enables connection between potentiometer P1 and one of the following pins RA0 RA1 RA2 RA3 or RA4 The jumpers group JP16 enables connection between potentiometer P2 and one of the following pins RA1 RA2 RA3 RA4 or RA5 In order to measure analog signal without interference turn the coresponding switch on SW1 to OFF pos...

Page 31: ...0 5V 0 5V JP15 JP16 PortA vcc pull up down 1 ON 8 7 6 5 4 3 2 SW1 PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 RB2 RB3 RB4 RB5 RB7 RB6 RC2 VDD VSS OSC1 OSC2 MCLR VDD VSS RA0 RA1 RA2 RA3 RA4 RA5 vcc X1 8MHz C6 22pF C7 22pF Figure 45 A D Converter input schematics Pull up down resistors on PORTA analog input pins should be disabled u...

Page 32: ...m microcontroller by set ting the appropriate jumpers while external peripherals are using the same pins The connectors can also be used for attaching logic probes or other test equipment D D I I R R E E C C T T P P O O R R T T A A C C C C E E S S S S All microcontroller input output pins can be accessed via connectors placed along the right side of the board For each of PORTA PORTB PORTC PORTD an...

Page 33: ... C C E E S S S S RB4 RB6 RB0 RB2 RB5 RB7 RB1 RB3 HEADER 5x2 CN9 RB6 RB7 RB4 RB5 RB2 RB3 RB0 RB1 8 9 6 7 4 5 2 3 1 2 3 1 JP21 Pull up line is connected All lines are disconnected Pull down line is connected RN2 RPACK8 9 8x10K VCC PICxxxx RA0 RA1 RA2 RA3 RC0 RC1 RA4 RA5 RE0 RE1 RE2 RC3 RD0 RD1 RC4 RD3 RD2 RC5 RC6 RC7 RD4 RD5 RD6 RD7 RB0 RB1 RB2 RB3 RB4 RB5 RB7 RB6 RC2 VDD VSS OSC1 OSC2 MCLR VDD VSS ...

Page 34: ...Development tools EasyPIC ICD 4 If you are experiencing problems with any of our products or you just want additional information please let us know We are committed to meeting your every need Technical Support support mikroe com If you have any other question comment or a business proposal please contact us E mail office mikroe com Web www mikroe com Forum www mikroe com forum ...

Reviews: