MCP3421DM-WS Microchip Technology, MCP3421DM-WS Datasheet - Page 13

no-image

MCP3421DM-WS

Manufacturer Part Number
MCP3421DM-WS
Description
Data Conversion IC Development Tools WT SCALE DEMO BRD 18 I/O 10-BIT ADC
Manufacturer
Microchip Technology
Type
ADCr
Datasheet

Specifications of MCP3421DM-WS

Product
Demonstration Boards
Tool Is For Evaluation Of
MCP3421
Interface Type
I2C
Operating Supply Voltage
5 V
2.1
2.2
 2010 Microchip Technology Inc.
MCP3421 CONFIGURATION BIT SETTINGS AND DATA ACQUISITION
USB COMMUNICATION
Chapter 2. Installation and Operation
The communication with the ADC is done through I
MCU is not being used. Instead, two pins (RA4, RA5) are being controlled from the firm-
ware.
The MCU is changing the setup of the ADC each time S3 is pressed, to change the
PGA gain: 8x for PGA, 2x for GLo and 1x for GHi. The ADC always operates in 18-bit
mode.
The data received from the MCP3421 device is scaled to a value expressed in grams
by the compute() function, in order to be displayed on the LCD.
There are two calibration steps: offset subtraction and gain scaling. The two values, the
offset and the gain constants, are stored in EEPROM during the calibration, and read
out at Reset, or when the S3 is pressed.
The Microchip USB Firmware Framework is a software library developed by Microchip
Technology Inc., that can be used to create new USB applications. It can be
considered as a reference design project, containing the necessary firmware code for
USB operation, also providing a placeholder for user’s code. The whole code project
is contained within one single root project directory, with many subdirectories for
source code organization.
Microchip provides a general purpose Windows
dows applications, to interface with a custom class USB device. The driver will not be
used in all USB applications, one of the exceptions being the USB HID class devices,
which would normally use built-in HID class drivers distributed with the OS.
For USB applications that do not easily fit within the constraints of these other device
class options, Microchip’s general purpose driver may be used. Windows applications
can access the USB devices either by directly interfacing with the driver
(mchpusb.sys), or indirectly use the driver through a pre-compiled library.
A custom class Windows application using the Microchip general purpose USB driver
may interface directly with the driver (mchpusb.sys). By doing so, it requires more
effort and more learning time than using a pre-compiled library that exposes a simple
to use API, including basic functions like open(), read(), write() and close().
The MPUSBAPI.DLL file is a library which provides a number of functions, including the
basic ones needed for reading and writing to an USB device. A list of the functions
available and the calling conventions for those functions is currently documented in the
form of in-line comments in the source code for the DLL file. The DLL is compiled using
Borland
in the <System Driver>:\MCHPFSUSB\Pc\Mpusbapi\Dll\Borland_C\Source directory.
®
C++ Builder™ 6 development environment, and the source code is provided
DEMO BOARD USER’S GUIDE
MCP3421 WEIGHT SCALE
®
driver which can be used with Win-
2
C, but the I
2
C peripheral port of the
DS51918A-page 13

Related parts for MCP3421DM-WS