View previous topic :: View next topic |
Author |
Message |
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
Store ADC read value in a file??? |
Posted: Fri Mar 03, 2006 4:34 am |
|
|
Can I do that??
like using fprintf:"??
sonic
|
|
|
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Fri Mar 03, 2006 6:18 am |
|
|
What do you mean? Which file system and where? _________________ The difference between genius and stupidity is that genius has its limits... |
|
|
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
|
Posted: Fri Mar 03, 2006 7:23 am |
|
|
for example...
In my Hyperterminal....
Code: | Input value is :188.9999
Input value is :190.9999
Input value is :190.9999
Input value is :192.9999
Input value is :182.9999
Input value is :187.9999
Input value is :193.9999
|
These are the input from ADC...
can I also store it in a file??
like c:\\temp\\adc.txt ??
|
|
|
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Fri Mar 03, 2006 7:33 am |
|
|
Select "Transfer", then "Capture Text" _________________ The difference between genius and stupidity is that genius has its limits... |
|
|
Ttelmah Guest
|
|
Posted: Fri Mar 03, 2006 7:37 am |
|
|
Well, Hyperterminal itself, has the ability to save all the incoming text to a text file. This would store what you see. Beyond this, more programming becomes necessary. If you send the data in CDF format (numbers seperated by commas), then Excel for example, can read such numbers and save them. Anything beyond this, then you would neen to write a program in your language of choice, to read the incoming serial, parse the numbers from this, and write them to a file.
Best Wishes |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Mar 03, 2006 8:03 am |
|
|
Bytes is bytes. The PIC doesn't care where they come from, where they go to, or what they mean.
BTW you seem to be displaying the A/D output as a float with a rounding problem. The A/D inherently produces an integer (or long) result. There is no need to invoke the terrible overhead of floating point numbers just to print the A/D counts. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
|
Posted: Fri Mar 03, 2006 10:20 pm |
|
|
rberek wrote: | Select "Transfer", then "Capture Text" |
This will be good enough...
Thx guys....
I will change input into "long" as my ADC is 10bit....... |
|
|
|