User manual
MCP3421 Weight Scale Demo Board User’s Guide
DS51918A-page 14 2010 Microchip Technology Inc.
A load time linking and a run time linking example, showing how to use the DLL, are
included in the System Driver:\MCHPFSUSB\Pc\Mpusbapi\Example Applications
directory.
The MCP3421 Weight Scale Demo Board firmware is mainly based on the USB stack
example: “Device – MCHPUSB – Generic Driver Demo”. Most of the firmware changes
of the MPLAB MCP3421 Weight Scale Demo Board project are done in the user v7
eeprom.c file. This project is downloadable from Microchip’s MCP3421 product page
web site: http://www.microchip.com/wwwproducts/Devices.aspx?dDoc-
Name=en520011.
The input offset error voltage is computed when S4 is being pressed. The gain constant
is computed by the PC software and transmitted to the MCU via USB on the OUT-
Packet._byte[2] to OUTPacket._byte[7].
The weight scale is sending to the PC software the following values: weight, ADC code,
ADC output, zero calibration and gain calibration, represented by six characters using
INPacket._byte[0] to INPacket._byte[31].
Note: For running this project, the USB Microchip Stack must be installed on the
user’s machine.