Home

EasyPIC4 Manual - MikroElektronika

image

Contents

1. DS1820 DIGITAL THERMOMETER od ul DS1820 digital thermometer is well suited to environmental temperature measurement iJ having the temperature range of 55 C to 125 C and the accuracy of 0 5 C It must be placed correctly in the 3 pin socket provid ed on EasyPIC4 with its rounded side to the E right as marked on the board see Fig 42 ac otherwise the DS1820 could be permanently UU damaged DS1820 s data pin can be connect DE ed to either RA5 or RE2 pin which is deter L B mined by jumper JP11 DS1820 a Figure 43 125 C D DS1820 Schematic ES There is a mark in the form of half cir 3 cle for proper ori A I entation of DS1820 sensor 55 C NI DS1820 vcc WW vcc ZA GND Vcc ud DQ DQ line is DQ line is DQ line is connected to RE2 connected to RA5 disconnected page EasyuPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 728 l UNPU E ANALOG TO DIGITAL GONER ADC INPUT N ENABLED A D CONVERTER INPUT EasyPIC4 development board has two potentiometers for working with Analog to Digital Converter ADC Both potentiometers outputs are in the range of OV to 5V Two analog si
2. WCU SXoXG S MCU SOCKETS EasyPIC4 is delivered with a 40 pin microcontroller Users can remove this one and fit a dif ferent microcontroller in DIP40 DIP28 DIP20 DIP18 DIP14 or DIP8 packages of an ade quate pinout Note There are two DIP18 sockets with different pinouts DIP18A and DIP18B When putting 18 pin microcontoller into DIP18 socket choose the one with corresponding pinout For example PICI8F1220 uses DIP18A socket while PIC16F628A uses DIP18B socket The 10F MCU socket is used only for PICIOF family and the DIP8 socket is used for all other 8 pin microcontrollers Note Since all packages have parallel connections there must not be more than one micro controller on the board at a time 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 RAS wicRalELex TRON EasyPIC4 Users Manual DEVELOPMENT TOOLS 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 useful points for connecting digital logic probe All ports are connected to LEDs push button switches and pull up down resistors which allow easy monitoring and testing of digi
3. D D Z C vcc JP12 Ko Vee GLCD contrast LCD8 contrast GLCD and LCD8 selected selected contrast not selected WW CHAR GRAPH MCLR RB7 EC RAO RB6 vec RA1 RB5 eX E P3 10K e bs A ones Leave four free pins RS Adjustment tothe Habtsid RA4 RB2 a tothe right side RAS m RBI f REO RBO VCC RE1 AA VDD RE2 vss vss D Leave two free gt gk D5 m ins to the left side osci a Rosi pins 2n OSC2 P lt RD4 RCO di RC7 22pF pF RC1 RC6 RC2 RC5 d RC3 RC4 Do D3 RDO RD3 2 np ro aI 1 238 CD 8 bit mode schematic ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 25 EasyPIC4 Users Manual MixnoELek rona DEVELOPMENT TOOLS RS 232 COMMUNICATION RS 232 communication enables point to point data transfer It is commonly used in data acquisition applications for the transfer of data between microcontroller and a PC Since the voltage levels of a microcontroller and PC are not directly compatible with those of RS 232 a level transition buffer such as the MAX232 must be used In order to provide a more flexible system the microcontroller is connected 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 RBI The jumper group JP8 is used to connect the Tx line to RC6 RB5 or RB2 Note that JP7 and JP8 must not be con nected
4. m 6PO HCWR pmu aJ ir I d MCU Bene PG oe ee S 55 39 n Ex x pz he auc GRAPHIC DISPLAY 128x464 INPORTANT Be sure to place the LCO GLCD properly Improper placement may damage the LCO G6LCO unit permanently es es ee ee ee 1 Tens ON OFF pull up or pull down resistors on PORTA CONTRAST M Turns onvoff port LEDs and 7 seqgment digits Pouer supoly selector USE or external r character LCD 1i 9 Note As you can see from the picture above 10F MCU socket is not connected to any of the two oscillators This MCUs have only an internal oscillator and they can t be used with an external crystal page asyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD a 83 EasyPIC4 Users Manual MixnoELekreonia DEVELOPMENT TOOLS For some microcontrollers oscillator input pins can also be used as digital input output pins In order to implement this feature EasyPIC4 has jumpers for connecting MCU either to oscillator or to digital I O pins You can see the schematics for OSC1 oscillator on Fig 16 Oscillator connection with MCU OSCILLATOR CTI RA6 and RA7 pins are RA6 and RA7 pins are used as oscillator input used as digital I O Note If the used DIP s oscillator pins are labeled with OSCI then the oscillator should be placed in the OSCI connector If the used DIP s oscillator pins are labeled with OSC2 then
5. the oscillator should be placed in the OSC2 connector page ICD l Al MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 rE EasyPIC4 Users Manual mikrolCD Real Time Hardware In Circuit Debugger mikroICD is highly effective tool for Real Time debugging on hardware level mikroICD debugger enables you to execute a program on a PIC microcontroller and view variable val ues Special Function Registers SFR and EEPROM as the program is running SUGGLELs D B 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 build the project program the MCU select appropriate debugger mikroICD Debugger and you are ready to go DE Q Note For more information on how to use mikroICD debugger please refer to the mikroICD documentation mikroICD User s Manual You can also find it within the Help documen tation inside any of the mentioned compilers mikroICD debugger uses on board programmer to communicate with the compiler and it supports common debugger commands xli INCIRGUI Start Debugger F9 Run Pause Debugger F6 Toggle Breakpoints F5 Run to cursor F4 Step Into F7 step Over F8 Flush RAM F2 Stop Debugger Ctrl F2 On Board USB program
6. LCD 2x16 in 4 bit mode SIT MODE D D LGD XI IN el vcc o e Contrast p4 Adjustment 10K NOaoaononaoon dor zzzzanaana 1 LCD 2x16 in 4 bit mode schematic ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 228 MODE LGD 22416 UN B B 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 1s required when placing the LCD Otherwise the LCD can be permanent ly damaged shows which pins stays disconnected i c View from the back The LCD must be placed in the marked position with two free pins to the left and four free pins to the right It is important to note that the LCD should be placed or removed from EasyPIC4 only when the power is off Before attaching the LCD set jumper JP12 to the left position The LCD s contrast can be adjusted using potentiometer P3 which is located to the right of the GLCD LCD connector NOTE Special attention 1s required when placing the LCD Otherwise the LCD can be per manently damaged baden iu EasyPIC4 Users Manual In order to enable LCD jumper JP12 should be set WI 4 to the left position labeled i as CHAR SUT MODE E
7. m dina HL Haw 1 00 EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 5 IPn Chone voltage jewel to be applied when ihe Biton pE pressed OLN CO DUG EasyPIC4 Users Manual MixnoELek rona DEVELOPMENT TOOLS SWITCHES The EasyPIC4 development board features a number of peripherial devices In order to enable these devices before programming you need to check if appropriate jumpers or switches have been properly set Switches are devices that have two positions ON and OFF which have a role to establish or break a connection between two contacts The EasyPIC4 development board has two groups of switches SWITCHES 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 volt age level When PORTA pins are used as digital inputs outputs the appropriate pull up down resistors should be enabled The upper four switches of SW2 are used to enable LEDs connected to PORTA E PORTB PORTC and PORTD For example if the switch for PORTB is OFF all PORTB LEDs will be turned off The lower four switches of SW2 are used to enable the 7 segment displays If you don t need the 7 segment displays in your project these swi
8. to RB2 at the same time JP6 enables the con nections of RBO pin to CTS and RC2 pin to RTS line for implementing hardware handshaking RS 282 COMMUNICATION RS232 connector E11 10uF z 3 5 ec n E E S igure NU E8 V ND A A 10uF B Z C1 T1out j E9 C2 Riin A 10uF C2 R1out in Iig sen IU rien Tu J ff ff po aee LI s 1 alna 1 3a 1115 41 13 723 13 511 LI 13 721 rE E gj I I IH 1 1 13 721 a 1g gj 1 Yoga ga ment i Serial Cable Connection between microcontroller and a PC HO RTS RS232 CTS RTS page ICD 2G MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 TE EasyPIC4 Users Manual USB COMMUNICATION The USB communication connector is placed in the upper right corner of the EasyPIC4 It is used with specific PIC microcontrollers that have USB support such as PIC18F2450 or PIC18F4550 Note that the USB communication connector cannot be used for programming and that the USB programming connector cannot be used for communication In order to enable connection between the microcontroller and USB communication connector the JP9 jumpers group should be set to the right position As the result microcontroller pins RC3 RC4 and RC5 are disconnected from the rest of the system and connected to the USB communication connector Figure 37 ON USB communicat
9. 2 d nected to RA3 pin Fe 22pF 22pF A we 4l fte 15 g 9 Q NOTE Jumpers JP15 and JP16 should not select the same pin ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 283 EasyPIC4 Users Manual es DIRECT PORT ACCESS 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 and PORTE there is one DIRECI PORT ACCESS Direct port access connectors Figure 46 These connectors can be used for system expansion with external boards such as Serial Ethernet Compact Flash MMC SD ADC DAC CAN RTC RS 485 etc Ensure that the on board peripherals are disconnected from microcontroller by setting 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 Example of how to connect external peripheral with flat cable page ICD 22 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 Se EasyPIC4 Users Manual Pull up line is connected f JP21 OP Fi 48 vec igure UU PORTB connection 3 3 Pull down line All lines fa is connected are disconnected E RN2 1 RBO 2 ee RB1 3 RB2 4 RB4 6 a RB5 7 o RB
10. 24 Button with pull up resistor apa always be logical one D On Fig 25 the JP21 switch is A aL set to pull down therefore JP21 when the button is not PortB pressed pull down resistor pulls the microcontroller s JL RB4 pin to OV ak z RAO RB6 A button press causes the ub ioi port pin to be connected to my bn 5V JP17 is in the higher RAS RBI RB4 position E p vcc RE2 VSS VDD RD7 Thus only when the button is ay s m pressed the microcontroller will sense a logical one oth Eile Mie pes oe HUM LEE Button with pull down resistor always be logical zero 20 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 wicRalELerRON HA EasyPIC4 Users Manual DEVELOPMENT TOOLS 7 SEGMENT DISPLAYS w EasyPIC4 has four 7 segment displays in multiplex mode Data lines are connected to c6 PORTD while each display is enabled through the lower four bits of PORTA g An Aiea 7 Seed R Ere T y b 7 segment displays c T W E E Osc 6 7 n T DIS3 DIS2 DIS1 DISO Su PORTA E PORTB PORTC ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 2 EasyPIC4 Users Manual ienoEL nena DEVELOPMENT TOOLS GRAPHIC LCD GRAPHIC LCD CONNECTOR A graphic LCD GLCD allows advanced visual messages to be displayed While a charac ter LCD can display only alphanumeric chara
11. 6 8 RB7 9 m RPACKS8 9 8x10K WU ac MCLR RB7 LL RAO RB6 m RA1 RB5 RA2 RB4 RA3 RB3 RA4 RB2 RA5 RB1 REO RBO RE1 VDD VCC CN9 RE2 VSS as E RBO RB1 VSS RD RB2 RB3 OSC1 RD5 x OSC2 RD4 RB4 RB5 RCO RC7 a rz ie ROS RB6 Ber RC2 RC5 P D Dn Y RC3 RC4 A RDO RD3 Ayr RD1 RD2 AY b p v Vcc ar y HEADER 5x2 F v gt pr 2 De gt v 5 Mri ye ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 3333 EasyPIC4 Users Manual 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 pudo Tm MIKROELEKTRONIKA DEVELOPMENT TOOLS
12. LL MIKROELEKTRONIKA ITS DIRECTORS OFFICERS EMPLOY EES 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 INTERRUPTION OF BUSINESS AND THE LIKE EVEN IF MIKROELEKTRONIKA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES ARISING FROM ANY DEFECT OR ERROR IN THIS MANUAL OR PRODUCT SPECIFICATION AND INFORMATION CONTAINED IN THIS MANUAL ARE FURNISHED FOR INTERNATIONAL USE ONLY AND ARE SUBJECT TO CHANGE AT ANY TIME WITH OUT NOTICE AND SHOULD BE CONSTRUED AS A COMMITMENT BY MIKROELEKTRONIKA MikroElektronika assumes no responsibility or liability for any errors or inaccuracies that may appear in this manual including the product and software described in it Product and corporate names appearing in this manual may or may not be registered trade marks or copyrights of their respective companies and are used only for identification or explanation and to the owners benefit without intent to infringe ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD D EasyPIC4 Users Manual CONTENTS eo CONNECTING THE SYSTEM page 4 5 INTRODUCTION page 5 D DESCRIPTION OF THE DEVELOPMENT SYSTEM page 5 G Switches page 6 Jumpers page MCU sockets page 8 Power Supply page 10 On board USB 2 0 programmer page 11 Oscillator page 13 mikrolCD In Circuit D
13. LeTRONIA DEVELOPMENT TOOLS PUSHBUTTON SWITCHES 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 shown in Figure 21 Reset switch schematic vcc PUSHBUTTON SWITCHES T w S x PICflash On Board USB programme vn DO Oe d Pushbutton switches Voip e B MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 wicRalELex TRON EasyPIC4 Users Manual DEVELOPMENT TOOLS Buttons connections to PORTA PORTB PORTC PORTD and PORTE are shown in Fig 23 Jumper JP17 determines whether a button press will bring logical zero or logical one to the appropriate pin SS LI 1 When button is not pressed pin state is determined by the pull up or pull down port jumpers In the example shown in Fig 23 JP17 is connected to 5V therefore pressing the buttons will bring logical one to the appropriate pins SUTTON SWw Ihrc EL LS EE NR PORTC PORTD PORTE l 4 I I ee m 1 ae oe D mm mm Em EE EE EN EN EM L a Raoji A Ro st e Ro a zu Ro 4 a RE I o o i o o I o i I o o LT rai a s i i E I I RB111 I RCI i i RD1 i l RE1 I o i I o i i o i o o o i 1 1 I B I z I i ee a RB2 a
14. RC2 I a RO2 1 RE2 Ni VCC a s o o I o o I I o o I o o d I i I I S GS og Hl i Roa Res 5 H Jo o o 1 o i i o o o 1 o o 1 voo iU I 1 I I I I OP ai RA4 I l RB4 i RC4 RD4 a cR wc VSS mE E E E EC H D I e RAS RBS a rcs I p 1 o oO I RD5 ie H ie HOM H i i di RAG 4 a RB6 f I ams RC6 I F3 RD6 ie e y 7 JER i ro T i aio RAT i z RB7 gt a RC J I I t RD7 Ni 1 I o o i o o i o o gt d H a I JU DEEE 3 1 AE MORE l i Vece OV while butt 5V while butt Figure 23 JP17 7 paced isi are ea is Buttons schematic j B EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD ad Q EasyPIC4 Users Manual scene H On Fig 24 the JP21 switch is vec uu set to pull up therefore when JP21 T the button is not pressed PortB ullum pull up resistor pulls the microcontroller s RB4 pin to us C TSV MCLR RB7 RAO RB6 RA1 RB5 5 A button press causes the RA2 RB4 port pin to be connected to e n 2 ground JP17 is in the lower RAS RB1 RB4 position in d vec O RE2 VSS m Thus only when the button is dv nd M i vss RD6 JP17 0V while pressed pressed the microcontroller will sense a logical zero oth erwise the state will Figure
15. SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD MikroElektronika EasuPIC4 Users Manual Development tools Books Compilers 2 e Wily if 4 P ad USB 2O With useful implemented peripherals plentiful practical code examples and a broad set of additional add on o boards Serial Ethernet Compact Flash MMC SD beet Maai 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 Software and Hardware solutions for Embedded World wicRELeKrRONH EasyPIC4 Users Manual DEVELOPMENT TOOLS Second edition January 2007 No part of this manual including the product and software described in it may be repro duced transmitted transcribed stored in a retrieval system or translated into any language in any form or by any means except documentation kept buy the purchaser for backup pur poses without the express written permission of MikroElektronika company Product warranty or service will not be extended if the product is repaired modified or altered unless such repair modification or alteration is authorized in writing by MikroElektronika MIKROELEKTRONIKA PROVIDE THIS MANUAL AS IS WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY OR FITNESS FOR A PARTIC ULAR PUROSE IN NO EVENT SHA
16. 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 pro gramming mode which can be applied regardless of MCU s programming state Since some PIC MCUS are being shipped whith Low Voltage programming mode as default you must select a proper PGM pin depending on chip For most of the MCUs you don t have to use PGM selection and the JP5 jumpers group should stay in the Default position OWN BOARD US Default position 1 RB3 used as PGM H RB5 used as PGM RB4 used as PGM JP5 jumpers explanation Figure 11 EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD a el DEVELOPMENT TOOLS EasyPIC4 Users Manual ien EL Ron ON BOARD USS PROGRAMMER JP3 and JP4 for DIPAO DIP28 DIP18A and DIP18B JP3 and JP4 for DIP20 DIP14 and DIP8 When using DIP40 DIP28 DIP18A and DIP18B sockets jumpers JP3 and JP4 should be in the upper position default as shown in Fig 12 For DIP20 DIP14 and DIP8 sockets these jumpers should be in the lower position Fig 13 Ju
17. cters a GLCD can be used to display mes sages in the form of drawings and bitmaps The most commonly used graphic LCD has the screen resolution of 128x64 pixels Before a GLCD is connected the user 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 GLCD selection jumper In order to enable GLCD jumper JP12 should be set to the right hand position labeled as GRAPH MN Y JP12 GRAPHIC LGD 51 ZA TU GLCD contrast LCD8 contrast GLCD and LCD8 selected selected contrast not selected Contrast Adjustment m m a ab8a8 revere GLCD schematic page ICD 222 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 wicRlELeKTRONIA EasyPIC4 Users Manual DEVELOPMENT TOOLS LCD 2X16 IN 4 BIT MODE A standard character LCD is probably the most widely used data visualization component Usually it can display two lines of 16 alphanumeric characters each made up of 5x8 pix els The character LCD communicates with the microcontroller via a 4 bit or 8 bit data bus each requiring the use of a different connector 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
18. ebugger page 15 LEDs page 16 Pushbutton switches page 18 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 RS 232 Communication page 26 USB Communication page 27 PS 2 keyboard page 28 DS1820 Digital Thermometer page 29 A D Converter input page 30 Direct Port Access page 32 mE ER page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 33 EasyPIC4 Users Manual MixnoELek rona DEVELOPMENT TOOLS CONNECTING THE SYSTEM The development system box contains the development system product CD USB cable RS232 cable and this manual Step no 1 The first thing to do is to take the system out of the box Unpack the USB cable and con nect it to the PC Please use USB ports on the back of the PC with direct connection to the motherboard Step no 2 Install the PICFLASH2 programmer and drivers Start the installation from the product CD CD_Drive product zip PICFlash_ setup exe Step no 3 After the installation connect the USB cable to the EasyPIC4 board You will be asked for the PICprog drivers Point to them in order to finish the driver instalation They are placed in the folder System_Drive Program Files Mikroelektronika PICFLASH mikroICD Driver NT Step no 4 Run and use PICFLASH2 as explained in the document P Cflash2 programmer CD_Drive product pdf picflash_ manual v4 pdf CONINEGUING inis SYSTEM After these 4 st
19. eps your EasyPIC4 is installed and ready for use You should try to read a program from the chip or to load an example from the examples folder of mikroElektroni ka s compilers for PIC or from the product CD CD Drive product zip easypicA examples zip page ICD Al MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 Trew INTRODUCTION DEVELOPMENT The EasyPIC4 development system 1s a full featured development board for Microchip PIC BOARD microcontrollers It has been designed to allow students and engineers to easily exercise and explore the capabilities of PIC microcontrollers It allows PIC microcontrollers to be inter faced with external circuits and a broad range of peripheral devices allowing a user to con centrate 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 microcontroller operation modes and provide some useful notes The need for additional schematics 1s minimized since all relevant information is printed on the board Figure 1 EasyPIC4 development board g t i i Jaen CLE TOF MCU Ww Nw a psie20 IBL NE bikir IN 3 E 5 rj E Ea T 5 E 5 a LJ EL d erf tL 4 JE BEl i fd i CMF T4 a2 I Cnm CONTRAST I p PORTE I Ona i e n 737r Pull ac PE i IDoun nc Gb PETE H Cee Bird Ucr E iG EasyPIC 4
20. g nals can be connected 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 RAO RAI RA2 RA3 or RA4 The jumpers group JP16 enables connection between poten tiometer P2 and one of the following pins RAI RA2 RA3 RA4 or RAS DETE A D Converter input In order to measure analog signal without interference turn the coresponding switch on SW to OFF position This will disable connection of the used PORTA pin to the pull up down resistors Applications of A D Conversion are various Microcontroller takes analog signal from its input pin and translates it into a digital value Basically you can measure any analog signal that fits in range acceptable by PIC That range is OV to 5V MixnoELekronia EasyPIC4 Users Manual DEVELOPMENT TOOLS A D Converter input Pet PortA i schematic Pull up down resistors on I i I i I i i PORTA analog input pins OT should be disabled using SW1 o us m2 vcc UU pe 3 E 10K T T al ncm rn MEN Ab ee Sa eid vcc s A D Uu INPUT 2 Oe Dt ON ET Potentiometer P1 is con EE i s nected to RA2 pin and 5 potentiometer P2 is con
21. ion connector To enable USB USB COMMUNICA ee vcc communication all three jumpers have a pa vcc to be set to the right side Se Cry USB 100n 100n iL Le JP9 RC4 EC JP9 USB communica E JC 3 tion schematic E C3 RC3 U RC4 U RC5 U are RC3 U RC4 U RC5 U are available to other peripherials connected only to USB ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD Tf EasyuPIC4 Users Manual MixnoELekreonia DEVELOPMENT TOOLS zA PS 2 COMMUNICATION The PS 2 connector allows direct connection jas between EasyPIC4 and devices that use PS 2 communication such as PC keyboard or mouse For example the microcontroller can be connected to a 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 RC and RCO respectively VAN Figure 40 A SS PS 2 connector PSA COMMUNICATION RIP rh 3 75 Keyboard connected to J MEL development board JL VCC VCC e e PS2 O i R38 i R37 CONNECTOR a vcc O page ICD Z2te3 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 wicRalELex TRON EasyPIC4 Users Manual DEVELOPMENT TOOLS
22. mer AME with mikrolCD ICD E asyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD i 5 DS LEDs Light Emitting Diodes LEDs are the most commonly used components usually for dis playing pin s digital state EasyPIC4 has 36 LEDs that are connected to the microcontroller s PORTA PORTB PORTC PORTD and PORTE 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 resistor is used in series with the LED to limit the LED s current In this case the resistor s value is 1K RUSSERT EasyPIC4 Users Manual The LEDs are enabled when the corresponding switch on SW2 is on When enabled LEDs Vj will display 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 RH zu MU RTT LED schematic Figure 19 d PORTA E LED PORTB LED A PORTC LED I PORTD LED aM E lt q 4 amp lt j q Y RBO E A b A 4 4 p ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD d T7 EasyPIC4 Users Manual weed E
23. mper JP2 allows using the MCLR pin as RESET or as digital I O It can be RE3 RA5 or RA3 pin depending 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 Figure 14 J MCLR pin B used as I O JP2 jumper explanation bi MCLR pin used as RESET ICD MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 OSCILLATOR Since there are so many sockets on EasyPIC4 board there are two oscillators that are con AUTOS nected with two main sections of the MCU sockets The first oscillator is labeled as OSCI lt and is connected to DIP40 DIP28 DIP18A and DIP18B socket The second oscillator is labeled as OSC2 and is connected to DIP20 DIP14 and DIPS socket Oscillators Figure 15 j tz b L OSG RB2 RA R36 RA IRES RA RB4 HCLI MP Lr MESS RBI RB RBS GNI RBO RB HELF I I I l RB cosc bi UCL i RR RA OSCI RA VCS pas RAL RB RA RBG FRA OSC RCI i RA RC Jj RAS RC R S A 8 Gie Q P c gre e m sur a us ut a NC m HC R co UEC v eND VCC mi 1 6ND OSqe m GPO GP m 1 NC 05627 mi t GP GPi
24. n see USB and external power supply connectors Power supply select jumper POWER SUPPLY USB and power supply connectors JP1 in the left hand position system will take power from the external AC DC power adapter JP1 in the right hand position system will take power from the USB cable Ext C use USB Power Supply USB connector Coa uss External Power Supply External power supply connector REG1 8 12V AC DC 5V JP1 EE z Vin Vout h g C3 Li GND 2 C8 E2 E3 C15 100nF 470uF 470uF 100nF Figure 9 JP1 is set to USB power supply Li vcc page ICD 0 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 E1 470uF Ecco naue EasyPIC4 Users Manual TEE ON BOARD USB 2 0 PROGRAMMER Keer EUT There is no need for the use of external EROCRAMMER equipment during programming as EasyPIC4 development system has its own on board USB programmer All you need to do is connect the system to a PC using USB cable Then load your program into the microcontroller via the PICFlash2 programming software which is supplied with EasyPIC4 3 PROGRAMIM ER D D qP aodo Figure 10 USB 2 0 programmer Note There is no need for reseting MCU after programming The programmer will reset the MCU automatically On the right of the USB programmer there is the JP5 jumpers group
25. tal pin state Some pins are connected to other peripherials such as the DS1820 temperature sensor RS 232 communication 7 segment displays LCD etc UCU SOCKETS c a a 2 p B D f Co ri C vcc D PortA 2 D SW2_ 3 PORTA GP Mu ag l vcc EIS NL ms f w JP17 RA4 e 1 2799 fi l s RA4 3 vcc x BRA RA4 A A A A r Ppamganeang possssascg presssoess P A A A us s ipag lel NE NES i i RA1 RBS O e je Q RA2 RB4 Q le o Q w etl elena JIS e lej e nnn So N e A e RA4 RB2 Q e Q e RA5 RB e e 6 Oo REO RBO RE1 VDD RE2 VSS VDD RD7 VSS RD6 ICD page EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 9 EasyPIC4 Users Manual MixnoELek rona DEVELOPMENT TOOLS POWER SUPPLY As a power supply source users can select either a regulated supply from the USB cable cma default or an external power supply In case of the USB power supply the system should be connected to a PC using the USB programming cable while the jumper JP1 should be set in the right hand position In the case of an external power supply the EasyPIC4 board produces 5V using 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 position In Fig 7 you ca
26. tches should be OFF Group of 8 switches Switch 1 is ON and other i Co oJ switches are OFF r1 T Switch is ON Ogm9 lt I Switch is OFF 599 page ICD MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD EasyPIC 4 MixnoELekronia EasyPIC4 Users Manual DEVELOPMENT TOOLS JUMPERS Jumpers like switches can break or establish a connection between two points Beneath the plastic cover of the jumper is a metal contact which makes a connection if the jumper is placed between two disconnected 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 RCI and PS 2 DATA pin to RCO pin of the micro controller A connection is made when the jumpers are placed between two contacts Jumper as a switch Jumper is ON to o3 JUMPERS Jumper is OFF Coo 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 contact can be connected to the left or right pin depending on the jumper s position All lines are Left line Right line Figure 4 disconnected is selected is selected Jumper as a m GHD em EasyPIC 4 MIKROELEKTRONIKA SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD 7 S

Download Pdf Manuals

image

Related Search

Related Contents

Descargar Ficha  Mac用タッチパネルドライバー取扱説明書  Philips SpotOn    Silicon Laboratories si85xx User's Manual  descargar Catálogo - navarro - aplicaciones térmicas e hidráulicas, sa  USB-7204 User's Guide  Livret de l`étudiant - 2015/2016 - École Supérieure d`Art de Clermont  

Copyright © All rights reserved.
Failed to retrieve file