Pic18f97j60 interfaced with ad5781

Status
Not open for further replies.

tommy92

Newbie level 4
Joined
Feb 8, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,319
I am using PIC 18 series(8 BIT) micro controller in my project. We are interfacing this microcontroller with DAC-AD5781(18 BIT). I don't know how to write the coding for this (in C language). Can you please help me
with coding.

Protocol: SPI
DAC output: 0V to 10V
 

Simply look at the datasheet. The PIC has an SPI interface, as has the AD5781. The AD5781 wants 24 bits of data so simply send it as three bytes from the PIC. Don't use framed mode on the PIC - you need to keep the SYNC signal low until you have sent all three bytes so control it with an I/O pin driven by software.

Keith.
 

I tried in the same manner what you said.I had separated 18 BIT's of data in to 2Byte + 2 BIT data ,I am having doubt that how to convert that 2 BIT data to 8 BIT data .Is there is any appending formulae or procedures for particular PIC 18 series.Can you please help me with coding or tutorial web links like that??
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…