ShiftIN to read DAC7611


Closed Thread
Results 1 to 4 of 4
  1. #1

    Default ShiftIN to read DAC7611

    Hi all,

    I have an excisting hardware which is using a DAC7611 digital to analog converter
    I would like to read the LD,SDI,CS/,CLK with a 16F876 and get the DAC 12bit value in a variable.

    Looking to the datasheet it is not clear to me how to use the shift-in command

    on the original hardware the following pin's of the DAC7611 are wired:

    Pin1: VDD
    Pin2: CS/
    Pin3: CLK
    Pin4: SDI
    Pin5: LD
    Pin6: CLR/ wired to VDD
    Pin7: Gnd
    Pin8: Vout

    The datasheet can be found here: http://www.datasheetcatalog.org/data...wn/mXrrtqx.pdf

    Anyone who can point me in a good direction ?

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,806


    Did you find this post helpful? Yes | No

    Default Re: ShiftIN to read DAC7611

    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

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: ShiftIN to read DAC7611

    Quote Originally Posted by Ioannis View Post
    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
    Hi Ioannis,

    Thanks for your reply, maybe I expressed myself bad.

    The excisting circuit is talking to the DAC7611, and i would like to get the information/value send to the DAC, with a small MCU

    So should be Shift-in but timing etc is not clear to me

    Thanks
    inadvance

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,806


    Did you find this post helpful? Yes | No

    Default Re: ShiftIN to read DAC7611

    Oh,I see.

    Well, you still have to monitor the LD, CS lines when they become active and then start the SHIFTIN command to collect the data.

    Ioannis

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts