Shop OBEX P1 Docs P2 Docs Learn Events
serout ctr z — Parallax Forums

serout ctr z

kenobekenobe Posts: 7
edited 2005-08-10 01:06 in BASIC Stamp
Hi
can someone pls tell me how to send the keystroke CTR Z from the bs2 serout
Thanks

Comments

  • NewzedNewzed Posts: 2,503
    edited 2005-08-06 13:32
    You can not serout a combination keystroke.· Combination keystrokes can only be recognized by your PC.· You could send a "Z", and then tell the Stamp to perform the appropriate action when the "Z" is received.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester yet?
    http://hometown.aol.com/newzed/index.html

    ·
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-08-06 13:49
    Kenobe -

    I can only presume that this is going to be used to emulate a CTL Z from some other device. Which device would ordinarily be sending it, a PC AT keyboard? What device will be receiving the character string, something attached to an MS-DOS port?

    What you produce as a character string will very much depend on what kind of device you're emulating. A VT-100 terminal will produce one set of codes, a PC AT keyboard will produce another, and a Wyse 50 terminal will produce yet onther. See the problem you're faced with.

    In almost all case I can think of, you will be sending more than one character to emulate it, and in some case you may be sending up to 4 characters, if both MAKE and BREAK keypresses are required by the receiving device, or the software decoding it.

    Regards,

    Bruce Bates
  • ShortShort Posts: 26
    edited 2005-08-06 14:52
    ASCII 26 is control Z or in other words binary 0011010 or two char code 94 ,122
    94 being control, followed by 122 the char z.

    SEROUT pin,baud,[noparse][[/noparse]26]
    or
    SEROUT pin,baud,[noparse][[/noparse]94]
    then
    SEROUT pin,baud,[noparse][[/noparse]122]

    Post Edited (Short) : 8/6/2005 3:06:13 PM GMT
  • kenobekenobe Posts: 7
    edited 2005-08-07 02:57
    Hi

    Thanks for your advise.

    Actually I am sending commands to a modem.

    from hyper terminal, looks like this

    type "at+pst"· followed by keystroke CTR Z.

    I want to send this command from the bs2, I try asckii 26 but dont work.

    rolleyes.gif
  • ShortShort Posts: 26
    edited 2005-08-07 05:31
    ·Might have to also send CR
  • YanroyYanroy Posts: 96
    edited 2005-08-08 14:41
    Are you sure what you're seeing as CTR isn't actually the ASCII escape character?· I'd suggest you do some more research on modem strings, especially for the modem you have...
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-08-08 17:18
    A CTRL-Z ascii is CHR(26). That's probably what the modem wants as its 'return to command mode' escape character.
  • NewzedNewzed Posts: 2,503
    edited 2005-08-08 18:34
    Allan, shouldn't that be CHR$(26)?

    Sid
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-08-08 19:54
    Sure, in Visual Basic. In Turbo Pascal, the other is correct.

    In PBasic, it would be:

    SEROUT 16, I9600, [noparse][[/noparse]26]
  • kenobekenobe Posts: 7
    edited 2005-08-09 03:41
    I am very appreciatetive of all your suggestions and helps,

    I tried

    serout 8,I9600,[noparse][[/noparse]26]

    It did not work

    However, the CTR Z works fine in the Hyper Terminal.

    I am trying to send to the Itegno modem.
  • kenobekenobe Posts: 7
    edited 2005-08-09 03:44
    Sorry, it is

    appreciative. not appreciatetive
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-08-09 11:49
    Well, somewhere you need to have:

    I9600 CON 16384 ' Or, whatever the Inverted, 9600 baud modifier is for your BS2.
  • ShortShort Posts: 26
    edited 2005-08-10 01:06
    I started this wrong I think it is $26 HEX not DECIMAL 26
Sign In or Register to comment.