Colect data from rs232


Closed Thread
Results 1 to 13 of 13
  1. #1

    Default Colect data from rs232

    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
    .

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    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

  3. #3


    Did you find this post helpful? Yes | No

    Default

    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

    .

  4. #4


    Did you find this post helpful? Yes | No

    Default

    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.

    .

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ruijc View Post
    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?

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Code:
    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!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7


    Did you find this post helpful? Yes | No

    Default

    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 )

    .
    Last edited by ruijc; - 2nd January 2008 at 23:49.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    euh.. it's decimal 13 not hexa 13, and it's usual to add a LineFeed , decimal 10.

    So try
    Code:
    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.
    Last edited by mister_e; - 3rd January 2008 at 00:24.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    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

  10. #10
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    euh yeah... mixed few things here. if there, it won't screw things.. it's just not needed
    Last edited by mister_e; - 3rd January 2008 at 08:29.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  11. #11


    Did you find this post helpful? Yes | No

    Default

    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.

    .

  12. #12


    Did you find this post helpful? Yes | No

    Default

    Hi all,

    it works as it should

    You guys are the best

    Thanks

  13. #13
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts