Mbed to Microchip MCP48x2 interface

This project interfaces the Mbed to a MCP48x2 DAC through a SPI interface.

MCP48x2 OPERATION The MCP48x2 has two DACs and accepts a 16 bit Write Command. The Write Command controls control and data latches of both DACs. This command is composed of 4 Configuration bits and 12 data bits. Data is clocked in on the rising edge of the SCK. The CS must be held low until all data has been transferred. MCP48x2 devices utilize a double buffered latch struture to synchronize output from DACa and DACb using LDAC pin. If the LDAC is tied to Vss, then the DAC ouputs are updated immediately.

WRITE COMMAND REGISTER BITS bit 15 `A/B 1 = write to DACb 0 = " " DACa bit 14 don't care bit 13 GA 1 = 1x Vout=Vref*4096 0 = 2x Vout=2*Vref*4096 bit 12 SHDN 1 = active mode, Vout is available 0 = shutdown, analog output is not available at Vout bit 11 - 0 data bits MCP4822 12 bits MCP4812 10bits MCP4802 8bits data is right justifed

CONNECT MBED TO MCP4812 DAC Smart Mbed is used as the development platform.


Please log in to post comments.