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

DAC TC1320

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



Joined: 19 Jul 2004
Posts: 33

View user's profile Send private message

DAC TC1320
PostPosted: Wed Nov 03, 2004 9:01 pm     Reply with quote

Hi...

We are using 16F877 with CCS PCM 3.202 Compiler and
TC1320 Digital To Analog converter.

Can anybody tell, How to send Analog value to the output
port?

We have connected SDA and SCL line to PIN_B5 and PIN_B4.
But don't know how to send the input data from analog
input port to DAC to convert it to Analog at last.

We don't know anything about this..please help...

Thanks in advanced...

Regards
Prashant
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Nov 03, 2004 10:34 pm     Reply with quote

Quote:
We don't know anything about this..please help...


Then you should read this
http://ww1.microchip.com/downloads/en/DeviceDoc/21386b.pdf

This device takes a digital signal (8bit) and converts it to an analog voltage. Sounds like a school project to me. What are you supposed to do with the device.
Prashant Patel



Joined: 19 Jul 2004
Posts: 33

View user's profile Send private message

DAC TC1320
PostPosted: Thu Nov 04, 2004 2:15 pm     Reply with quote

Thanks..

I have that Datasheet for TC1320. But I am new for this.
Can you please write a simple code for me and explain a bit?

Regards
Prashant
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Nov 04, 2004 2:32 pm     Reply with quote

Start out by slowly incrementing a byte and sending it out to the D/A chip. That should give you a simple sawtooth output and let you know you can control the D/A. Then learn to use the A/D, and finally put the pieces together.

Of course first I recommend mastering "Hello World" and blinking a LED, but I assume you have already done that.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Prashant Patel



Joined: 19 Jul 2004
Posts: 33

View user's profile Send private message

DAC TC1320
PostPosted: Thu Nov 04, 2004 2:50 pm     Reply with quote

Hi..

I have the little experience in programming PIC.
If the data could be sent parallelly then would be
easy. But it is serial connection. So I need your
guidence about How to send the data according to
Protocol mentioned it the datasheet.
i.e
Start, Send Address, Ack, Data Byte and then Stop.

I have connected PIN B5 to SCL and PIN B4 to SDA.

Can write sample code for me..? Because it seems
little confusing to me.
Is there any example related to serial DAC in the
CCS examples?

Please guide with code.

Regards
Prashant
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Nov 04, 2004 3:05 pm     Reply with quote

Take a look at the I2C examples. Should be very similar to writing to an eeprom.
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