View Full Version : help D/A converter
matelda
- 7th September 2004, 16:19
hi :
how i can make pic work as d/a converter
thanks
Dwayne
- 7th September 2004, 16:48
Hello Matelda,
M>>how i can make pic work as d/a converter
thanks<<
1. Make *sure* your chip has a ADC on it. Some pics do not. Some have comparators instead of AD's on them.
2. Make *sure* you are using the pin that has the AD on it.
3. Make *sure* you set your flags correctly to use the ADC.
Here is some code for a 12F675
number var word
ANSEL=0
CMCON=%00000111
TRISIO=%00001010
' Define ADCIN parameters
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
Loop:
ADCIN 1, number 'Read value.
'Output your data to whatever device you want
'LCDout number
goto Loop
Dwayne
matelda
- 8th September 2004, 16:03
thanks
but i want to convert digital signal to analouge using pic
matelda
Melanie
- 8th September 2004, 16:41
See the thread "HPWM problem". Use the techique I posted there with a Resistor and Capacitor to give you your DC output.
See also the thread "0-10V Output Needed" for an example circuit which I posted which includes not only that Resistor and Capacitor, but also how to typically buffer your output with an Op-Amp.
Using the search facility on this forum can work wonders.
Dwayne
- 8th September 2004, 17:25
hello Matelda,
M>>thanks
but i want to convert digital signal to analouge using pic
matelda<<
Ooops!! I am sorry Matelda, My dyslexic eyes turn the AD/DA around... please forgive me.
Dwayne
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.