HyperTerminal Send Text File

Author
Natique
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2011/01/27 16:46:01
  • Location: 0
  • Status: offline
2011/05/01 14:48:39 (permalink)
0

HyperTerminal Send Text File

Hi,
I'm trying to send commands to a glucosemeter serially. When I connect it to my PC, I write the command in a hex editor and save the file as a .txt file. I then send the file using HyperTerminal's "Send Text File" option. This way it works just fine, the problem is I want to connect the glucosemeter to a PIC instead of the PC. To send the command, I'm using a simple lookup table that sends one byte at a time to the glucosemeter, but I don't get a response. Also, when I send the bytes one by one in the normal hyperterminal window, that doesn't work. So I'm wondering what's so special about saving it as a text file first? Any idea why that's the only way I can get it to work?

People have suggested that I should use a transmit buffer in the pic, do you think that would help?
I'm using assembly language, and P16F877A by the way. I'd really appreciate any ideas you can give me! And if anything I said didn't make sense, I'd be happy to clarify it.
#1

11 Replies Related Threads

    hexreader
    Super Member
    • Total Posts : 992
    • Reward points : 0
    • Joined: 2008/05/04 03:06:55
    • Location: England
    • Status: offline
    Re:HyperTerminal Send Text File 2011/05/01 15:11:34 (permalink)
    0
    Maybe Hyperterm sends Carriage Return (CR) and Line feed (LF) at the end of each line of text.
     
    When you type manually, you are probably only sending CR.
     
    My guess might be that your device perhaps depends on LF as a terminating character. 
     
    Only you know what you send from the PIC.
     
    This is my first thought. Don't know if it might help. 
      
    EDIT:  after reading your post a second time, I am unsure about the file you are sending.
    Is it "readable" ASCII characters?   (in which case why would you need a hex editor)
    Or is it binary?
     
    Could you post a small sample of a text file maybe?  Just to get a better understanding.
    post edited by hexreader - 2011/05/01 15:17:45
    #2
    Natique
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2011/01/27 16:46:01
    • Location: 0
    • Status: offline
    Re:HyperTerminal Send Text File 2011/05/01 15:41:51 (permalink)
    0
    Thanks for the fast reply!
    I used a serial port sniffing program and the hyperterminal doesn't seem to be sending anything beyond what's in the text file I wrote. The CR and LF would be detected by a sniffing program as two extra bytes right?

    I want to send this command: 0x02 0x06 0x08 0x03 0xc2 0x62
    When I save it in as a .hex file, it doesn't get sent right through the hyperterminal for some reason. So I save it as a .txt file. It's not really readable ASCII, but here's what it looks like in the file  Âb
    post edited by Natique - 2011/05/01 15:45:00
    #3
    hexreader
    Super Member
    • Total Posts : 992
    • Reward points : 0
    • Joined: 2008/05/04 03:06:55
    • Location: England
    • Status: offline
    Re:HyperTerminal Send Text File 2011/05/01 16:10:34 (permalink)
    0
    I am out of ideas right now.  Can't think what the critical difference might be.
     
    I do not see how a buffer in the PIC would help though. Unless your PIC is so busy doing other things, or your baud rate is so high, that it can't service transmit fast enough for back-to-back transmission.
     
    Sorry, but I don't have any better suggestions.
     
    I assume you don't have access to a logic analyser.....
     
    I also assume that you are connecting the PIC to a MAX232 driver, or similar.
     
     
     
    #4
    Natique
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2011/01/27 16:46:01
    • Location: 0
    • Status: offline
    Re:HyperTerminal Send Text File 2011/05/01 16:50:18 (permalink)
    0
    Yeah I can't blame you, I'm all out of ideas too. Well if anything comes to you, let me know :)

    I could get access to an oscilloscope, you think that would be more useful than the serial port sniffer?

    I couldn't see the point of a buffer either. My baud rate is the one specified in the datasheet, 9600. And at this point the code has been simplified so much the PIC has nothing to do but send the command. PIC connected using MAX232.. I'm nearly positive it's a software problem. 
    #5
    hexreader
    Super Member
    • Total Posts : 992
    • Reward points : 0
    • Joined: 2008/05/04 03:06:55
    • Location: England
    • Status: offline
    Re:HyperTerminal Send Text File 2011/05/01 17:08:20 (permalink)
    0
    A scope would be nice to verify that you really are sending an accurate 9600 baud from the PIC. It is not so good for checking detailed timing differences between the good and bad data streams.   .......unless that is, it is a modern DSO, which effectively IS a logic analyser.
     
    If your simplified code is not commercially sensitive, I will be happy to try it out for you.
     
    I own a 16F874A, which is the same PIC, just with less memory.
     
    Don't know if can check it tonight though, as it is getting near bed time.
    #6
    Natique
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2011/01/27 16:46:01
    • Location: 0
    • Status: offline
    Re:HyperTerminal Send Text File 2011/05/01 17:36:01 (permalink)
    0
    Wow that's really nice of you to offer... I'm honestly not sure if I can send it to you or not though, so I think I'm going to have to decline that very awesome offer. Thank you though! And hope you have a good night.

    I'll have to take a look at the oscilloscope... I always thought it looked ancient but I never really got close and used it.
    #7
    Brick
    Super Member
    • Total Posts : 1684
    • Reward points : 0
    • Joined: 2006/05/25 09:10:40
    • Status: offline
    Re:HyperTerminal Send Text File 2011/05/01 22:55:55 (permalink)
    0
    Have you looked at the flow control? Is it hardware line controled RTS and CTS? If so are you controlling these correctly?
    #8
    narendra kumar
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2013/04/25 04:23:22
    • Location: 0
    • Status: offline
    Re:HyperTerminal Send Text File 2013/05/16 21:03:11 (permalink)
    0
    hi 
    do u got ans for this,,,,hpw to send hex file to hyperterminal and receive this file in PIC controller
    #9
    jayeshdhanawde
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2013/06/19 06:06:32
    • Location: 0
    • Status: offline
    Re:HyperTerminal Send Text File 2013/06/19 06:23:15 (permalink)
    0
    please can some one tell me how to create a file that can be send through hyperterminal
    let me be more clear i want to send some command to the device through hyperterminal  but between that commands there required some time delay but i dont know how to produce that delay is there any kind of script i mean syntax just like in C. in my search i found one page where it was written it is recommended that the start of the file indicate START and that the list line indicate END. so please help me how to create that txt file.
    #10
    WaltR
    Super Member
    • Total Posts : 3759
    • Reward points : 0
    • Joined: 2003/11/07 12:38:21
    • Status: offline
    Re:HyperTerminal Send Text File 2013/06/19 06:52:28 (permalink)
    +2 (1)
    Don't use hyperterm. Instead use RealTerm, a free download.
    #11
    jayeshdhanawde
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2013/06/19 06:06:32
    • Location: 0
    • Status: offline
    Re:HyperTerminal Send Text File 2013/06/21 04:02:58 (permalink)
    0
    ok will try
    #12
    Jump to:
    © 2017 APG vNext Commercial Version 4.5