| Electronic Components Datasheet Search |
|
DS41401A Datasheet(PDF) 21 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
DS41401A Datasheet(HTML) 21 Page - Microchip Technology |
|
21 / 42 page ![]() F1 EVALUATION PLATFORM USER’S GUIDE © 2009 Microchip Technology Inc. DS41401A-page 21 Chapter 5. Hardware Libraries and Drivers 5.1 INTRODUCTION All of the demo code uses a common set of libraries to provide I2C, real-time clock, MCP9800 and LCD services. These libraries may be useful for other applications so they are documented here. These drivers are located at www.microchip.com/F1Eval. 5.2 I2C™ DRIVER The I2C driver allows I2C requests to be queued and then handled either by interrupts or by polling. The driver is configured during compilation to support polling or interrupts. The I2C and LCD demos configure the driver for interrupt mode. The Combined demo polls the I2C handler within the MCP9800 driver. 5.3 MCP9800 DRIVER The MCP9800 driver uses the I2C driver to get the current temperature. The mcp9800_get_temp function is fully blocking, so once a request is queued, the driver polls the I2C subsystem until the data is complete. If the I2C driver is operating without interrupts, the mcp9800_get_temp function repeatedly calls the I2C_handler function to process all the I2C events. If the I2C driver is operating with interrupts, the mcp9800_get_temp function simply inserts an I2C_TRANSACTION_T into the I2C transaction queue and waits for the transaction to complete. 5.4 RTCC DRIVER A software RTCC is managed by the supplied RTCC driver. This driver implements the time() function required by the C compiler. Time is internally kept as seconds since January 1, 1970. Standard C functions can be used to convert the time to the current date. This driver has two modes. In the first mode, it expects to be called once per second by the Timer1 interrupt. In the second mode, it expects to be called on every LCD mode B frame. This allows the RTCC to keep accurate time even if Timer1 is being used by some other function, such as the BLDC motor driver. 5.5 LCD DRIVER The LCD driver contains the initialization code required for the LCD peripheral and the mapping code required to control the 3.5-digit LCD supplied with this demo board. It is a good starting point for the LCD driver your unique application will require. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |