Datasheets»Microchip Technology»DS41614A Datasheet

DS41614A Datasheet

Download or read online Microchip Technology DS41614A F1 LV Evaluation Platform for Enhanced PIC® Microcontrollers pdf datasheet.



Page
1 of 44
next
F1 LV Evaluation Platform for
®
Enhanced PIC
Microcontrollers
User’s Guide
 2011 Microchip Technology Inc.
DS41614A

Summary of Contents

Page 1

... F1 LV Evaluation Platform for Enhanced PIC 2011 Microchip Technology Inc. ® Microcontrollers Users Guide DS41614A ...

Page 2

... Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. DS41614A-page 2 Trademarks The Microchip name and logo, the Microchip logo, dsPIC ...

Page 3

... Chapter 3. Programming the F1 LV Evaluation Platform 3.1 Introduction ... 21 3.2 Programming/Development Tool Support ... 21 3.3 Hardware Resources ... 22 Chapter 4. Demo Code 4.1 Introduction ... 25 4.2 Service Drivers ... 25 4.3 Combined Demo ... 25 4.4 Motor Control GUI Application ... 25 2011 Microchip Technology Inc EVALUATION PLATFORM Table of Contents 2 C Temperature Sensor ... 11 USERS GUIDE DS41614A-page 3 ...

Page 4

