Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing The TLC5615 DAC — Parallax Forums

Interfacing The TLC5615 DAC

blueiceblueice Posts: 12
edited 2005-02-03 05:38 in BASIC Stamp
hello..
Im interfacing TI's TLC5615 DAC to the BS2 .Its a 10 bit DAC ..

According to the datasheet i have to clock in 10 bits plus two dummy bits .That makes 12 bits

So my SHIFTOUT command is as follows

SHIFTOUT dac_DIN,dac_SCLK,1,[noparse][[/noparse]i/12]

where
dac_DIN...input data line
dac_SCLK..clock line
1...MSB first
i ...my dac data ranging from 1 to 1023

My reference is at 2 volts

My qusetion is..
How do i append the 2 dummy bits to my DAC data?

See page 8 and 9 of the TLC5615 datasheet
http://www-s.ti.com/sc/ds/tlc5615.pdf

Thanks in advance


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
**·ice**

Gerard Sequeira
Machinegrid.com·:: Robots at Work!!
Parallel Port Tutorials,
Autonomous Robots,
PIC16F84a Temperature Controller
·

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-02-02 14:20
    Based on the TLC5616 docs, I think your SHIFTOUT stream should look like this:

    SHIFTOUT Dpin, Cpin, MSBFIRST, [noparse][[/noparse]%1111\4, dacVal\10, %00\2]
    


    This stream sends four dummy bits (1s), the DAC value, the pads with two zeros.· Note that the bits parameter uses the back-slash ( \ ) and not the division ( / ) operator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA


    Post Edited (Jon Williams) : 2/2/2005 2:23:32 PM GMT
  • blueiceblueice Posts: 12
    edited 2005-02-03 05:38
    Jon..Thanks a lot..
    That worked like a dream...
    No problems at all....




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    **·ice**

    Gerard Sequeira
    Machinegrid.com·:: Robots at Work!!
    Parallel Port Tutorials,
    Autonomous Robots,
    PIC16F84a Temperature Controller
    ·
Sign In or Register to comment.