PDA

View Full Version : Project-Read voltage in / different voltage out



andydoc
- 26th July 2005, 13:00
I have a project in mind that will be a good beginner project.

The goal is to read in a voltage through a 8bit A/D, have the PIC take the voltage and look up a table in memory. This table will have the 'in' voltage value, and a corresponding 'out' value. Find the value, and select the value corresponding to the first. Then, output the voltage value (PWM?)

I need some help/pointers as to a beginning for the PIC selection and coding.

Acetronics2
- 26th July 2005, 17:49
Hi,

You want to create the non-linear digital amplifier ???

which "transfer function" are you looking for ???

Alain

mister_e
- 26th July 2005, 18:38
For a nasty 8 bit resolution ... yuk!!!!


adcin 0, B0
Read B0
HPWM 1,b0,Frequency

or use the internal ressource to have a 10 bit resolution of your PWM.

everything will be done by your lookup table in the EEPROM.

Look for DATA & READ

NavMicroSystems
- 26th July 2005, 20:08
In general Steve's code example should work,
but it will require some filtering and smoothing at the PWM Output.
And with variable load you may want to have some feedback of the Output Voltage to be able to compensate for changes in Load.

And last but not least:
Plan some time for experimenting to find proper Values for your lookup table.

If you could give us some more details we can probably come up with better solutions.

andydoc
- 27th July 2005, 01:43
Thanks for the quick input...and really appreciate the advice. I am so new to this, I am not sure what is the best route to take...but I do know not taking some route won't get me anywhere! :) I am open to any ideas, like more resolution to the A/D or an external EEPROM if needed. Like I said, I am in the pre-school class of learning the world of PIcs.

Take a look at the attached txt file (might be easier to convert it to excel) and see the data I am trying to translate.

andydoc
- 7th August 2005, 21:12
Could anyone give me some pointers or examples as how to do a look table in Picbasic?

mister_e
- 8th August 2005, 16:20
the easy way is to store them in internal EEPROM and read them after...

Look in your manual for DATA and READ

option 2 : use a variable array... explain in the begining of your manual.