CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Store ADC read value in a file???

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sonicdeejay



Joined: 20 Dec 2005
Posts: 112

View user's profile Send private message

Store ADC read value in a file???
PostPosted: Fri Mar 03, 2006 4:34 am     Reply with quote

Can I do that??

like using fprintf:"??


sonic
Smile
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 6:18 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 7:23 am     Reply with quote

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 ??


Smile
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 7:33 am     Reply with quote

Select "Transfer", then "Capture Text"
_________________
The difference between genius and stupidity is that genius has its limits...
Ttelmah
Guest







PostPosted: Fri Mar 03, 2006 7:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 8:03 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Mar 03, 2006 10:20 pm     Reply with quote

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.......
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group