
Originally Posted by
skimask
1st problem - A/D inputs on a PIC don't work with negative voltages. See Post #4.
I do not use negative voltage. It varies from 0v to 5v. Sine waves' center
or offset voltage is 2,5 volts above 0v.
Do you mean you want to output, on A.1, a serial output representation of the analog input on A.0?
I want to use A.1 as output and monitor it on the scobe. It consists of getting the sampled 10 bit values gathered from A.0 and transmitting out
from A.1 bit by bit.(Serially). That is what I mean serially.
That's good because I don't see anything in your program that says to change the output on PortA.1 other than it's initial setup.
Why is that so? As far as I know TRISA.1=0 configures that pin as output and not sets it to high from its initial value. So I do not see any problem there.
And again, I don't see any serial output commands.
Is it compulsory to use serial commands? Can't I monitor values on the scobe
without the commands.
And again, how do you plan to see this output? Serial output? LCD? There aren't any in the program.
It is labeled with ADC_BIT_RECEIVING. I am planning to see that on the scobe. I think I could monitor that because after all there must be 0's too and not only 1's.
You're kidding me right? Section 21 of the 18F2455 has no information in it that you can use?
What section do you mean exactly? The section on the forum. I will be glad
if there is some information concerning my question.
You've got a working ADC, what you need to do is to get it to work FOR you. I think what you need to do is play around with the PIC and PBP first. Get an LCD working, get a pushbutton or something working with it...then, hook up a POT across an A/D input pin, then display the value of the POT, doesn't have to be resistance, doesn't have to be voltage, doesn't have to be anything in particular, just display a number that corresponds with the position of the POT as you turn it. Then when you get that working, you can easily work on reading a sine wave.
Ok. I will try LCD and POT.
And besides, even though the A/D on a '2455 is rated for 100ksps and the PIC can run at 48Mhz, you won't be able to get any useful DSP out it. Not enough horsepower under the hood.
Bookmarks