We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello everybody giving a helping hand,
got me some trouble here. I was making a program that reads out the duty cycle of an ADXL202 sensor. Everything works, except the part were i want to print my data in a file using this :
FILE *stream, *fopen(); if ( (stream = fopen(...)) != NULL) fscanf(stream,''%s'', string);
Ok this is were my problems start. The compiler gives me the error that he doesn't know this type FILE ore the function fopen (). This seems to be logical to me since i looked in my stdio.h header and found nothing really according to that declaration. Is there a posibility that this is stored in another source file or does not exist??? Or .... how do i get my data's in a *.txt file ???
Thanks for the help i'm about to receive :))
P.S: Im using a 80C535 µC, sorry for not mantuening
I think you missed my point. I wasn't talking about getting files into Excel.
To be more explicit:
Have he checked if the M$ ODBC text driver can work directly on a text file, while the Hyperterminal is capturing data, i.e. can Excel do on-the-fly graphing while the data is still being being received?
In that case, it wouldn't matter that the data is being stored somewhere - Excel do need the data somewhere to be able to graph it.
"I think you missed my point."
Some of it, yes!
"if the M$ ODBC text driver can work directly on a text file, while the Hyperterminal is capturing data"
But this is still not serial data direct into Excel, is it? This still requires running Hypoterminal and setting it up to capture the data - the OP doesn't want to do that.
I think Dan's suggestion of the "Serial Wedge" is probably the best - whether this is a physical Wedge that goes in the keyboard line (but might be too slow?) or a "Virtual" wedge that works straight from the COM port...
Or perhaps the M$ ODBC text driver can handle the COM port as a "file"...?
Some HyperTerminal-like programs support DDE client/server operations. For example, I use Procomm Plus instead of HyperTerminal. Procomm Plus can be programmed as a DDE client to initiate a link to Excel and enter received data directly into Excel cells and send Excel commands.
I don't think the OP has a problem with running the HyperTerminal to capture the data. The main problem seems to be having the data getting stuck in a file and then needing a lot of manual - and repeated - work to get it further.
I was thinking that it might be possible to run a capture in Hyperterminal (or just piping the data from the com port to a file) and then have Excel do a new read of the ODBC source whenever the user wants to see a current graph.
"I don't think the OP has a problem with running the HyperTerminal to capture the data."
HyperTerminal can only capture to a file, not enter the data directly into a spreadsheet. What I am adding to the list of his options are different terminal programs (e.g., Procomm) that have DDE or OLE facilities to enter data directly into spreadsheet cells as the data arrives without manual intervention or extra manual steps.
Sounds real interesting and helpfull your idea. Thanks for that, but do you know if there's a posibility to get a free version of that Procomm Plus software ?? Because, you know, i'm a little bit thight :)
Mercy
The older DOS version are available as shareware, but not Procomm Plus to my knowledge.
Is Procomm Plus still available?
Even if it is, it's not supported.
See: www.8052.com/.../read.phtml
"The older DOS version are available as shareware"
But they won't do DDE or other such Windows stuff...
"Is Procomm Plus still available?"
Yes, it's still a boxed product. Despite its lack of support, for many clients it is still the preferred product of its type because of the features and scripting language.
"... DDE or other such Windows stuff ..."
Heavens, no -- the shareware left off all the way back at V2.4.3 or thereabouts.
Hey Guys thanks for the advices but i made myself a little program in the macros of the Excel, with that you have directly acces to the serial port. Then give the parameters to a function .... real easy .... found it in the internet ... Thanks again
Andy