hi :
how i can make pic work as d/a converter
thanks
hi :
how i can make pic work as d/a converter
thanks
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
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
thanks
but i want to convert digital signal to analouge using pic
matelda
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.
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
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks