Home

EasydsPIC6 Development System User Manual

image

Contents

1. x IRI I Bee PEPPERS uae TIN h LL ELLI I EEE LLLIEELL RIlILLEE r3 E 1 In Circuit Debugger for real time debugging at hardware level JTITI LIL i WU LL LE geages c x TITKKETEFITTILLLIIT lille TEEHHTTTTLD TEEHITITIT S EEETTTITIIIT MI HTTEITDHHI Ld d ieessenas LU sss Ex Port expander provides an easy I O expansion by 2 additional ports oer A en rh mare ML Oo ae St mimimimini ELI aad ICECESDCIT EE 0 1 d d E EI 2 4 3 Fedde s ow iz LLIIIIII Graphic LCD with backlight BERBER BR GLCD128x64 The dsPICFLASH program for programming 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 at www mikroe com Package contains Development system EasydsPIC6 CD product CD with relevant software Cables USBcable Documentation Manuals for EasydsPIC6 dsPlCprog and mikrolCD quick guide for installing USB drivers electrical schematic of the system ies 8 Hr s hi AP THO DE nin System specification GLCD 728 Power Supply over an AC DC connector 7 23V AC or 9 32V DC or over a USB cable for programming 5V DC Power consumption 40mA in idle state when all on board modules are off Dimension 26 5 x 22cm 10 4 x 8 6inch Weight 416g 0 911bs Mikro
2. 1Kbit EEPROM module used for storing small amount of data Figure 11 1 EEPROM module Serial EEPROM is connected to the microcontroller via pins RF2 and RF3 We OVCC Yen RB9 RB101 RB11 ff RB121 RDOI RD1 I VCCI GND RFO RF11 00 a WP J SW9 Sh EEPROM SCL C45 D EEPROM SDA wow T B LOvJOCtOIdSP 829GSv celk ae ovcc Figure 11 2 Serial EEPROM module and microcontroller connection schematic MikroElektronika wi 18 Development System EasydsPICG 12 0 D81820 Temperature Sensor 1 wire serial communication enables data to be transferred over one single communication line while the process itself is under control of the master device The advantage of such communication is that only one microcontroller pin is used All slave devices have by default a unique ID code which enables the master device to easily identify all devices sharing the same communication interface The DS1820 is a temperature sensor that uses 1 wire communication 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 A power supply voltage of 3V to 5 5V is required for its operation It takes maximum 750ms for the DS1820 to calculate temperature with a 9 bit resolution The EasydsPIC6 development system provides a separate socket for the DS1820 It may use either RA11 or REO pin for communication with the microcontroll
3. 4x4 Keypad MENU Keypad Push Buttons On board 2x16 LCD 2x16 LCD 1 0 Connecting the System to a PC 2 0 Supported Microcontrollers 3 0 On board dsPICprog Programmer 4 0 mikroICD In Circuit Debugger 5 0 ICD Connector 6 0 Power Supply 7 0 RS 232 Communication Module 8 0 CAN Communication Module 9 0 Voltage Reference Source 10 0 A D Converter Test Inputs Serial EEPROM Module DS1820 Temperature Sensor Piezo Buzzer 128x64 Graphic LCD Touch Panel VO PONS u u uuu uu Nena MM EE Port Expander Additional I O Ports 4 Development System EasydsPiC6 Introduction to EasydsPIC6 Development System The EasydsPIC6 development system provides a development environment for experimenting with dsPIC microcontrollers from Microchip The system includes an on board programmer with mikroICD providing an interface between the microcontroller and a PC You are simply expected to write a program in one of the dsPIC compilers generate a hex file and program your microcontroller using the on board dsP Cprog programmer Numerous modules such as 128x64 graphic LCD alphanumeric 2x16 LCD port expander etc are provided on the board and allow you to easily simulate the operation of the target device dsPIC Full featured development system for dsPIC microcontroller based devices DEVELOPMENT gs gs fal B On board USB 2 0 TITITITTITITIITIT 3 F ro rammer IN CIRCUIT prag PPRODRUAMNECFH ATE
4. Qo Figure 8 3 MCP2551 and microcontroller connection schematic MikroElektronika Development System EasydsPIC6 1 9 0 Voltage Reference Source The EasydsPIC6 development system provides an MCP1541 circuit which generates the voltage reference used for A D conversion The value of the voltage reference is 4 096V This voltage is suppled to the microcontroller via the RBO pin For the RBO pin to be fed with the reference voltage it is necessary to set switch 7 on the DIP switch SW9 to ON position Figure 9 1 Voltage reference source Figure 9 2 Microcontroller pin RBO is fed with voltage reference 4 096V voltage reference is used under A D conversion Need j ovcc Neh RB9 I RB101 RB11 1l RB121 RDOI RD1 asam VCCI E4 GNDII Tw RFOI RF1 il RF4 RF5 i RF2I RF3 RF6 f RADI RD21I ae OVCC n NO VCC O VIN GND VOUT MCP1541 SZLZ9OSVECIL o U Q9 e T Qo Figure 9 3 Voltage reference connection schematic MikroElektronika 16 Development System EasydsPICG 10 0 A D Converter Test Inputs An A D converter is used for converting an analog voltage into the appropriate digital value The A D converter is linear which means that converted number is linearly dependent on the input voltage value The A D converter built into the microcontroller converts an analog voltage value into a digital number Potentiometer P1 enables voltage to vary between
5. LCD BCK ee ovcC GND I RFO RF EN T EEE EEE LI RF4 Il J e uu aan uwa RF5 il RA RF3 RF61 RADIS RD21 eze ovcc U C oo o T I O w Figure 19 3 Alphanumeric 2x16 LCD and microcontroller connection schematic MikroElektronika INO 6 Development System EasydsPIC6 20 0 128x64 Graphic LCD 128x64 graphic LCD GLCD is connected to the microcontroller via ports PORTB PORTD and PORTF and enables graphic content to be displayed Ithas the screen resolution of 128x64 pixels which allows diagrams tables and other graphic content to be displayed Potentiometer P2 is used for the GLCD contrast adjustment Switch 8 GLCD BCK on the DIP switch SW11 is used to turn the display backlight on off Ports PORTB PORTD and PORTF are also used for the operation of 2x16 LCD so that these displays cannot be used simultaneously zr Contrast adjustment potentiometer GLCD connector Touch panel connector Figure 20 1 GLCD Figure 20 2 GLCD connector GL CD backlight is on Top view Q U e C2 eO TI DA eO CN OO Figure 20 3 GLCD and microcontroller connection schematic MikroElektronika Development System EasydsPIC6 21 21 0 Touch Panel The touch panel is a thin self adhesive transparent touch sensitive panel It is placed over a GLCD Its main function is to register pressure at some specific display point and to forward its coordinates in the form of
6. Fasyds P C6 User manual All MikroElektronika s development systems represent irreplaceable tools for programming and developing microcontroller based devices Carefully chosen components and the use of machines of the last generation for mounting and testing thereof are the best guarantee of high reliability of our devices Due to simple design a large number of add on modules and ready to use examples all our users regardless of their experience have the possibility to develop their project in a fast and efficient way Development Syste AMikroElektronika SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD waking it sigle TO OUR VALUED CUSTOMERS want to express my thanks to you for being interested in our products and for having confidence in mikroElektronika The primary aim of our company is to design and produce high quality electronic products and to constantly improve the performance thereof in order to better suit your needs Nebojsa Matic General Manager The Microchip name and logo the Microchip logo Accuron dsPIC KeeLoq microlD MPLAB PIC PICmicro PICSTART PRO MATE PowerSmart rfPIC and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U S A and other countries Development System EasydsPICG TABLE OF CONTENTS Introduction to EasydsPIC6 Development System Key Features 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0
7. Ps R38 LUE Have in mind when writing program for the microcontroller that MENU keypad is connected to port PORTB J15 vcco Wee Kel 5 e iex 0127622 162 RC14 I RA11 RD9 gRD3 Kei eel ovcc El R58 J11 220 LOvJOCtOIdSP DIP40 Figure 16 2 MENU keypad and microcontroller connection schematic MikroElektronika Development System EasydsPIC6 2 17 0 Push Buttons The logic state of all microcontroller input pins may be changed by means of push buttons Jumper J15 is used to determine the logic state to be applied to the desired microcontroller pin by pressing the appropriate push button The function of the protective resistor is to limit the maximum current thus preventing the development system and peripheral modules from being damaged in case a short circuit occurs If needed advanced users may shorten such resistor using jumper J11 Right next to the push buttons there is a RESET button which is used to provide the MCLR pin with the microcontroller reset signal over the on board programmer L SCC Boat BELLIS Top view Inside view i f x i PEAD 5 peno IE i j 7 i Ae Lea Hc L Push buttons used to simulate ae Ri Ty ven acts Ba ms digital inputs E s RB P MAC QS EEUU rn HF RE X TEM Fu SD o e E ym Lm tz r LG LY cy T kke um gr Ne s x m wm p i m ur HF I f j 7 UT YY aed ULT Bottom view Side view w m E 3 MEE TM j CE
8. but the best performance is provided by frequencies ranging between 2kHz and 4kHz The voltage signal can be generated via microcontroller pin RB12 or RES whereas DIP switch SW9 is used to select which of these two pins is to be used Transistor Q10 is used to amplify voltage signal generated by the microcontroller Figure 13 3 Switch 4 on is gi m the DIP switch SW9 is in the DIP switch SW9 is in Figure 13 1 Piezo buzzer ON position piezo buzzer is ON position piezo buzzer is connected to pin RB12 connected to pin RE3 Piezo buzzer is connected to the microcontroller via pin RB12 7 co NO Nerea ovcc Pel B RELI RB10 8 RB111 RB121 RD0 RD11 VCCI GND I RFOI RF11 RF4 i RF51 RF21 RF31 RF6 f RD8i RD21 ae OVCC BUZZER BLOGVECI LOvJOtOIdSP Figure 13 4 Piezo buzzer and microcontroller connection schematic MikroElektronika Development System EasydsPICG INO e amp 14 0 LEDs LED Light Emitting Diode is a highly efficient electronic light source When connecting LEDs it is necessary to use a current limiting resistor A common LED voltage is approximately 2 5V while the current varies from 1 to 20mA depending on the type of LED The EasydsPIC6 uses LEDs with current I 1mA There are 42 LEDs on the EasydsP C6 development system which visually indicate the state of each microcontroller I O pin An active LED indicates that a logic one 1 is prese
9. liable for any indirect specific incidental or consequential damages including damages for loss of business profits and business information business interruption or any other pecuniary loss arising out of the use of this manual or product even if MikroElektronika has been advised of the possibility of such damages MikroElektronika reserves the right to change information contained in this manual at any time without prior notice if necessary HIGH RISK ACTIVITIES The products of MikroElektronika are not fault tolerant nor designed manufactured or intended for use or resale as on line control equipment in hazardous environments requiring fail safe performance such as in the operation of nuclear facilities aircraft navigation or communication systems air traffic control direct life support machines or weapons systems in which the failure of Software could lead directly to death personal injury or severe physical or environmental damage High Risk Activities MikroElektronika and its suppliers specifically disclaim any expressed or implied warranty of fitness for High Risk Activities TRADEMARKS The Mikroelektronika name and logo the Mikroelektronika logo mikroC mikroC PRO mikroBasic mikro Basic PRO mikroPascal mikroPascal PRO AVRflash PICflash dsPICprog 18FJprog PSOCprog AVR prog 8051prog ARMflash EasyPIC5 EasyPIC6 BigPIC5 BigPIC6 dsPIC PRO4 Easy8051B EasyARM EasyAVR5 EasyAVR6 BigAVR2 EasydsP
10. 0 and 5V The microcontroller with a built in A D converter is supplied with this voltage via test inputs Jumpers J12 are used for selecting one of the following microcontroller pins RB4 RB7 to be supplied with A D conversion voltage Resistor R6 has a protective function and is used to limit current flow through the potentiometer that is to say the microcontroller pin VOLTAGE VOLTA REFERS Ee REFERENCE Eee Figure 10 1 ADC jumper s default position Figure 10 2 Pin RB4 as input pin for A D conversion A D conversion is performed via the RB4 microcontroller pin ANS ovcc o o U C oo o T I oO AN Qo Top view Figure 10 3 Microcontroller and A D converter test inputs connection schematic NOTE In order to enable the microcontroller to accurately perform A D conversion it is necessary to turn off LEDs and pull up pull down resistors on the port pins used by the A D converter MikroElektronika Development System EasydsPICG 11 0 Serial EEPROM Module EEPROM Electrically Erasable Programmable Read Only Memory is a built in memory module used to store data that should be saved when the power supply goes off The 24AA01 circuit can store up to 1Kbit data and uses serial I C module to communicate with the microcontroller via pins RF2 and RF3 In order to enable connection between the EEPROM module and the microcontroller it is necessary to set switches 1 and 2 on the DIP switch SW9 to ON position n law
11. power supply through the USB programming cable and 2 External power supply source connected to an AC DC connector provided on the development board The MC34063A voltage regulator and Gretz rectifier are used to enable 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 J7 is used as a selector for a power supply source To make advantage of the USB power supply jumper J7 should be placed in the USB position When using the external power supply jumper J7 should be placed in the EXT position The development system is turned on off by switching the position of the POWER SUPPLY switch AC DC connector USB connector Power supply voltage regulator Jumper J7 as a selector for a power supply source E ll LINK ME PH ci I Ja Lu Figure 6 1 Power supply J7 l EXT USB Powering over an AC DC connector Powering over a a use USB connector EXT USB m AK eee Side view Side view 4x1N4007 ie Side view Top SWC oC E SWE IPKIE en IGND CMPRI Side view Bottom view Side view m rr ide view Figure 6 2 Power supply source schematic MikroElektronika Development System EasydsPIC6 1 7 0 RS 232 Communication Module USART Universal Synchronous Asynchronous Receiver Transmitter is one of the most common ways of exchanging data between the PC and peripheral modules RS 232 serial communication is performed through a 9 pin SU
12. provides two sockets for quartz crystal Microcontrollers in DIP40A DIP40B and DIP28A packages use socket X1 OSC1A OSC1B for quartz crystal If microcontrollers in DIP18 DOP28B and DIP28C packages are used it is necessary to move quartz crystal from socket X1 to socket X2 OSC2A OSC2B Besides it is possible to replace the existing quartz crystal with another one The value of the quartz crystal depends on the maximum clock frequency allowed 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 DIP40 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 itis completely plugged into the socket as shown in Figure 4 Only one microcontroller may be plugged into the development board at one time NOTE MikroElektronika Development System EasydsPICG 3 0 On board dsPlCprog Programmer A programmer is a necessary tool when working with microcontrollers It is used to load a hex code into the microcontroller and provides an interface between the microcontroller and a PC The EasydsPIC6 has
13. 1 Power supply switch Development System EasydsPICG 1 0 Connecting the System to a PC Step 1 Follow the instructions provided in the relevant manuals and install the dsP Cflash program and the USB driver from the product CD USB drivers are essential for the proper operation of the on board programmer In case you already have one of the Mikroelektronika s dsPIC compilers installed on your PC there is no need to reinstall USB drivers as they are already installed along with the compiler Step 2 Use the USB cable to connect the EasydsP C6 development system to a PC One end of the USB cable with a USB connector of B type should be connected to the development system as shown in Figure 1 2 whereas the other end of the cable with a USB connector of A type should be connected to a PC When establishing a connection make sure that jumper J7 is placed in the USB position as shown in Figure 1 1 AC DC connector USB connector J7 power supply selector Figure 1 2 Connecting USB cable POWER SUPPLY switch Step 3 Turn on your development system by setting the POWER SUPPLY switch to ON position Two LEDs marked as POWER and USB LINK will be automatically turned on indicating that your development system is ready to use Use the on board programmer and the dsPlCprog programmer and the dsP Cflash program to dump a hex code into the microcontroller and employ the system to test and develop your projects NOTE If some additiona
14. 10 IH ricorra NS NU EHE Erco ENNY Hi Amas S AN ANN AS NA SNS i SNS NNN SNS LCDexI6 WITH BACKLIGHT SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS ANNS amp OE LA Z 7 2 A m m 3 2 BE SURE TO PLACE LCD AND GLCD PROPERLY OTHERWISE BOTH m m h 4 A LCD AND GLCD UNITS CAN BE PERMANENTLY DAMAGED E mu PO z 2d mum 7s a8 ao Z Z Z of ci 4440244 7 E s u IILI E OOO U UI aa aa BS 2 MYYTIT Z ih bi Z T AONE ANTON u HEED BW o m du 2 uH EEEE m o m E Z mimmiammmmm PORTO i ial il L ASS SSSR S S S S nsa NN il D a DEVELOPMENT BOARD j sin ts i a Moooo oo EASYdsPIc6 Z a in E HWREV 1 00 BY MIKROELEKTRONIKA Z Up Up i A DEN ooo oO GH vU Jg 2 3 A ASTON deu Sai PORTI lt mis m 1 gt pam EHE IJI m a a a QD meeeeeoeeeeeceeeeeeoo C nnm i Mg mu HN yoo DN UP D ares OT se a aM d x es I EH EHE m nau mm mu M x Horon yyy G ad Q 7 8 9 C SW1 SW6 ENABLE PULL UP GR PULL DOWN RESISTDRS ON PORTA N iH m L mu SW7 SW8 SELECT APPROPRIATE RX AND TX PINS FIOR RS 232 COMMUNICATION pa oO D m I I j I I j z SELECT APPROPRIATE RX AND TX PINS ROR CAN COMMUNICATION e OL 1 0 D 3 RESET mW MN M ME M U m m ku mu mM Bor
15. 7 2 RS 232 module connection schematic NOTE Make sure that your microcontroller is provided with the USART module as it is not necessarily integrated in all dsPIC microcontrollers MikroElektronika 14 Development System EasydsPICG 8 0 CAN Communication Module CAN Controller Area Network is a communication standard primarily intended for use in automotive industry It enables the microcontroller to communicate with a car device without using a host PC In addition such communication is widely used in industrial automation The EasydsPIC6 uses the MCP2551 circuit for CAN communication This circuit provides an interface between the microcontroller and some peripheral device To enable connection between the microcontroller and MCP2551 it is necessary to set switches 6 and 8 on the DIP switch SW8 to ON position Switches 5 and 7 on the DIP switch SW8 may also be used for this purpose Which of these switches is to be used depends solely on the arrangement of the microcontroller pins connected to CAN communication lines The RX line can be connected to the microcontroller via RFO and RF1 pins whereas the TX line can be connected to the microcontroller via pins RF2 and RF3 k E The MCP2551 circuitis used E za for CAN communicaion os CMS x uum Figure 8 1 CAN communication module Figure 8 2 CAN communication module connector CAN communication is enabled via DIP switch SW8 Nee OVCC o 77 U C C e I
16. B D connector and the microcontroller USART module The EasydsP C6 provides one RS 232 port Depending on the microcontroller in use it is necessary to set appropriate switches on the DIP switch SW7 or SW8 to enable connection between the microcontroller and the RS 232 communication module In case the dsPIC30F4013 microcontroller is used it is necessary to set switches 2 RF2 and 6 RF3 on the DIP switch SW7 to ON position Which of these switches is to be used depends on which microcontroller pins are used for the USART communication Anyway the microcontroller pins used in such a communication are marked as follows RX receive data line and TX transmit data line Data rate goes up to 115 kbps In order to enable the USART module of the microcontroller to receive input signals which meet the RS 232 standard it is necessary to adjust voltage levels using an IC circuit such as MAX202C MAX232 POWER i SWITCHING POWER SUPPLY me Ks RS 232 COMMUNICATION aay 2 Figure 7 1 RS 232 communication module Port RS 232A is connected to the microcontroller 7 co VCC U4 O C28 C1 VCC w C31 100nF 100nF v GND ici r10UTIE C30 n or R4 IN 100nF a a Eco RiOUT H C29 Tm TA INI 100nF Ae OVCC AGNDI RB9 I RB101 RB11 Il RB121 RDO RD11 VCCI GNDI RFOI RF1 1 BLOGVECI T20UT T2INq PR2IN R20UTE MAX202 N O 91 op N e c LOvJOCtOIdSP Bottom view Figure
17. Elektronika ze nona WOMB MWY ml im l s sa ml mi P 2 ITI TII m m an mi ismi m m H o SSSSSSSSSSSSSSSSSSSSS M NNN ANANN ll if POWER SUPPLY rm4rm4rmi REFERENCE exr B e use E E H H H N a lj sowa PRG ICD mmm mmm 5 uz 7 mmm bOoRTB C SWITCHING POWER SUPPLY J USB PROG F EEEIEE mmm s g mmmn Lo Z Z ROWER SUPPLY og 1111111 9 EA S onhediiiiiiiil a e RS 232 os eee O Down Z Z 28 a COG2x16 oF KXXX RE Z COMMUNICATION z 2 Z FON g DSI820 CONTRAST o Z Z m EE m A sss Q m z len rin OR m Z Z w imi um UN LIII 2 mE 5e 88 u E Z Z zz p Z Z A Z lt Pull 2 j S p iiil m Z 2 Om moocococ0 2 j Z SLOMMAMAAMMAMBAMBM I Z A ri Z DIP28A DIP28C 2 2 2 mim mim PORTE A Z me m im im mim im N AN E Hi ml mr od d sl m CELLAN He LCD 2x16 CHARACTERS IN 4 BIT MODE l lt 7 Ej Qu c D HSSE NNN m E T EH e E El Hi PIC30F 2020 ec00060000 7 7 l000000000000 PIC30F 4012 m m 2 Z v o mm 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 PIC30F20
18. IC4A EasyPSoC4 EasyVR Stamp LV18FJ LV24 33A LV32MX PIC32MX4 MultiMedia Board PICPLC16 PICPLC8 PICPLC4 SmartGSM GPRS UNI DS are trademarks of Mikroelektronika All other trademarks mentioned herein are property of their respective companies All other product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies and are only used for identification or explanation and to the owners benefit with no intent to infringe Mikroelektronika 2010 All Rights Reserved UJOO 90JXIUU 991JJO Je sn 1981UOO 0 ejejsoeu JOU op sjesodoud sseuisnd 40 sjueujuloo suoils nb ue eAeu noA J jmoddns u9 u109 80JXIU MMM e 1exon UNOA eoej d se jd uoneuuojur jeuonippe p u snf 10 sjonpoud ano Jo ue YIM sul IqoJd eulos Buiouauedxe ae nof LJO3 80JXIUU MMM Je lISQ A INO SIA eseejd sjonpoud JNO 1r oqe sJOW ujee 0 JUeM nof J f d IHOM Q4GGdglIAd 804 SNOILN TOS 3HVMQOSHVH ANY 38VM1dOS
19. JOL mm mm Es NE uU SW12 TURNS ON OFF PQRT LEDS CONNECTS FOUC HPANEL TO RB6 RB7 PINS m TOUCHPANEL SPOIL eJ for lt I Bi TT Nep e S uuu ENTER CANCEL e o EE DIE ME D EE LE HERFORD JI5 IS USED FOR SELECTING VOLTAGE LEVEL TO BE APPLIED WHEN BUTTON IS PRESSED Key Features NIO ME Ea En E al IS ER Ez Bs Es Es Es m m mi Es pn L El ml imi s ml Emi ttf 16 Port expander 1 Power supply voltage regulator 17 Potentiometer for adjusting contrast of graphic display 2 On board programmer s USB connector 18 Graphic LCD connector 3 USB 2 0 programmer with mikroICD 19 Touch panel connector 4 DS1820 temperature sensor 20 MENU keypad 5 Microchip s debugger connector ICD2 or ICD3 21 4x4 keypad 6 CAN communication module 22 Push buttons simulate microcontroller digital inputs 7 A D converter test inputs 23 Jumper for selecting pins logic state via push buttons 8 4 096V voltage reference source 24 Jumper for protective resistor shortening 9 Piezo buzzer 25 Reset button 10 Jumper for pull up pull down resistor selection 26 42 LEDs indicate pins logic state 11 Serial EEPROM module 27 Potentiometer for adjusting contrast of alohanumeric LCD 12 On board 2x16 LCD 28 Alphanumeric LCD connector 13 I O port connectors 29 DIP switches turn on off on board modules 14 DIP switches enable pull up pull down resistors 30 RS 232 communication module 15 Microcontroller sockets 3
20. La a F uu 5 AS 1 Caj Oo A RES RE 4 p A A RESET button Ld gd h 1 k pN me a REJ 2t Siva MI au eT Paie x LA eg Saye w uu Boa s m m Cina r B Jumper J11 used to shorten protective resistor Jumper J15 used to select logic level to be applied to a pin by pressing push button Figure 17 1 Push buttons By pressing any push button when jumper J15 is in the VCC position a logic one 5V will be applied to the appropriate microcontroller pin as shown in Figure 17 2 By pressing a push button the appropriate pin will be driven high 1 Nerea ovCcC Nein B RB9 RB101 RB11 Ill RB121 RDO I RD1 I VCCI GNDI RFOI RFill RF4 i RF5 il RF2 RF3 i RF61 RD8i RD2 Were OVCC o 77 U C oO O T I O Figure 17 2 Push buttons and port PORTB connection schematic MikroElektronika INS 4 Development System EasydsPIC6 18 0 On Board 2x16 LCD On board 2x16 LCD display is connected to the microcontroller by means of a port expander In order to use this display it is necessary to set switches 1 6 on the DIP switch SW10 to ON position thus connecting the on board LCD to the port expander s PORT1 DIP switch SW11 enables SPI communication between the port expander and the microcontroller Potentiometer P5 is used to adjust the on board display contrast Unlike 2x16 LCD the on board LCD has no backlight but similar to 2x16 LCD this display als
21. an on board dsP Cprog programmer All you need is a hex file to be loaded into the microcontroller using the dsPICFLASH program Figure 3 3 shows connection between the compiler the dsPICFLASH program and the microcontroller Programmer s USB connector Figure 3 1 USB connector s front side Figure 3 2 On board programmer 1 Write a program in one of dsPIC Compiling program compilers and generate a hex file E mikroC compiler for dsPIC 30 33 and PIC 24 Fie Edit View Project Debugger Run Tools Help Q2 Use the dsPICFLASH program to select desired microcontroller to be D d m wx X a s 1110001001 Bin programmed aed custom Tez 1 0110100011 011101 2EC23AAT7 6 Click the Write button to dump zs 1011 F43E0021A the code into the microcontroller 26 Char txt 10 mikro Hex DA67F0541 27 l z8 void maini 29 f PORTO 1 qgigital 30 ADPCFG 31 Tarishka dine HL fa A wil Frikia CLE m m On the left side of the D ue iul ee thon i 32 Led Custom Init LV 24 330 j dSPICFLASH program s main 33 Led Custom Out 1 3 txt 2 window there is a number of Primary Abert nci options for setting the operation 34 Led custom Out z 6 EXE Waska Taser upa 35 Led Custom Chr 2 7 a pape aoa of the microcontroller to be 36 Led Custom Out i 10 txt ga used A number of options 37 Led Custom Chr 1 11 o ican qas BER which enable the programming 38 i i ape neces ek ee process
22. analog voltage to the microcontroller Switches 5 6 7 and 8 on the DIP switch SW12 are used for connecting the microcontroller and touch panel Figure 21 1 Placing touch panel over a GLCD Figure 21 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 as shown in Figure 4 Touch panel is connected to the microcontroller via pins RB6 RB7 RC13 and RC14 ANa ovcc AGNDI RB9 ll RB101 RB11 Il RAPA RDO RD1 Il VCCI GND II RFOI RF11 RF4 RF51 RF21 C RF3 i BOTTOM Q RF6 I RD8l RD2 VCCI 8L9SrEZI z N Q 77 U e oO TI K oO TOUCHPANEL CONTROLLER Figure 21 3 Connecting touch panel Figure 21 3 shows in detail how to connect a touch panel to the microcontroller Bring the end of the flat cable close to the CN9 connector Figure 1 Plug the cable into the connector Figure 2 and press it easily so as to fully fit the connector Figure 3 Now a GLCD can be plugged into the appropriate connector Figure 4 NOTE LEDs and pull up pull down resistors on ports PORTB and PORTC must be off when using a touch panel MikroElektronika 28 Development System EasydsPIC6 e5 22 0 Input Output Ports Along the right side of the development system there are six 10 pin connectors connected to the microcontroller s I O ports Pins used for programming are not directly connected to the appropriate 10 pin connectors but via the program
23. are provided on the right side of the window Positioned WriteacodeinoneofthedsPlCcompilersgenerate aa in the bottom right corner of a hex file and employ the on board programmer me Hem ian n d the window the Progress bar to load the code into the microcontroller Soars twee enables you to monitor the programming progress hex code loading iri ERE Vea Pali ea re pi Lr xe ede s E Clg bern alle Seica prs nb panini sade ICD Cosrsrmumicathor diei Communicate on Po EPUC and PAL 4 44 4 4 a did 4 4d Figure 3 3 Programming process MikroElektronika Development System EasydsPICG Microcontroller pins for programming PGD PGC and MCLR are not directly connected to the on board programmer but via a multiplexer The multiplexer is used to disconnect the microcontroller pins used for programming from the rest of the board while the programming process is under way As soon as the programming process starts the multiplexer automatically disconnects pins for programming from the development system In this case these pins cannot be used as I O pins When the programming process is complete the multiplexer reconnects these pins to the development system after which they can be used as O pins Multiplexer MCU PGD MCU PGC MCLR Duringthe programming the multiplexer disconnects the microcontroller pins used for programming from the rest of the board and connects them to the dsP Cprog prog
24. asing the number of available I O ports by two If the port expander communicates to the microcontroller over the DIP switch SW11 then the microcontroller pins RB10 RB11 RF6 RF2 and RF3 used for the operation of port expander cannot be used as l O pins The microcontroller communicates with the port expander MCP23S17 circuit using serial communication SPI The advantage of such communication is that only five lines are used for simultaneous data transceive and receive T ek See Q Q MOSI Master Output Slave Input microcontroller output MCP23S17 input MISO Master Input Slave Output microcontroller input MCP23S17 output SCK Serial Clock microcontroller clock signal CS Chip Select enables data transfer RST Reset Data transfer is performed in both directions simultaneously by means of MOSI and MISO lines The MOSI line is used for transferring data from the microcontroller to the port expander whereas the MISO line transfers data from the port expander to the microcontroller The microcontroller initializes data transfer by sending a clock signal when the CS pin is driven low OV The principle of operation of the port expander s ports 0 and 1 is almost identical to the operation of other ports on the development system The only difference here is that port signals are received in parallel format The MCP23S17 converts then such signals into serial format and sends them to the microcontroller The result is a reduce
25. d The state of these registers changes during the program execution which can be viewed in this window Double click on the Value field enables you to change data format The mikrolCD 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 Step Over command Each of these commands is activated via keyboard shortcuts or by clicking appropriate icon within the Watch Values window Figure 4 1 Watch Values window 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 microcontroller can be viewed in the mikrolCD Watch Values PORTC Qx 0 PORTD Ox0D 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 window Step 2 EE a D ORTE Oxo F a yaa 55 o el After the Step Over command i dea W J Properties e Add A MER is executed the microcontroller w Select va horn kt will execute the 41st program nt Search lor vanable by atienbi name line The next line to be executed is highlight
26. d number of Figure 23 1 Port expander lines used for sending signals from ports 0 and 1 to the microcontroller pa g Jumper for selecting pull up pull down re DIP switch SW11 enables port expander Need OVCC Yen KCO Woo uo 514 ores I GPB4 UTE ered sts Pre coo Q n a C Q O 7 I e ev MCP23S17 Figure 23 2 Port expander and microcontroller connection schematic MikroElektronika 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 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
27. e For example by pressing button 6 a logic one 1 will appear on the RB10 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 RB4 RB5 RB6 and RB7 EW J wee F ETTE E EX m D ct rs OS x lt I LO s z RF 9 OT sl a igure 15 1 Keypad 4x4 TI ES rosPr BY MIKROELEKTRC CONNECTOR wm Pull down Figure 15 2 Keypad 4x4 performance Keypad 4x4 is connected to the microcontroller via port PORTB vcco Mele Kel OSC1 I OSC2 RC13 RC14 I RA11 RD9 a8 RD3 Kel DIP40 AB P RN2 JEDE 7x10K 12345678 E T49 aee m Lege ejl Ho R35 E li 100 LIS Nr 5 c oa Qo U C oo o I c oO R38 100 ee OVCC Figure 15 3 Keypad 4x4 and microcontroller connection schematic MikroElektronika 21 22 Development System EasydsPIC6 16 0 MENU Keypad There is a set of push buttons serving as a navigation keypad called MENU provided on the EasydsP C6 development system It primarily consists of four push buttons marked as left right up and down arrows There are also two additional push buttons marked as ENTER and CANCEL MENU push buttons are connected in the same way as the port PORTB push buttons Their function is determined by the user when writing the program for the microcontroller 22 9 56 LE RE SS A
28. ed in blue The state of registers being changed by executing this instruction may be viewed in the Watch Values window uh le for counter OF counter c OF GuEF E PORTH 1 lt 4 counter P RTE 1 e counter NOTE For more information on the mikrolCD debugger refer to the mikrolCD Debugger manual MikroElektronika Development System EasydsPIC6 11 5 0 ICD Connector The ICD connector enables communication between the microcontroller and an external ICD debugger programmer from Microchip ICD2 or ICD3 Jumpers J9 and J10 are used for selecting a pin to be fed with programming signals For the programming signals to be sent to the microcontroller it is necessary to place these jumpers in the appropriate position The position of jumpers depends on the arrangement of the microcontroller pins used for programming Figures below show the position of jumpers J9 and J10 depending on which microcontroller pins are used for programming EIE BHEAN Figure 5 1 Pins RF2 and RF3 Figure 5 3 Pins RB5 and RB4 Figure 5 4 Pins RF7 and RF8 are used for programming are used for programming are used for programming are used for programming O 7 T O Q O TI I O ev Figure 5 5 ICD connector s pinout and designations MikroElektronika h M Development System EasydsPiC6 6 0 Power supply The EasydsPIC6 development system may use one of two power supply sources 1 5V PC
29. er which depends on switches 5 and 6 on the DIP switch SW9 Figure 12 5 switch 5 on the DIP switch SWO9 is in the ON position which means that communication is performed via the RA11 pin NOTE Make sure that half circle on the board matches the round side of the D81820 ROS Figure 12 1 DS1820 Figure 12 2 DS1820 Figure 12 3 Switch 5 on Figure 12 4 Switch 6 on connector DS1820 temperature sensor is placed the DIP switch SW9 is in ON the DIP switch SW9 is in ON temperature sensor is not in DS1820 connector position DS1820is connected position DS1820 is connected placed to pin RA11 to pin REO Temperature sensor is connected to the microcontroller via the RA11 pin ANA ovcC Nie DS1820 GND o VCC MCU LOvVAOEDIdSP DQ Botoom view ann VCC MCU GND Figure 12 5 DS1820 temperature sensor and microcontroller connection schematic MikroElektronika Development System EasydsPIC6 1 13 0 Piezo Buzzer Due to a built in piezo buzzer the develompent system is capable of emitting audio signals For the piezo buzzer to operate normally it is necessary to generate a voltage signal of specified frequency The voltage signal is generated in the microcontroller by the appropriate code written to its memory Remember when writing the voltage signal generation code that the piezo buzzer s resonant frequency is 3 8kHz In addition other frequencies in the range between 20Hz and 20kHz can be used
30. l modules are used such as LCD GLCD etc it is necessary to place them properly on the development system while it is turned off Otherwise either can be permanently damaged Refer to figure below for the proper placing of the additional modules MikroElektronika Development System EasydsPICG page wa 2 0 Supported Microcontrollers The EasydsP C6 development system provides six separate sockets for dsPIC microcontrollers in DIP40 DIP28 and DIP18 packages These sockets allow supported microcontrollers in dsDIP packages to be plugged directly into the development board There are two sockets for dsPIC microcontrollers in DIP40 package three sockets for dsPIC microcontrollers in DIP28 package and one socket for dsPIC microcontrollers in DIP18 package provided on the board Which of these sockets will be used depends solely on the pinout of the microcontroller in use The EasydsP C6 development system comes with the microcontroller in DIP40 package 3 pez eo gt pe m l gp por PERENNE UM M n d uw Lay 288 x HT ss INTA m nd NU T 3l a LX Aig ur i Es u 8 elle ele lip fe Yi gt PICIO sr uim angi SS hh eb eo m AET ETs 2 a RF Ro 5 maf Uee Seia m r b c6 LEE E t c sein PE E Jii Baa n Figure 2 1 Microcontroller sockets dsPIC microcontrollers normally use a quartz crystal for stabilizing clock frequency The EasydsP C6
31. mer s multiplexer Owing to DIP switch SW1 SW6 each connector pin can be connected to one pull up pull down resistor Whether pins of some port are to be connected to a pull up or a pull down resistor depends on the position of jumpers J1 J6 Jumper for pull up pull down resistor selection DIP switch to turn on Additional module connected to PORTB C PORTF 2x5 male connector pull up pull down resis tors for each port pin Figure 22 3 J4 in pull up position EEF ma Figure 22 1 I O ports PORTB pins are connected to vee pull down resistors up ix TT 8x10K pu down ON J1 sw1 12345678 IS ovcc Yen RBOE RB101 RB11 1 RB121 RD0 RD11 VCCI ej BH RFO RF11 RF4 5 RF5 RF21 RF3 i RF6 RD8i RD2 49 03 OVCC A RBO MI LD1 N x L RB1 MI LD2 VV A T I LL RB 310 4 01990 a 29 Figure 22 4 PORTB connection schematic MikroElektronika Development System EasydsPIC6 2 Pull up pull down resistors enable you to set the logic level on all microcontroller s input pins when they are in idle state This level depends on the position of the pull up pull down jumpers The RDO pin with the relevant DIP switch SW3 jumper J3 and push button RDO with jumper J15 are used here for the purpose of explaining the performance of pull up pull down resistors The principle of their operation is the same as for all other microcontroller pins In order to enable the PORTD p
32. nt on the pin In order to enable the pin state to be shown it is necessary to select appropriate port PORTB C PORTA D PORTE or PORTE F using the DIP switch SW12 a SV mi Falk TETTE illin ENGE z a ip O REG PonTaB c EN PORTA D WA PORTE PORTE F Wa PEAD x a PEAD a Ree P Microcontroller NRT id b x f ED BY ita ET BLEUS j ARE ACTIVAT 3 LS SIUS RF RE k sm oma IET qu SMD resistor limiting current flow through an LED Figure 14 1 LEDs Port PORTB LEDs are turned on I MCLR Nerea ovcc RBO AR LD1 Ye WV RB9 x RB1048 ep O RB11l O nmB121 Rool C RD1 Q3 40103 OVCC SW12 E RB8 GND I vcce T RFol PORTB C EN O Ker RF1 4 z Kester RF41 RF5 i RF2 RF3 i RF6 RD8i RD2 I ae OVCC Figure 14 2 LEDs and port PORTB connection schematic MikroElektronika Development System EasydsPICG 15 0 4x4 Keypad The 4x4 keypad is a standard alphanumeric keypad connected to the microcontroller port PORTB The performance of this keypad is based on the scan and sense principle where pins RB8 RB9 RB10 and RB11 are configured as inputs connected to pull down resistors Pins RB4 RB5 RB6 and RB7 are configured as outputs and generate a logic one 1 Pressing any button will cause a logic one 1 to be applied to input pins Push button detection is performed from within the softwar
33. o displays digits in two lines each containing up to 16 characters of 7x5 pixels Contrast adjustment potentiometer P5 IO PORT fi p NDE se j DIP switch SW9 used to turn on on board 2x16 LCD CTED Tr RS PORT Nerea ovcc ien eos deat es Ur out i olli tuu qp GPA7 SN GPA6 ii GPA5 II GPA4 LILILI LI LU ej wed S OO LLI gt ole a GPA2I GPA1I GPA0O I AEAN INTBE HER nunn PE INTA 201 01900 a e 12345678 beet SW10 8 9Sg8ve ci E Top view Figure 18 2 On board 2x16 LCD and microcontroller connection schematic MikroElektronika Development System EasydsPIC6 2 19 0 2x16 LCD The EasydsPIC6 development system provides an on board connector for the alphanumeric 2x16 LCD This connector is linked to the microcontroller via ports PORTB and PORTD Potentiometer P4 is used to adjust display contrast Switch 8 LCD BCK on the DIP switch SW9 is used to turn the display backlight on off Communication between this LCD and the microcontroller is performed in a 4 bit mode Alphanumeric digits are displayed in two lines each containing up to 16 characters of 7x5 pixels E Kon g Og Drop EF N TT Aag Ninny Chae IRE Fj ie Sag 1D Bus Bla nu red pi mea ich c P AND guen T LCP An AED Py a Aen g U Mats Chay ar im Pay y a md Big ea big P es ane A gt Figure 19 1 Alphanumeric LCD connector LCD backlight is on 7 c Top view 8 29Svt cl
34. ort pins to be connected to pull down resistors it is necessary to place jumper J3 in the Down position first This enables any PORTD port pin to be supplied with a logic zero 0V in idle state over jumper J3 and 8x10k resistor network To provide the RDO pin with such signal it is necessary to set switch 1 on the DIP switch SW3 to ON position As a result every time you press the RDO button a logic one VCC will appear on the RDO pin provided that jumper J15 is placed in the VCC position o D U O O T o OO In order to enable port PORTD pins to be connected to pull up resistors and the port input pins to be supplied with a logic zero 0 it is necessary to place jumper J3 in the Up position and jumper J15 in the GND position This enables any port PORTD input pin to be driven high 5V in idle state over the 10k resistor As a result every time you press the RDO push button a logic zero OV will appear on the RDO pin provided that switch 1 on the DIP switch SW3 is set to ON position LOvAOeOldsP In case that jumpers J3 and J15 have the same logic state pressure on any button will not cause input pins to change their logic state Figure 22 7 Jumpers J3 and J15 in the same position MikroElektronika 0 Development System EasydsPIC6 23 0 Port Expander Additional Input Output Ports SPI communication lines and MCP23S 17 circuit provide the EasydsP C6 development system with means of incre
35. rammer When the process of programming is complete these pins are automatically disconnected from the programmer and may be used as input output pins Figure 3 4 Programmer schematic MikroElektronika 10 Development System EasydsPICG 4 0 mikrolCD In Circuit Debugger The mikrolCD In Circuit Debugger is an integral part of the on board programmer It is used for 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 dsPIC compilers designed by Mikroelektronika mikroBASIC PRO mikroC PRO mikroPASCAL PRO etc As soon as the mikrolCD debugger starts up a window called Watch Values appears on the screen Figure 4 1 The mikro CD debugger communicates to the microcontroller through the microcontroller s pins used for programming K mikrolCD debugger options Watch Values E Eh By 20 ow eI m E amp dw FE Add Remove Properties Add Select variable from list Icon commands A complete list of registers within the microcontroller being programmed 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 F5 A list of selected registers to be monitore

Download Pdf Manuals

image

Related Search

Related Contents

User`s Manual Tower CD Duplicator CD-D13 CD-D17HD    Neff B45E42  Adaptador de Vídeo Externo USB a DVI - Tarjeta  BIRD LAZZZER MODE D`EMPLOI    Informations et Services - CIBTP de l`ile de France  User Manual Engine Compartment Measurement  IP 24 - Eibenstock  Samsung SGH-P400 دليل المستخدم  

Copyright © All rights reserved.
Failed to retrieve file