PDA

View Full Version : Colect data from rs232



ruijc
- 2nd January 2008, 16:58
Hi all,

This may not be the right place for this thread but...

I have build a small circuit with a 8pin pic that colects data ( into it's internal eeprom ) from a temp sensor and i need to dump it all in my pc via serial port.

I sucessfuly dumped all data in a txt file but its just a big mess.

I would like to dump it all directly to an excel sheet. From there i could read easly the data and build graphs.

Does anyone has something like this ?

I'm trying to avoid comercial programs...

thanks
.

Dave
- 2nd January 2008, 17:24
ruijc, All you need to do is dump the readings in a comma delimited form (commas in between each reading) with a carrage return at the end of the line. That will fill 1 row of your excel spread sheet. I use this method all of the time. Then just inport it into excel with the comma delimited qualifier and bingo, your all done....

Dave Purola,
N8NTA

ruijc
- 2nd January 2008, 17:36
Hi Dave,

That's one way to do it...
and easy too :)
thanks

I've been looking all over the net but coudnt find anything.

I did find an interesting excel sheet with graph already build.
It's called RS232 Scope V1.02 but it doesnt work with windows XP :(

.

ruijc
- 2nd January 2008, 20:24
Hi Dave,

i tested your method and it works :)

the only problem is that, since it will fill in one row i get limited imported readings.:(

Excel's rows are limited.

If there was a way to import directly into collumns i could get virtually unlimited reading in.

.

skimask
- 2nd January 2008, 20:33
Hi Dave,
i tested your method and it works :)
the only problem is that, since it will fill in one row i get limited imported readings.:(
Excel's rows are limited.
If there was a way to import directly into collumns i could get virtually unlimited reading in.
.

Carriage return after every data reading instead of a comma?

mister_e
- 2nd January 2008, 20:39
nah it works... depending how you send your data.

look how a excel table is made, Line/Column right?

paste this one in notepad, then import it in excel


COLUMN1 COLUMN2 COLUMN3 COLUMN4
0X00 0X01 0X02 0X03
0X10 0X11 0X12 0X13
0X20 0X21 0X22 0X23
0X30 0X31 0X32 0X33

Here i used space, you can use space, comma, semicolon

Now it should give you some light!

ruijc
- 2nd January 2008, 23:43
OK guys,

i know now were i missed.
You have to give me credit...this is not my native language ;)

"Carriage return after every data reading instead of a comma"

So... if have something like :

debug ",",#va ( using comma to separate each value )

i should have:

debug #va, $13 ( being 13 hexa code for carriage ) ?
EDIT: 13 for ascii and 0D for hexa.

But what i get is this :

777777777777
( between each 7 i get a square simbol )

.

mister_e
- 3rd January 2008, 00:14
euh.. it's decimal 13 not hexa 13, and it's usual to add a LineFeed , decimal 10.

So try

DEBUG DEC VA,",",13,10

and you should be in business.

Try this using MicroCode Studio Serial Communicator. From there you can also save the Received window as a TXT file.

If you did your own VB code, and place your text in a textbox, you have to enable it's multi-line poprietie... unless it might screw things.

Ioannis
- 3rd January 2008, 08:16
As Steve noted, your data should be in ASCII format. So if your variable contains zero, you should send the ASCII zero, that is 48 decimal or 30 hex.

That is what the DEC is doing in the Steve's example.

Hope it is clear now.

And I think the extra comma is not needed before CR.

Ioannis

mister_e
- 3rd January 2008, 08:26
:o euh yeah... mixed few things here. if there, it won't screw things.. it's just not needed

ruijc
- 3rd January 2008, 09:03
Thanks alot guys,

i did some experiments yesterday and i used the method:

DEBUG DEC VA,13 with no result... i needed the extra 10 there at the end

Steve, will try the :

DEBUG DEC VA,13,10

that you mentioned and give some feedback later.

PS.: I'm currently using the RS232 Data Logger from Eltima ( which is freeware ) to colect the data and save to a txt file.

.

ruijc
- 3rd January 2008, 20:27
Hi all,

it works as it should :)

You guys are the best ;)

Thanks

mister_e
- 3rd January 2008, 21:10
http://www.mister-e.org/Pics/woohoo