Home
EasyPIC6 User Manual
Contents
1. FasyPIC 6 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 MikroElektronika SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD Development system oli m sim ple TO OUR VALUED CUSTOMERS want to express my thanks to you for being interested in our products and having confidence in 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 7 lf w Matic General Manager 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 identification or explanation and to the owner s benefit with no intent to infringe TABLE OF CONTENTS Introduction to EasyPIC6 Development System Key Features 12 0 13 0 14 0 19 0 16 0 17 0 18 0 19 0 20 0 1 0 Connecting the System to your PC 2 0 Supported Microcontrollers 3 0 On Board Programmer 4 0 mikrolCD Hardware In Circuit Debugger 5 0 Power Supply 6 0 RS 232 Communication Interface 7 0 PS 2 Communication Interface 8 0 ICD C
2. d gino at hardware level AT LCD 2x16 a Y s 14 aman Us wl h h h H h H MATT E e TT E A BER ROTOR a Port Expander provides easy I O expansion 2 additional ports using serial interface mel DEI s Ep d i 3 i ETETETT Dmozemwem d po eee amie anqas 24505 ay per il gn EE On Board 2x16 serial LCD Display Ls dd ATT r LL Dl e LE 8 B 8 B 8 B B STITIIITIT SERIAL LCDI me ni o A rfr LJ e EL Ers _ imos ac s P Ba Ws d td CONNECTOR l Ij I a nil 115 E LT Graphic LCD display with backlights E m mas Lr Lam Li F T EE d al ma LE E ioc Seem ad as anun un as Le dsl Lai Bas F E PS E j T a mr ma zl z 4 HILILLILI L IX E 1X1 LIE LJ JL SPIEL Js I E The PiCflash 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 Package contains Development board EasyPIC6 CD product CD with appropriate software Cables USB cable Documentation EasyPIC6 manual mikrolCD manual P Cflash manual nstalling USB drivers manual and Electrical Schematic of the EasyPIC6 develop ment system System specification Power supply over a DC conne
3. 1 1 wire amp 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 s ave devices have 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 amp communication Figure 10 5 shows 1 wire amp communication with microcontroller through the RA5 pin Lal LT Figure 10 1 DS1820 Figure 10 2 J11 in the connector 1 wire com left hand position 1 wire munication is not used communication through the RAS pin Jumper J11 in the upper position Figure 10 3 J11 in the right hand position 1 wire communication through the RE2 pin DS1820 Botoom view a VCC MCU GND Figure 10 5
4. Figure 11 4 Microcontroller in DIP40 package and A D converter test Figure 11 5 Microcontroller in DIP28 package and A D converter test inputs connectiion inputs connection NOTE 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 EasyPIC6 Development System 1 12 0 LEDs LED diode Light Emitting Diode is a highly efficient electronic light source When connecting LEDs it is necessary to place a current 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 to voltage on the LED and 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 l 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 Microcontroller SMD resistor limiting current flow through an LED Figure 12 1 LEDs SW9 PORTB ON A McLR RB7 k NLD16 BRAO f RA1 RA2 ERA3 BRAG BRAS REO BRE1 Vere OVCC MCU BRE2 GNDI VCC MCUc
5. 1 wire communication schematic NOTE Make sure that half circle on the board matches the round side of the DS1820 Figure 10 4 DS1820 plugged into appropriate socket mum 6 EasyPIC6 Development System 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 OV to 5V DC may be supplied through the A D test inputs Jumper J15 is used for selecting some of the following pins RAO RA1 RA2 RA3 or RA4 for A D conversion The R63 resistor has a protective function as it is used for limiting current flow through the potentiometer or the microcontroller pin The value of the input analog voltage can be changed linearly using potentiometer P1 RAO is A D input VCC MCU O I RAO EB TN ARAS T KEN wA Psy RA2 Figure 11 1 ADC default Figure 11 2 The RAO pin jumper positions used as A D conversion input Top view DIP18A Figure 11 3 Microcontroller in DIP18A package and A D converter test inputs connection RAO is A D input RAO is A D input VCC MCU O VCC MCU O Top view Top view 22pF 22pF DIP28 22pF 22pF
6. S gt gt S gt SS P gt SPOOSSO9O9 gt Y gt gt X gt gt 35SSCSS gt S S 9Sw gt S gt S O S SS 9 e e 9 9 Nas s A AA NN NN S SSS N SN S SNS SSS S S S S S SSS SNNN SNS S SS SSS NS E DB on e e HH S ES m e e mj in o NN SNNT RQ gg mu OOO N anus GRE ERED a a a a 7 TEN p A A A eee SR PORTO MH SSIS KSSS SSN a CTT Isi ES Eli Ili Ill O o a si sa sa m Ea sa m m vill EB EB OF OF aa DEVELOPMENT BOARD 5 nma E Re TTTTTTT m EN 8g m s m s a Sum EE dz ias 50000 66 WEEHEN WWW MIKROE COM BY MIKROELEKTRONIKA O m y s Ti HWREV 1 03 y 1 2 3 A PEN su a a H b u u ww uc o O 5 m mH EH RE RH m O sm B NN NN UN ux 4 5 6 B lt m m C Wo m m No me DR PULL DOWN RESISTORS ON PORTA PDRTGP PORTB x spm EN NN EB EN un m mm Rm eo TT EE 9 C 318 x T R o N BE EE w m k D RX AND TX PINS CONNECT CTS AND RTS LINES TO Mi ooo oO m hu Mu m e 0 s iz D e o 8 a I 1 LS rH u EN U m N PORT EXPANDER JI7 IS USED FOR SELECTING VOLTAGE LEVEL TO BE APPLIED WHEN BUTTON IS PRESSED NTER CANCEL Key Features 14 Touch panel controller 15 Port expander 1 Power supply voltage regulator 16 128x64 graphic LCD display connector 2 On board programmer USB connector 17 128x64 graphic LCD display contrast potentiometer 3 USB 2 0 programmer with mikrolCD support 18 Touch pane
7. button to load the 0111 2FC23AA7 Lcd c 1011 F43E0021A eee Hex DA67F0541 Executing code in binary void Move Delay and hexadecimal format Delay ms 500 program into the microcontroller The PlCflash programmer 3 Window contains several options for microcontroller settings A 3 number of buttons which will ANSEL 0 iut E lese mm make the programming process ANSELH D ae a MUT w easier are provided on the right C1ON bit mci zm side of the window There is CON bit E Ma Ed a Berson E scis also an option at the bottom of _ the window which will enable you to monitor the programming progress void maini Write a code in some of PIC compilers generate a hex file and the on board programmer will take care of loading data into the microcontroller _ ne Figure 3 2 The principle of programmer s operation NOTE For more information on the P Cflash programmer refer to the relevant manual provided in the EasyPIC6 development system package There are two ways of programming PIC microcontrollers Low Voltage and High Voltage programming modes The P Cflash 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
8. 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 Ti bris i em RHET ES mid IT hn LIT Ce acy Mtr Pom le 2x5 PORTA male connector Yt qa Jumper for pull up pull v on down resistor selection aq Figure 19 2 J2 in the a E pull down position f im Additional module connected NN o F JJ to PORTC DIP switch to turn on pull up pull down resistors for each pin Figure 19 1 I O ports Figure 19 3 J2 in the pull up position SW2 1 8 ON Jumper J2 in the pull down position 2 TR 8x10K Jumper J17 in the VCC MCU position 557 aa I RAO RB6 ll RA1 RB5 PRA2 RB4IH ARAS do RA4 RB21 RA5 o I REO RBO I I RE1 Vee oVCC MCU RE2 END VCC MCU o Pete RD7 Ke iB RD6 fejS1ex RADIS X4 Kesey RD4 ERCO KOTA ERC1 RC61 RC2 O RBO RB1 C6 C7 RC3 KOI x 22pF 22pF I RDO RD31 N E RD1 RD21 VCC MCU O DIP40 J17 Figure 19 4 PORTB schematic connection 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 RBO 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 oper
9. 0 Build in programmer with mikrolCD Multiplexer MCU PGD ll PGD asagi PGC MCU PGC PROG MCLR MCLR During programming a multiplexer disconnects the microcontroller pins used for programming from the rest of the board and connects them to the P Cflash programmer After the programming is complete these pins are disconnected from the programmer and may be used as input output pins Figure 3 4 Programmer schematic TEER Microcontroler is plugged E Microcontroller is plugged Jumpers J8 and J9 are used for selecting the socket to receive the into one of the following programming signal Figure 3 5 shows the position of jumpers J8 Sockets Det Ie Or and Jg depending on DIP sockets in use into one of the following sockets DIP40 DIP28 DIP18A or DIP18B DIP8 KE Default position SOCKET SELECTION SELECTION Figure 3 5 The position of jumpers J8 and J9 MCLR used as the 7 MCLR used as an The function of the MCLR Master Clear pin depends on the position se a EO MCLR Vpp pin wan E avo I O pin of jumper J7 When placed in the left hand position the MCLR pin aM oy mM has default function i e is used as MCLR Vpp Otherwise when the Figure 3 6 The position of jumper J7 jumper is placed in the right hand position the MCLR pin is available as an I O pin mom 4 0 mikrolCD In Circuit Debugger The mikrolCD In Circuit Debugger is an integral part of the on board programmer It is used for the pu
10. 0 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 NOTE Only one microcontroller may be plugged into the development board at the same time page wa EasyPIC6 Development System 3 0 On Board USB 2 0 PlCflash Programmer The PICflash programmer is an obligatory tool when working with microcontrollers The EasyPIC6 has an on board P Cflash programmer with mikrolCD support which allows you to establish a connection between the microcontroller and your PC Use the P Cflash programmer to load a HEX file into the microcontroller Figure 3 2 shows the connection between a compiler P Cflash programmer and microcontroller Jumpers J10 used for connecting PGM line Jumpers J8 and J9 used for selecting socket with the microcontroller Jumper J7 used for selecting the MCLR pin s function Write a program in some of PIC compilers and generate a HEX file mikroC PRO for PIC innu Compiling program Qo Use the P Cflash programmer to File Edit wiew Project Run Tools Help select an appropriate microcontroller F e Fj j W G a lx 11100010011 Bin and to load the HEX file Ea Ge 22 Pg l d ga dag 0110100011 3 Click the Write
11. 1 Kester RCO RC1 H07 RC3 RDO a Figure 14 4 Keypads 4x4 and MENU and microcontroller connection schematic Figure 14 3 Keypad MENU VCC MCU El R58 J24 8 220R T54 ENTER CANCEL lt Z lt lt Or Joc Or Joc Of Jac T55 IN i EasyPIC6 Development System 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 switch on 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 Connector for alohanumeric LCD display Contrast adjustment potentiometer SW6 LCD BCK ON VCC MCU O o O B MCLR RB7H e RAO RB6 I PA BRA RBS El 10K BRA2 RB4 ERA3 RB31 BRAG RB2I BRAS RB1I BREO RBOI BRE eie OVCC MCU BRE2 GND VCC MCUo Mee RD7 fe RD6 I a OSC1 RDS I x1 a OSC2 RD4 e era I e RC6I Top view LCD GLCD BACKLIGHT PEER ARA e EY GNDO Meer Mer RS RW a Jao DOL J m DIL j D2 D3 D4 BRE _ D6 DA _ I RC2 RC5I C6 C7 I RC3 RC4I dee cesar Mis 22pF 22pF I RDO RD3 E a E e
12. Mee RD7 i GND RD6 I l OSC1 RDS 1 x4 I OSC2 RDA I e era I RC1 RC6I ez RC5I 8 9Sv cl C6 C7 RC3 RC4 22pF 22pF RDO IDEN SDK RD2 DIP40 Figure 12 2 LED diode and PORTB connection schematic mu EasyPIC6 Development System 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 maximum current 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 VCC MCU O RESET button Jumper J24 used for en abling protective resistor Jumper J17 used for selecting logic state to be applied to the pin by pressing button Top view Inside view Botoom view Side view Figure 13 1 Push buttons By pressing any push button RO 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 Jumper J17 in the pull up position Ly ft O J17 OVCC MCU VCC MCUO 5V man l 0V VCC MCU Q X1 I C6 C7 22pF 22pF Figure 13 2 PORTB push button connection schema
13. ation is identical for all the microcontroller pins VCC MCU pa QUUD 8x10K Sw2 fey 12345678 VCC MCU oVCC MCU VCC MCUO X1 I C6 C7 22pF 22pF VCC MCU RN TOR DUK J2 sw2 fen 12345678 VCC MCU oVCC MCU VCC MCUO X1 I C6 C7 22pF 22pF Figure 19 7 Jumpers J2 and J17 in the same position 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 RBO pin to be pulled down to the low logic level OV in its idle state Jumper J17 used to determine the pin logic state provided by pressing push buttons should be set in the opposite position of jumper J2 Accordingly every time you press the RBO push button a logic one 1 will appear on the RBO 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 OV 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 RBO push button a logic zero 0 will appear on the RBO pin I
14. ctor 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 gy nm hr des POO UO e w E id I T is ss miss Es ml ss Es mi ss Gs T E i s s LII LIP Eee POWER SUPPLY ELIO POWER BS Mprevicp SWITCHING POWER SUPPLY que SOCKET SELECTION POWER SUPPLY E mcin Bi 6 0 1 0 MCLR PIN FUNCTION e RS 232 COMMUNICATION N BOARD ROGRAMMER E amp T in NOTE SELECT APPROPRIATE RX AND Tx PINS ON pp CTS 0 0 SWITCHES SW7 AND SW8 DEPENDING ON MCU IN USE IMPORTANT BE SURE TO TURN OFF THE POWER SUPPLY BEFORE PLACING LCD OR GLCD ON DEVELOPMENT BOARD OTHERWISE BOTH LCD AND GLCD UNITS CAN BE PERMANENTLY DAMAGED BE SURE TO PLACE LCD OR GLCD PROPERLY OTHERWISE BOTH LCD O AND GLCD UNITS CAN BE PERMANENTLY DAMAGED LCDexi6 WITH BACKLIG SOOT SOOOCOOOL 2 IILI titi ti tie 1 eee OO WY Z10F MCU g v gt mm Dp ss ss m um Es im imi E ES ES El El Ili Isli O EA rs ADC INPUT y z Hi v CONTRAST 0 Ol v 3 O 0 COG2x16 Gexl6 SERIAL LCD I S N DIP14 we OSES SERIAL ws eses v 3 Jg THE 69 Sy LLLI Hut oe eses v o 2 m SS SS gt S gt
15. e ae E RD1 RD21 z DIP40 Figure 15 3 2x16 LCD display connection schematic EasyPIC6 Development System 8 8 1 1 1 o 4l 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 port expander 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 DIP switch SW10 to turn the on board 2x16 LCD display ON Contrast adjustment potentiometer COGP xg SERIAL LCD Lime s SW6 CS RST SCK MISO MOSI ON SW10 1 8 ON a uma U5 611310 GPA7I IGPB1 GPA6 GPB2 GPA5 IGPB3 GPA4 IGPB4 GPA3I e GPA2I I GPB6 GPA1 P1 2 vcc McUo o GPB7 GPA0 sos j vcc T PENA KOO Keine INTBI RCO SPI SCK Te SPI MOSI i C6 R2 22pF 22pF I 100K MCP23817 OVCC MCU Top view Figure 16 2 On board 2x16 LCD display connection schemat
16. e microcontroller in use The EasyPIC6 development system comes with the microcontroller in a DIP40 package Jumpers next to the sockets are used for selecting functions of the microcontroller pins RAO IO pin VCAP filter capacitor for 16F724 727 VCAP filter capacitor for 16F722 723 RAO IO pin RA5 I O pin J16 VCC 18F2331 2431 power supply OSC RA6 RA7 are OSC pins I O RA6 RAT are I O pins OSC RA4 RA5 are OSC pins I O RA4 RA5 are I O pins 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 DIPAO 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 Figure 2 2 Plugging microcontroller into appropriate socket 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 4
17. ic IS 2 EasyPIC6 Development System 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 Contrast adjustment potentiometer Figure 17 1 GLCD display Figure 17 2 GLCD connector SW6 GLCD BCK ON o O B MCLR RB7 E RAO RB6 i ipm B RA1 EVI RB4 ll BRAS RB31 EVA NA BRAS REN E REO RBOI ERE Vere o VCC MCU E RE2 GND II VCC MCUo IMere RD7 I SN eser x1 osc2 A js a LCD GLCD Top view BACKLIGHT R28 mum MIO E 8 9Svtcl A X Sel RC I RC2 20 1 8 33 54 5 SHE 7 Tmp C6 C7 RC3 yu snc B RDO 22pF 22pF lt es z gt x x II Figure 17 3 GLCD display connection schematic EasyPIC6 Development System 2 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 panel is to register pressure at some specific di
18. it with no intent to infringe 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 Copyright 2003 2009 by MikroElektronika All rights reserved G LUO9 olItu 2lJo Je sn oe uo3 0 ajejisay jou op sjesodoJd ssauisnq Jo sjueuiuoo suonsanb Aue Su NOK J i a Y noddns ua uoo SoJyLu MMM paou spo hue e wos oJyIwu MMAM l oysqom ino usn osea sonpoud und Piode aJo iwga 0 juem no Jl 5 Cd IHOM d3GdQ038W3 HO SNOILN TOS 3HVAXQHVH ANY 3HVMLJOS me E E
19. it is not necessarily integrated in all microcontrollers EasyPIC6 Development System 1 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 RCO 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 Figure 7 1 PS 2 connector Figure 7 2 PS 2 connector J20 and J21 are not connected J20 and J21 are connected NC DATA Front view o 42138 6 5 Bottom view Figure 7 3 PS 2 connector connection schematic Figure 7 4 EasyPIC6 connected to keyboard 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 P Cflash programmer with mikrolCD designed by MikroEektronika ICD CLK PIC m ll Front view Side view Bottom view Figure 8 2 ICD connector pinout and pin labels I CD2 and ICD3 are registered trademarks of MICROCHIP din EasyPIC6 Development System 9 0 USB Communication The USB connector enables PIC microcontrollers with a built in USB communication modu
20. l connector 4 DS1820 temperature sensor socket 19 Menu keypad 5 External MICROCHIP debugger ICD2 or ICD3 connector 20 Keypad 4x4 mE 6 USB communication connector 21 Push buttons to simulate digital inputs 7 A D converter test inputs 22 Logic state selector 8 PS 2 connector 23 Protective resistor ON OFF jumper 9 On board 2x16 LCD display 24 Reset button MEM 10 DIP switches to enable pull up pull down resistors 25 36 LEDs to indicate pins logic state 11 Port pins pull up pull down mode selection 26 Alphanumeric LCD display contrast adjustment 12 1 0 port connectors 27 Alphanumeric LCD display connector 13 PIC microcontroller sockets 28 RS 232 communication connector 1 0 Connecting the System to your PC Step 1 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 USB connector J6 power supply selector El SWITCHING POWER SUPPLY Jl J Figure 1 2 Connecting USB cable jumper J6 in the USB position P Power OFF ON switch F z Soe Figure 1 1 Power supply Step 2 Follow the instructions for installing USB drivers and the P Cflash programmer provided in
21. le 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 USB DATA 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 USB connector J I F 7 0 j E NW IT A a Ls RE Y A DB r j h JE EN va s pea ON aw IN IN j B Use COMM di A I AP unum P Figure 9 1 USB communication Figure 9 2 USB communication disabled default position enabled Jumper 5 Jumper z J12 in the J12 in the MCLR RB7E left hand left hand RAO si osition osition Les RES p RA2 RB4E I RA3 RB3I ERA4 RB21 BRA5 y oVCC MCU KEND lO losc1 vee Co VCC MCU X1 A C0 ERC0 LI ARO Bottom view RC2 HRO 0 S8238lL2ld VCC MCUO X1 0SSvd8l Old Bottom view C6 C7 22pF 22pF DIP28 C6 C7 a 22pF 22pF T s 100nF 100nF 100nF 100nF Figure 9 3 PIC18F4550 USB communication schematic Figure 9 4 PIC18F2550 USB communication schematic EasyPIC6 Development System 10 0 DS1820 Temperature Sensor
22. luding 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 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 All the 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 benef
23. n 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 IS 20 0 Additional I O Ports The SPI communication lines and MCP23517 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 will be used for SPI communication and thus cannot be used as I O pins Switches INTA and INTB on the DIP switch SW10 enable interrupt MCP23S17 enables 16 bit parallel expansion and may be configured to operate in either 16 or 8 bit mode Jumper for selecting pull up pull down resistor DIP switch connecting port expander to the microcontroller Figure 20 1 Port expander expander is enabled SW6 CS RST SCK MISO MOSI ON SW10 INTA INTB ON Jumpers J18 and J19 in the upper position U5 P0 7 VCC MCU oA NAS Ken KONIO x1 Keyser RCO RCA C6 C 22pF 22pF Figure 20 3 Port expander schematic Ke0 EE es 51 3 all P1 4 iiid GPB4 ere ore Kj sie eva GPA6 B GPA5 PA GPA4 503 GPA3 B02 GPA2 LED GPA1 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 inc
24. onnector 9 0 USB Communication 10 0 DS1820 Temperature Sensor 11 0 A D Converter 2x16 LCD Display On Board 2x16 LCD Display 128x64 Graphic LCD Display Port Expander EasyPIC6 Development System page 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 mikrolCD support In Circuit Debugger providing an interface between the microcontroller and the PC You are simply expected to write a code in some of our compilers generate a hex file and program your microcontroller using the P Cflash 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 PIC Full featured and user n s pou friendly development board HH RRSOELE CEPIT TET BOARD JL k ut ome m for PIC microcontrollers i 3 io F A ks Mit nr E Ium EINE T SNNT e r K 1 TDI sm High Performance USB 2 0 zm SE Qe zi a E RODA lanes E wo rrerrert a E L 3 CT hes On Board Programmer copanan me aiming I R M R T YT R RI K Y RK LTR a MANUAL Dita ud HT HAS a a a H Hardware In Circuit Debug ger for step by step debug
25. programming debugging may be performed The Low Voltage programming mode can be enabled disabled using configuration bits of the microcontroller If the Low Voltage programming 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 am IBI when the PGM line m DH is connected to the RB3 pin Jumper J10 position 310 when the PGM line m E is connected to the E M Ji RB5 pin L PF Jumper J10 position when the PGM line is connected to the RB4 pin Jumper J10 default position a IB When RB3 RB4 and RBS Jaa H pins are not connected to EI the PGM line 1 PIN f E SELE PGM PIN SELECTION ION PGM PIN SELECTION Figure 3 3 Various positions of jumper J1
26. 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 in the USB position When using external power supply jumper J6 should be placed in the EXT position The development system is turned OFF ON by changing the setting on the OFF ON switch respectively Power supply voltage regulator Jumper J6 used for selecting power supply i Figure 5 1 Power supply The programmer uses the MOSFET switch for suspending power supply on the development system during programming When the process of programming is complete the programmer enables the development system to be supplied with power J6 1 GATE SMD MOSFET AC DC connector is S SOURGE p IRFR9024N IRFR 123 J6 USB connector power supply amm CEE ES EXT BE USB Side view Bottom view 1 2 3 Side view Side view lt Z Side vi A Eli K eget MES HM 4x1N4007 Top view g8SWC DRVCI L2 220uH Side view Bottom view Figure 5 2 Power supply source schematic 11 M EasyPIC6 Development System 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 bet
27. r 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 Step Over command Step 1 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 mikrolCD Watch Values window 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 while 1 counter O Step 2 After the Step Over 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 Watch Values window for counter 3 counter lt j pounter t PORTB 1 lt lt counter Sant 22 inn F age NOTE For more information on the mikrolCD debugger refer to the mikrolCD Debugger manual 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
28. rpose 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 mikrolCD software is integrated in all compilers designed by mikroElektronika mikroBASIC mikroC and mikroPASCAL As soon as the mikrolCD debugger starts up a window as shown in figure below appears The mikrolCD 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 Watch Values mikrolCD debugger options Icon commands Eh 90 0991 m E ae Add Remove D Properties Select variable from list A complete list of registers within the POR programmed microcontroller Search for variable by assembly name 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 F 4 Clear Breakpoints Ctrl Shift F4 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 Each of these commands is activated via keyboard shortcuts or by clicking appropriate icon within the Watch Values window Double click on the Value field enables you to change data format Figure 4 1 mikrolCD Watch Values window The mikrolCD debugge
29. splay point and to forward its coordinates in the form of analog voltage to the microcontroller Switches 5 6 7 and 8 on the DIP switch SW9 are used for connecting touch panel to the microcontroller 4 F lt Y uU zi E pL Ner Me x we qnem aua Figure 18 1 Touch panel Figure 18 1 shows how to place a touch panel over a GLCD display Make sure that the flat cable is to the left of the GLCD display as shown in Figure 4 10 BOTTOM LEFT 8 9Gv cl oVCC MCU TOUCHPANEL CONTROLLER ix Figure 18 3 Placing touch panel Figure 18 3 shows in detail how to connect a touch panel to the microcontroller Bring the end of the flat cable close to the CN13 connector as shown in Figure 1 Plug the cable into the connector as shown in Figure 2 and press it easily so as to fit the connector as shown in Figure 3 Now you can plug a GLCD display into the appropriate connector as shown in Figure 4 NOTE LEDs and pull up pull down resistors on the RAO and RA1 pins of the PORTA port must be turned off when using a touch panel h E EasyPIC6 Development System 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 DIP switches SW1 SW5 enable each connector pin to be connected to one pull up
30. 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 P Cflash programmer as it will be automatically installed along with compiler installation Step 3 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 P Cflash programmer to dump a code into the microcontroller and employ the board to test and develop your projects NOTE 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 wA di at QU la 4 ar i NS Figure 1 3 Placing additional modules on the board EasyPIC6 Development System 2 0 Supported Microcontrollers The EasyPIC6 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 th
31. tic EasyPIC6 Development System 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 where the RDO RD1 RD2 and RD3 pins are configured as inputs connected to pull down resistors The RD4 RD5 RD6 and RD7 pins are configured as high level voltage outputs Pressing any button will cause a logic one 1 to be applied to input pins Push button detection is 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 1 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 Jumper J17 is in the pull up position Pins RD0 RD1 RD2 and RD3 are connected to pull down resistors through DIP switch SW4 Pull down Figure 14 2 Keypad 4x4 performance VCC MCU E MCLR w PRG A sw4 ey UE RA2 BAT43 UE RA3 AMIK C Side view RAS a RA5 I REO I RE1 RE2 2 T42 3 T46 A T50 VCC MCU 04 Me X1 C6 C7 22pF 22pF Kein ye OoSc
32. ween RX and TX communication lines handshaking lines CTS and RTS 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 receive data TX transmit data CTS clear to send and RTS request to send 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 I 974155 E L RS 232 connector Lr 6 1 RS 232 module The function of DIP switches SW7 and SWE8 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 SW7 RX CTS ON SW8 TX RTS ON VCC MCU O E Zn vec C31 C28 100nF E 100nF MS END ex T1 OUTE KOZA R1 IN a C2 R1 oU A B X B 12345678 VCC MCUo T2OUT T2IN H R2IN R2OUTE aie x1 C6 C7 22pF 22pF Bottom view o VCC MCU ini Figure 6 2 RS 232 module schematic NOTE Make sure that your microcontroller is provided with the USART module as
Download Pdf Manuals
Related Search
Related Contents
Document correction Biomek NX Multichannel Quick-Start Guide - QB3 PDF 2.7MB Les écoles nationales du XIXe siècle Shandon histocentre RMX 4050HD and RMX 5050 User Manual Dell 10g Deployment Guide Virginie Dumoulin - Service géologique de Wallonie HT-2000C user`s manual Copyright © All rights reserved.
Failed to retrieve file