Hi,
Never used it and don't have access to one to try with.
BUT the datasheet says that all write operations are 16 bits, 4 configuration bits followed by 12 databits where the 2 least significant bits doesn't matter for the 10-bit MCP4911. You're only sending 12 bits.
You're using MODE 0, which accordning to the manual shifts data out LSB first while the MCP4911 expects MSB first. Doesn't really matter as long as you remember to put the bits in the correct order before sending them. SHIFTOUT does 8 bits by default, if you want anything else (up to 32) you need to specify that.
Also, make sure you don't have any analog functions (comparator, ADC) mutliplexed onto the pins you're using. They are usually, but not always, turned on by default - always double check if you haven't already.
I'd probably try:
Code:
LOW CS
SHIFTOUT SDI, CLK, 1, [%0011010101010100\16]
HIGH CS
LOW LDAC
PAUSEUS 100
HIGH LDAC
/Henrik.
Bookmarks