• AVR Freaks

Hot!MCP4922 Outputting 2.5-5V Range Instead of 0-5V

Author
grinchy95
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2019/04/02 21:15:41
  • Location: 0
  • Status: offline
2020/08/14 12:48:01 (permalink)
0

MCP4922 Outputting 2.5-5V Range Instead of 0-5V

Hi, I am working on a project using the MCP4922 with the dsPIC33EV256GM102 SPI interface. Everything seems to be working properly, and I get the full range of resolution, except that the DAC is outputting voltage in a range from 2.5V-5V rather than 0V-5V. This is pretty weird as I've used the MCP4922 in past projects and never seen this behavior. Any idea what might be causing this? 
 
I see my SPI data coming through correctly on my scope, and have wired up the chip as described in the datasheet. Any idea what might be causing this?
 
Here is my SPI DAC write code:
    spiOut = 0B01110000 << 8; //channel a, input buffered, gain x1, output mode active
    spiOut |= val; //0-4095
    
    LATBbits.LATB5 = 0;
    SPI1_Exchange16bit(spiOut);
    LATBbits.LATB5 = 1;

 
See attached a schematic of the MCP4922 connections (disregard Ard_Uno marking, all connections go directly to the relevant dsPIC33EV256GM102 GPIO pin):
 
 

Attached Image(s)

#1

0 Replies Related Threads

    Jump to:
    © 2020 APG vNext Commercial Version 4.5