Menu

#142 MODE command - can't set "STOP=2"

open
nobody
Mode (1)
5
2024-08-13
2015-11-22
No

Hi guys,

 Just trying out FREEDOS to help a local high school with a robot they are trying to get working. I need to be able to run in native DOS and control the robot over RS232 ... 9600 baud, no parity, 2 stop bits, 8 data bits.

 For some reason, I can set all of these settings to work except for the stop bits ... it does not give me an error ... it appears to accept but when I play it back it says the stop bits are still = 1. Is this a bug?

 Here are the 2 commands:

 to set the configuration:
 mode com1: [BAUD=96] [STOP=2] [DATA=8] [PARITY=N]

 to play them back I type:     
 mode com1: baudhard=1

Related

Bugs: #142

Discussion

  • Charles Patton

    Charles Patton - 2015-11-22

    Bob,
    A somewhat lengthy quote from a program I did years ago (90's) but may have relevance to your problem. I think I had switched to FreeDOS by this time, but I attributed the problem to QB. Nonetheless There is an inability to use
    OPEN "com9:4800,e,8,1,bin,ds0,cd0,cs0" FOR RANDOM AS #1
    as there appears to be an 8 bit limit to the setting data. So see the following for some explanations of a workaround using the SIO registers directly.


    '*** port 2
    'next line must happen before the open statement -- something in QB
    ' creams the bios entry when it executes
    DEF SEG = &H40: port2LCR = 3 + PEEK(2) + &H100 * PEEK(3)'so now have port adr
    OPEN "com2:4800,n,8,1,bin,ds0,cd0,cs0" FOR RANDOM AS #1
    print "OK"
    'The reason for the next statment is explained at:
    ' support.microsoft.com/kb/39342
    ' as the MC 14469's used in the switch plates require 4800,e,8,
    ' it is incompatible with QB's ability. The next statement
    ' places the required change into the Line Control Register and sets
    ' 8 bit data, even parity, and 2 stop bits
    ' a further complication was that during the update to the
    ' Intel D2400HN motherboards, there is a switch between COM1 & COM2
    ' using the BIOS mem loc of 40:0 and 40:2 for the SIO port base addrs
    ' careful reading of the Tech Spec for the INtel bd indicates a possible
    ' layout error and the hardware COM ports were interchanged.
    ' It must have been decided to flip them in the BIOS so following fix should work
    ' for any motherboard including the
    ' Intel bd, so this uses the BIOS link to point to correct out port adr of
    ' LCR (=base adr +3)
    ' next statement moved up above
    'DEF SEG = &H40: port2LCR = 3 + PEEK(2) + &H100 * PEEK(3)
    PRINT "port2LCR is "; HEX$(port2LCR)
    OUT port2LCR, &H1F 'finally set 8,E,2


    So maybe the problem is in the DOS?
    Regards,
    Charles R. Patton

     

    Last edit: Charles Patton 2015-11-22
  • Anthony Williams

    I don't know if MODE is maintained anymore, but Eric Auer is still sometimes around. However, I don't know if he frequently checks bug reports here. If all else fails, try emailing him (or joining the relevant FreeDOS mailing lists).

    http://freedos.sourceforge.net/software/?prog=mode

     
  • Anthony Williams

    Bob Ouellette (Dec 12):

    "I was able to get my hands on the PC from the high school today and
    the fix works! Thanks for all your help guys! The robot is now working!!"

    (So now we wait for Eric to finalize the new release. He's already asked for further comments on the mailing list.)

     
  • Anthony Williams

     
    • Bob Ouellette

      Bob Ouellette - 2016-12-07

      Thanks!

      Regards,
      Bob Ouellette
      506 650 0149 (cell)
      596 634 1333 (office)

      On Dec 6, 2016, at 8:06 PM, Anthony Williams rugxulo@users.sf.net wrote:

      The updated MODE release can be found here:

      http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/mode/mode-2015nov25.zip

      [bugs:#142] MODE command - can't set "STOP=2"

      Status: open
      Group:
      Labels: Mode
      Created: Sun Nov 22, 2015 12:05 AM UTC by Bob Ouellette
      Last Updated: Fri Aug 26, 2016 10:22 PM UTC
      Owner: nobody

      Hi guys,

      Just trying out FREEDOS to help a local high school with a robot they are trying to get working. I need to be able to run in native DOS and control the robot over RS232 ... 9600 baud, no parity, 2 stop bits, 8 data bits.

      For some reason, I can set all of these settings to work except for the stop bits ... it does not give me an error ... it appears to accept but when I play it back it says the stop bits are still = 1. Is this a bug?

      Here are the 2 commands:

      to set the configuration:
      mode com1: [BAUD=96] [STOP=2] [DATA=8] [PARITY=N]

      to play them back I type:
      mode com1: baudhard=1
      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freedos/bugs/142/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #142

  • fritz.mueller

    fritz.mueller - 2024-08-13

    I think this thread can be closed.

     

Log in to post a comment.