ADM00310 Microchip Technology, ADM00310 Datasheet - Page 15

no-image

ADM00310

Manufacturer Part Number
ADM00310
Description
BOARD EVAL FOR MCP3903 AFE
Manufacturer
Microchip Technology
Series
-r
Datasheets

Specifications of ADM00310

Design Resources
MCP3903 Eval Brd BOM MCP3903 Eval Brd Schematic
Main Purpose
Interface, Analog Front End (AFE)
Embedded
Yes, MCU, 16-Bit
Utilized Ic / Part
MCP3903, PIC24F, PIC24H, dsPIC33, MCP2200
Primary Attributes
-
Secondary Attributes
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
2.1
© 2011 Microchip Technology Inc.
DSPIC33 EXAMPLE DESCRIPTION
If the user needs to evaluate the ADC on a system that uses dsPIC33 microcontrollers,
then a PIM connector with a dsPIC33FJ256GA710A can be used on the evaluation
board.
Using this example, the user can modify all MCP3903 internal registers from the PC
software “MCP390x Data VIEW”. The UART communication speed is at 115.2 kbps.
2.1.1
To transfer data from the ADC to the MCU, the SPI communication is controlled by
DMA1. DMA1 channel is set up to use nul data write to read the MCP3903 register
correctly. The DMA1 reads 7 bytes, but the first byte is not used. Before a new DMA
read takes place, the CS pin must be controlled in the software and the MCU must wait
for a new external interrupt 3 that indicates a new acquisition.
After the DMA1 transfer is finished, the DMA buffer content is moved into the Vch0 and
Vch1 buffers. The loop is repeated until Vch0 and Vch1 are filled.
Timer 8 and Timer 9 are configured to work as a 32-bit timer. This timer starts when the
acquisition is started and stopped when data buffers are full. The value indicated by this
timer will be used to evaluate the sampling speed of the ADC on the PC interface.
After the buffers are filled with the samples, the internal registers of MCP3903 are read
also using DMA1, now configured to read 16 bytes. The state of the MCP3903 internal
registers will be stored into the MCU, since later they will be sent to the PC GUI.
To set the MCP3903 configuration registers, MCU must write on the SPI bus. For this
purpose, the DMA0 channel is used and is set to do a thirteen bytes transfer from MCU
to MCP3903.
2.1.2
To send the acquired samples from the MCU to the PC, the UART peripheral is used.
On the board, the user can use the RS232 DB9 connector to connect to a serial port
on PC side, or it can use the USB port that creates a virtual serial port on the PC, thanks
to the MCP2200 USB to TTL converter that is connected to the MCU.
The RX pins of the MAX2323 and the MCP2200 are tightened together with the TX pin
of the UART2 from the MCU. The user needs to select from jumperJ5 if the MCU
receives data from MCP2200 or MAX2323. In firmware, the MCU is using DMA2 to do
the transfer from MCU to the PC. To receive data from the PC through UART, the RX
interrupt is used.
Chapter 2. Code Example
SPI Communication
UART Communication
MCP3903 ADC EVALUATION BOARD
FOR 16-BIT MCUs USER’S GUIDE
DS51994A-page 11

Related parts for ADM00310