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.
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.