
Originally Posted by
Ioannis
Since the DAC will get data from the controller, you have to use the SHIFTOUT command not SHIFTIN.
Then you have to control before the command, the LD,CS lines to prepare the DAC for communication.
Then use the SHIFTOUT command to send the data to the DAC.
The command needs to have the DataPin (SDI), ClockPin (CLK) and Mode defined. So choose your PIC pins and Mode as MSBFIRST (mode No 1) according to the DAC specs.
e.g. for Data on port A pin 0, and Clock on Port A, pin1 you have to use:
SHIFTOUT PORTA.0, PORTA.1,1,WORD_VAR\12
\12 indicates that you will sen only the left most 12 bits of WORD_VAR.
Ioannis
Bookmarks