4 DAC channels from a single PIC


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697

    Default 4 DAC channels from a single PIC

    Hi, I'm working on a project that requires 4 audio outputs from DACs but I can't find any suitable.

    DAC requirements:-
    8-bit minimum resolution
    16-bits of data per channel max. My PIC only has an 8-byte SPI buffer
    3.3V
    Each channel must be aligned to an 8-bit boundary

    My main concern is the amount of clock cycles the PIC can use communicating with the DACs. Ideally I would like to queue all of the data into the PIC's SPI buffer and exit the interrupt routine.
    I can pulse the latch pin at the start of the next interrupt but all of the DACs I've seen require the CS line to be toggled between each message. Even a single DAC with 4 channels requires CS to be toggled 4 times.
    I don't have enough clock cycles to wait in the interrupt while the data is sent or to keep jumping in and out of interrupts between each byte.

    Does anyone know of a 4 channel DAC that will allow me to simply shift 4 bytes into it? Failing that, I would be happy with 4 x single channel DACs that can be daisy chained so they don't require individual CS control.

    I've also considered a hardware solution. Is there such thing as an SPI splitter that would allow me to shift 4 bytes into it and have each byte shifted out of 4 separate data lines?

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default Re: 4 DAC channels from a single PIC

    Not sure if this is helpful, but,....

    What if you daisy chain 4 HC595 or similar serial - parallel shifters? Each 595 in turn could drive a R-2R ladder or simply jam its 8 bits into a parallel loaded single DAC.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: 4 DAC channels from a single PIC

    Out of curiosity, which PIC has an 8-byte SPI buffer?

    /Henrik.

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default Re: 4 DAC channels from a single PIC

    Jerson: That's a good idea. As long as I can somehow clock the data into the shift register then toggle a line to load the current state into the DAC then that should work perfectly (I will do some reading on this). I can get hold of parallel DACs easier too! Thanks

    Henrik: I work with PIC24FJ64GA002/PIC24FJ64GA004 chips. It's possible to fire 9 bytes at the SPI module in one go. The first byte moves straight to the shift register leaving all 8 slots in the FIFO available.

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,516


    Did you find this post helpful? Yes | No

    Default Re: 4 DAC channels from a single PIC

    Ah, that's what I suspected, not an 8-bit PIC. To bad, that could be useful with PBP.
    Thanks!
    /Henrik.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: 4 DAC channels from a single PIC

    Quote Originally Posted by HenrikOlsson View Post
    To bad, that could be useful with PBP
    One day dream might come true...

    Ioannis

Similar Threads

  1. Single PIC to Blink 5 LEDs Independently?
    By RossWaddell in forum mel PIC BASIC Pro
    Replies: 68
    Last Post: - 18th July 2015, 17:56
  2. Replies: 76
    Last Post: - 11th November 2014, 06:46
  3. Trade - Swap other PIC/s for single 18F2550
    By mr.sneezy in forum Adverts
    Replies: 2
    Last Post: - 25th February 2009, 08:44
  4. Single PIC As Both, Wireless Transmitter and Receiver
    By charlieb83 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2007, 05:35
  5. Bluetooth wireless with PIC / HSERIN / DAC
    By rpatel in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th December 2004, 23:13

Members who have read this thread : 1

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