View previous topic :: View next topic |
Author |
Message |
MCUprogrammer
Joined: 08 Sep 2020 Posts: 221
|
ADC |
Posted: Tue Dec 14, 2021 3:52 am |
|
|
Hi
I'm doing research on something. Is this possible or not?
Many PIC processors have ADC capability. Well, I know that ADCs are used as inputs in PIC processors. So can it be used as output? and How to use.
So to summarize:
Can it output the analog signal applied to its input as analog output? So let's say the voltage I read is 2 volts. I want to see it as 2 volts from the ADC output. So, it will read as 1 pin ADC input. 1 pin should enable me to transfer the ADC voltage read at the input to the ADC output. Can I do something like this? _________________ Best Regards...
MCUprogrammer
_______________________________
Work Hard |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Tue Dec 14, 2021 4:10 am |
|
|
ADC, means Analog to Digital Converter. One way. Analog signal to digital.
The component that does the opposite is a DAC (Digital to Analog Converter).
An ADC, can never be an output. The 'to' gives the direction it works. |
|
|
MCUprogrammer
Joined: 08 Sep 2020 Posts: 221
|
|
Posted: Tue Dec 14, 2021 4:17 am |
|
|
that doesn't work for me either. As a result, DACs can be 5bit or 8bit as far as I can see. This means that I will input the voltage I read into the Digital pins. From there I will exit Analogue. This is very tedious. Because I need a lot of pins like this.
thank you for the information. _________________ Best Regards...
MCUprogrammer
_______________________________
Work Hard |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Tue Dec 14, 2021 6:13 am |
|
|
You just take the ADC result, and shift it right to give the number of bits
supported by the DAC.
Problem is that accurate DAC's require a lot of resistors. Hence the standard
ones only support relatively low accuracies.
How fast does your signal need to change?.
If only slowly, then remember that you can develop a DAC output, using a
PWM, and an output filter (resistor/capacitor). This can potentially give
ten bit 'resolution' DAC outputs. However remember the difference between
resolution, and accuracy. It'll only be as 'accurate' as the voltage being used
to feed the PWM source, less also the errors introduced by the switching
elements in the PIC output stages.
I have used PWM's like this feeding opto coupled MOSFET's and actually been
able to generate signals with a genuine 10bit accuracy. From a single pin. However a lot of careful circuitry involved.... |
|
|
|