CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

DAC80501 code support

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hemnath



Joined: 03 Oct 2012
Posts: 228
Location: chennai

View user's profile Send private message

DAC80501 code support
PostPosted: Fri Apr 05, 2024 11:16 am     Reply with quote

Hello,

I want to interface the PIC18F2520 with external 16 bit DAC (Example: DAC80501ZDQFR). Please can you support how to send data to the external DAC. Any code snippets to understand.

Internal Voltage reference: +2.5V

uC PIN SDO is connected to SDA
uC PIN SCK is connected to SCLK
uC PIN B1 is connected to SYNC/A0

Earlier I posted a topic for different DAC, but now would like to use this finally.

Thanks in advance.
dyeatman



Joined: 06 Sep 2003
Posts: 1912
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Apr 05, 2024 12:25 pm     Reply with quote

Are you going to keep changing DACs then asking us for help with each one?
If you got the other one going, the same basic code should work for this one with changes to the command byte.

Starting out:
Read the datasheet...the interface is very similar to the earlier DAC.

Next:
For SPI you must tie SPI2C Low
Power on device
Set SYNC High

Then:
If needed, set/change bits in 8 bit command byte (0x08 for DAC output)
set SYNC Low
Output 8 bit command byte
Output 8 bit MSB SPI data
Output 8 bit LSB SPI data
Set SYNC High
Rinse and repeat...
_________________
Google and Forum Search are some of your best tools!!!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group