+ Reply to Thread
Results 1 to 2 of 2

Thread: PIC18F4550 via SPI to a Quad DAC - some guidance

  1. #1
    lachick Newbie
    Join Date
    Jun 2009
    Posts
    3

    Unhappy PIC18F4550 via SPI to a Quad DAC - some guidance

    Hi

    I was hopeing someone might have some sample code (in C) to help me with the set up of the SPI bus on the PIC18F4550 (or similar) to set 12 bit values in steps of 1/3 or 1/2 on an Analog AD5324 Quad DAC.

    I am trying to show that I can simply talk with DAC initially then will be adding additional devices on the SPI.

    I guess what I am not getting - forgive me for being so new - is once the PIC is configured for SPI mode is the data simply transfered to the DACs via the shift register (SSPSR) and the buffer register (SSPBUF)? I understand the setting of the top two bits in the shift register to designate which of the 4 buffers on the DAC I am writing to but I guess I'm timid on the actual implementation of it all... and when I add an additional device on the SPI how do I know what I am writing to the AD5324 or the AD7888 since I do not specify an address or anything?

    Thank you in advance.


  2. #2
    Wp100 Good Wp100 Good Wp100 Good
    Join Date
    Feb 2009
    Location
    England
    Posts
    262

    Default

    Hi,

    With SPI it is the /SS or /chip select signal from the master that controls which device is to be active.

    In your case it should work on the /Sync Pin of the AD5324.

    The AD5324 only receives data, it does not return data, as demanded by the Microchip SPI protocol, so to get it to work you need to fit a 2K2 resistor across the pic ports SDI and SDO, so it can get a return signal this way.

    Am only into assember so cannot help with the code.

+ Reply to Thread

Similar Threads

  1. looking for a quad op-amp chip
    By AXmichigan in forum Datasheet/Parts Requests
    Replies: 13
    Latest: 21st June 2009, 10:02 AM
  2. quad op amp
    By NickLee in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 13th April 2009, 11:47 PM
  3. quad comparator
    By Spikeneeds2no in forum General Electronics Chat
    Replies: 1
    Latest: 29th November 2008, 03:25 AM
  4. TL084 quad op-amp help
    By coolrfid in forum Datasheet/Parts Requests
    Replies: 12
    Latest: 10th May 2008, 09:10 PM
  5. Quad 404!!!
    By chiriac_marius in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 9th October 2004, 07:16 AM

Tags for this Thread