... LCD is blank, but everything else works ...35 Chapter 7. Schematics 7.1 Introduction ... 37 7.1 Evaluation Platform Schematic ( ...38 7.1 Evaluation Platform Schematic ( ...39 7.1 Evaluation Platform Schematic ( ...40 7.1 Evaluation Platform Schematic ( ...41 DS41614A-page 4 2 C Driver ... 28 2011 Microchip Technology Inc. ...

Page 5

... Chapter 3. Programming the F1 LV Evaluation Platform Chapter 4. Demo Code Chapter 5. Hardware Libraries and Drivers Chapter 6. Troubleshooting Chapter 7. Schematics 2011 Microchip Technology Inc EVALUATION PLATFORM Preface NOTICE TO CUSTOMERS USERS GUIDE ® IDE online help. DS41614A-page 5 ...

Page 6

... Bold characters NRnnnn Text in angle brackets < > Courier New font: Plain Courier New Italic Courier New Square brackets [ ] Curly brackets and pipe character Ellipses... DS41614A-page 6 Represents Referenced books MPLAB Emphasized text ...is the only compiler... A window the Output window A dialog the Settings dialog ...

Page 7

... For the latest information on using other tools, read the tool-specific Readme files in the Readmes subdirectory of the MPLAB IDE installation directory. The Readme files contain update information and known issues that may not be included in this users guide. 2011 Microchip Technology Inc. ® IDE installation directory. The DS41614A-page 7 ...

Page 8

... MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manager and general editing and debugging features. Programmers The latest information on Microchip programmers. These include the MPLAB PM3 device programmers and PICkit 3 development programmers. DS41614A-page 8 ® C16, MPLAB C18 and MPLAB C30 C com- 2011 Microchip Technology Inc. ...

Page 9

... Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://support.microchip.com DOCUMENT REVISION HISTORY Revision A (November 2011) Initial Release of this Document. 2011 Microchip Technology Inc. DS41614A-page 9 ...

Page 10

... NOTES: DS41614A-page 10 2011 Microchip Technology Inc. ...

Page 11

... Low-power 32 kHz crystal oscillator 11. LCD controller 12. LF Operating Range: 1.8-3.6V 1.3.2 MCP9800 I The MCP9800 is a low-power, I output resolution. 2011 Microchip Technology Inc EVALUATION PLATFORM www.microchip.com/F1LVEval C, SPI) 2 C Temperature Sensor 2 C temperature sensor with selectable bits of USERS GUIDE ® microcontrollers. DS41614A-page 11 ...

Page 12

... The MCP1703 is a low-dropout voltage regulator with a 250 mA maximum output. Through the use of this component, the user has the option of powering the F1 LV Evaluation board through the USB Serial Converter connector. The USB supplies 5V, and the MCP1703 reduces this to the operating voltage of 3.3V. DS41614A-page 12 2011 Microchip Technology Inc. ...

Page 13

... J7 (AAA BATT) The user can power the board by inserting a single AAA battery into B1 battery clamp. J8 (USB PWR) The user can power the board by connecting a USB cable to J2 USB SERIAL CONV header. 2011 Microchip Technology Inc. DS41614A-page 13 ...

Page 14

... NOTES: DS41614A-page 14 2011 Microchip Technology Inc. ...

Page 15

... The following sections include: Powering the F1 LV Evaluation Platform Default Firmware Programming the F1 LV Evaluation Platform with the PICkit 3 Measuring the current consumption FIGURE 2-1: 2011 Microchip Technology Inc EVALUATION PLATFORM F1 LV EVALUATION PLATFORM USERS GUIDE DS41614A-page 15 ...

Page 16

... Attach the PICkit 3 to the PICkit ICSP connector at the end of the board. 4. Activate the PICkit 3 power output. Note: When powering from the PICkit 3, all power supply jumpers (J5 - J8) should be removed. FIGURE 2-2: DS41614A-page 16 POWERING FROM PICkit 3 2011 Microchip Technology Inc. ...

Page 17

... Verify the supply voltage to be between 1.8 and 3.6V. For proper LCD contrast, the supply should be 3.3V. 4. Populate EXT PWR jumper, J5. 5. Turn on the power supply. FIGURE 2-3: 2011 Microchip Technology Inc EXT SUPP (), connect V REF REF POWERING WITH EXTERNAL POWER SUPPLY - to EXT SUPP(-). DS41614A-page 17 ...

Page 18

... To power with a single AAA battery, the MCP1640 Boost Regulator is used to take the supplied 1.8V and convert it to 3.3V. 1. Make sure the jumper or an ammeter is connected across J4. 2. Insert AAA battery into B1 battery clip. 3. Populate AAA BATT jumper, J7. FIGURE 2-5: DS41614A-page 18 EXPANSION SLOT POWER POWERING FROM BATTERY 2011 Microchip Technology Inc. ...

Page 19

... Measuring the Ambient Temperature The MCP9800 is polled when in Temperature Measurement mode. The measured temperature is filtered, scaled to either Centigrade or Fahrenheit and displayed on the LCD. 2011 Microchip Technology Inc. USB POWER www.microchip.com/F1LVEval DS41614A-page 19 ...

Page 20

... Turning the pot will change the motor speed. When an expansion board is present, the F1 LV Evaluation code will automatically detect the add-on type and modify the motor drive accordingly. DS41614A-page 20 (DM164130-2) (DM164130-6) (DM164130-7) (DM164130-8) ...

Page 21

... These adaptors provide the inline 6-pin connector required by the PICkit ICSP programming capability interface. You will also need a power supply, please see Chapter 2. Getting Started for more on powering the F1 LV Evaluation Platform. 2011 Microchip Technology Inc EVALUATION PLATFORM USERS GUIDE DS41614A-page 21 ...

Page 22

... RC4 I 36 RC5 0 37 RB7 RA7 0 40 RA6 RB6 0 43 RB5 I DS41614A-page 22 Use Name RE1 RE0 P3A Low Side Drive C; J3 Pin 9 LCD SEG43 LCD SEG44 R3 MCLR/V PP RG4 AN5 C12IN3- AN1 C1IN BEMF Reference; J3 Pin 16 AN10 ...

Page 23

... SEG1 LCD SEG0 P2A Low Side Drive B; J3 Pin 5 LCD COM3 LCD COM2 LCD COM1 LCD COM0 P2B High Side Drive B; J3 Pin 7 F1/F3/F4/P6 4B/4C/4G/P4 4A/4D/4E/4F 3B/3C/3G/P3 3A/3D/3E/3F 2B/2C/2G/P2 J3 Pin 4 2A/2D/2E/2F Push Button 1B/1C/1G/1P Supply Return Power Supply 1A/1D/1E/1F COM4 COM3 COM2 COM1 DS41614A-page 23 ...

Page 24

... NOTES: DS41614A-page 24 2011 Microchip Technology Inc. ...

Page 25

... Refer to application note AN1305, Sensorless 3-Phase Brushless Motor Control with the PIC16FXXX, for detailed information regarding BLDC motor control. 2011 Microchip Technology Inc EVALUATION PLATFORM 2 C temperature sensor. ® driver is used to read from each add-on board which motor type USERS GUIDE DS41614A-page 25 ...

Page 26

... The Bipolar Stepper Demo controls a Unipolar stepper motor connected to the PIC16F1 Bipolar Expansion board (DM164130-7). Motors of the same type, but other than the motor supplied, can also be driven by making appropriate modifications to the motor control parameters. DS41614A-page 26 2011 Microchip Technology Inc. ...

Page 27

... Microchip Technology Inc EVALUATION PLATFORM 2 C requests to be queued and then handled either by interrupts 2 C driver to get the current temperature. The events. If the I C driver is operating with interrupts, the USERS GUIDE 2 C, real-time clock driver is operating without 2 C DS41614A-page 27 ...

Page 28

... I transaction is complete or the array may be reused by a different function). DS41614A-page Master mode driver with the following features: ...

Page 29

... The i2c_write_block and i2c_read_block functions are helpers that assemble a TRB, insert it into the queue and wait for the transaction to complete. 2011 Microchip Technology Inc driver and makes it ready to receive DS41614A-page 29 ...

Page 30

... This data type is simply four 4-bit fields representing digits and 3. FIGURE 5-6: typedef union { UINT16 struct { }; } BCD_TYPE; Simply place the number you want displayed in each digit position and call lcd_display_digits. DS41614A-page 30 val; unsigned digit0 : 4; unsigned digit1 : 4; unsigned digit2 : 4; unsigned digit3 : state to be handled. This  ...

Page 31

... These two functions simply turn the LCD peripheral off. The Timer1 oscillator is left running. One use for these functions is to implement display blinking. FIGURE 5-9: void update_blinking() { if(time( odd number of seconds { lcd_display_on(); } else { lcd_display_off(); } } 2011 Microchip Technology Inc. DS41614A-page 31 ...

Page 32

... There are many segments present on the F1 LV Evaluation Platform LCD. To access these segments, simply set the supplied #defines to 1 or 0. FIGURE 5-11: void display_volts(int v) { display_int(v); DP3 0; DP2 AMPS 0; VOLT 1; KILO 0; OHMS < 0) else } DS41614A-page 32 LCD DISPLAY MINUS 1; MINUS ...

Page 33

... TMR1IF 0; rtcc_handler(); } } 5.8.1.3 rtcc_set After system initialization, the seconds counter is cleared to 0. The standard C libraries equate 0 seconds to Midnight, Jan 1, 1970. That time has expired a long time ago new time in seconds can be configured with rtcc_set(). 2011 Microchip Technology Inc. DS41614A-page 33 ...

Page 34

... This function reads the current temperature and scales the result to degrees C 10. (24.3C is returned 243) FIGURE 5-16: Thermostat() { int temperature; temperature mcp9800_get_temp(); if(temperature > 260) { turn_on_air_conditioner(); } } DS41614A-page 34 // the month // the day of the month // the hour (0-23) // the minutes // the seconds 2 C temperature sensor. The MCP9800 driver provides a simple 2 C interface. 2011 Microchip Technology Inc. ...

Page 35

... In an actual application, Microchip recommends that the crystal circuit be conformal coated to prevent leakage. Please review Application Note AN1288, Design Practices for Low-Power External Oscillators for more information. 2011 Microchip Technology Inc EVALUATION PLATFORM USERS GUIDE DS41614A-page 35 ...

Page 36

... NOTES: DS41614A-page 36 2011 Microchip Technology Inc. ...

Page 37

... Chapter 7. Schematics 7.1 INTRODUCTION To help understand the features of the F1 LV Evaluation Platform, the schematics are included here. 2011 Microchip Technology Inc EVALUATION PLATFORM USERS GUIDE DS41614A-page 37 ...

Page 38

... F1 LV Evaluation Platform Schematic ( DS41614A-page 38 2011 Microchip Technology Inc. ...

Page 39

... F1 LV Evaluation Platform Schematic ( 2011 Microchip Technology Inc. DS41614A-page 39 ...

Page 40

... F1 LV Evaluation Platform Schematic ( DS41614A-page 40 2011 Microchip Technology Inc. ...

Page 41

... F1 LV Evaluation Platform Schematic ( 2011 Microchip Technology Inc. DS41614A-page 41 ...

Page 42

... NOTES: DS41614A-page 42 2011 Microchip Technology Inc. ...

Page 43

... F1 LV Evaluation Platform Demo Board ... 11 Powering with PICkit 3 ... 16 JP2... 16 PICkit ICSP connector ... 16 Voltage... 16 Programming and debugging... 12 R Reading, Recommended ... 7 Readme... 7 REAL ICE In-circuit Emulator ... 21 S Supply Voltage ... 16 U User Interface... 20 W Warranty Registration ... 7 WWW Address... 8 X XLP Low Power... 11 DS41614A-page 43 ...

Page 44

... Fax: 86-29-8833-7256 Mississauga, Ontario, Canada China - Xiamen Tel: 905-673-0699 Tel: 86-592-2388138 Fax: 905-673-6509 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 DS41614A-page 44 ASIA/PACIFIC EUROPE India - Bangalore Austria - Wels Tel: 91-80-3090-4444 Tel: 43-7242-2244-39 Fax: 91-80-3090-4123 Fax: 43-7242-2244-393 Denmark - Copenhagen India - New Delhi ...

Comments to this Datasheet