Shop OBEX P1 Docs P2 Docs Learn Events
Sending a string using hyperterminal or Parallax serial terminal — Parallax Forums

Sending a string using hyperterminal or Parallax serial terminal

dodgerdodger Posts: 37
edited 2009-03-20 14:42 in Propeller 1
I believe the serial device i am using at the moment sends out 18 characters in a string, but the object says it can only recieve 15 characters.· I want to try to eliminate the cause of my problems and verify that the application i have is correct.·

Therefore i would like to use a terminal program to send out a string.


Is it possible to send a string using hyper term or the parallax serial term.· I can only send a byte at a time.· Since i am trying to figure out whats causing some problems i would like to send a string through a terminal program and have the microcontroller recieve it using the Extended FDSerial object.· Any suggestions?·




Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-20 04:24
    It's possible to expand the size of the I/O buffers in the FullDuplexSerial driver to any power of two up to 512. There are several other serial drivers in the Object Exchange with larger buffer sizes.

    Hyperterminal may be scriptable, but I normally use the MacOS and have no idea how to script Hyperterminal under Windows. I know this can be done under the MacOS, but that wouldn't help you.
  • dodgerdodger Posts: 37
    edited 2009-03-20 04:50
    Just to make sure before i start changing buffer sizes.· This data stream is composed of 18·characters correct, when I use Hyper terminal i only see the data starting at a sign or space.· Im not too sure what the memory locations are used for.

    RS232 Datastream Format
    mmmbsdddddbuuuuucl, where:
    m Memory Location
    s Sign (space or -) c Carriage Return
    d Data with Decimal Point l Line Feed

    u Units b Blank

  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-20 05:17
    The carriage return and line feed will cause the Hyperterminal display to go to the 1st column (Carriage Return) and the next display line (Line Feed). You won't see them otherwise.

    The 15 character receive buffer is used internally in FullDuplexSerial to hold characters that have appeared on the serial line, but have not been read by your program by using rxcheck or rxtime or rx. These remove one character from the input buffer (if they're "successful" ... rx hangs until "successful"). Similarly, the 15 character transmit buffer holds characters produced by your program until there's time to transmit them. A program can easily produce characters faster than they can be sent. All of the transmit routines (dec, str, tx) will hang until there's room in the transmit buffer for the characters to be transmitted.
  • dodgerdodger Posts: 37
    edited 2009-03-20 05:49
    I think im making a small mistake somewhere.· When i only send one character and not a string i have good communications. As soon as i try to send a string i dont recieve any data as far as i can tell.· Could someone look over my application so far.



    I currently have my transmitt connected to my recieve on the propeller. So i would expect to see an Ic on my video display.



    {{ Prop Serial}}

    CON
    · _clkmode = xtal1 + pll16x
    · _xinfreq = 5_000_000

    VAR
    · long MyStr [noparse][[/noparse]16]
    · long Torque
    OBJ
    · SER·· :······ "FullDuplexSerial"
    · TV··· :······ "tv_text"
    · Num·· :······ "Numbers"
    · Ext·· :······ "Extended_FDSerial"
    PUB Main
    ·
    · Num.init
    · TV. start(12)
    · TV.str(string("Start",13))
    · TV.out(13)
    · Ext.start (17,16,0,9600)
    · Ext.SetDelimiter (",")
    · repeat 30
    ··· Ext.rxflush
    ··· Ext.str(string("Ic,"))
    ··· Torque := Ext.RxStrTime(200,@MyStr)
    ······· TV.out (Torque)
    ··· waitcnt (clkfreq/10 + cnt)
    · TV.str(string("End",13))
    · Ext.stop
  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-20 06:24
    TV.out outputs only a single character, not a string. You probably want to use TV.str
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-03-20 14:42
    Hello,

    This is a duplicate thread...the original thread is located at the following link. In the future please follow up in your original thread rather than starting a duplicate thread.

    http://forums.parallax.com/showthread.php?p=793318

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.