View previous topic :: View next topic |
Author |
Message |
Prashant Patel
Joined: 19 Jul 2004 Posts: 33
|
DAC TC1320 |
Posted: Wed Nov 03, 2004 9:01 pm |
|
|
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
|
|
Posted: Wed Nov 03, 2004 10:34 pm |
|
|
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
|
DAC TC1320 |
Posted: Thu Nov 04, 2004 2:15 pm |
|
|
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
|
|
Posted: Thu Nov 04, 2004 2:32 pm |
|
|
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
|
DAC TC1320 |
Posted: Thu Nov 04, 2004 2:50 pm |
|
|
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
|
|
Posted: Thu Nov 04, 2004 3:05 pm |
|
|
Take a look at the I2C examples. Should be very similar to writing to an eeprom. |
|
|
|