Previous Thread
Next Thread
Print Thread
-bitb only working at 110 baud in ibmpcjr #115483 07/04/19 10:56 PM
Joined: Jul 2011
Posts: 139
T
TSCHAK Online Content OP
Senior Member
OP Online Content
Senior Member
T
Joined: Jul 2011
Posts: 139
Very strange,

With any of the machine drivers that I use, with null_modem / bitb, I can only seem to set RX/TX baud to 110 in machine configuration.. If I set to any other baud rate, I get garbled data.

Is anyone else seeing this problem?

-Thom

Re: -bitb only working at 110 baud in ibmpcjr [Re: TSCHAK] #115484 07/04/19 11:27 PM
Joined: Jul 2011
Posts: 139
T
TSCHAK Online Content OP
Senior Member
OP Online Content
Senior Member
T
Joined: Jul 2011
Posts: 139
For reference, this is exactly what my code is doing for the serial port init:

Code

void io_init(void)
{
  log("io_init() - before port initialize.\r\n");
  // Initialize port.
  regs.x.dx = PORT;
  regs.h.ah = 0x04;
  int86(SERIAL, &regs, &regs);
  log("io_init() - after port initialize, returned %d\r\n",regs.x.ax);

  log("io_init() - About to set line characteristics.\r\n");
  // Set line characteristics. 
  regs.h.al = 0x07; // 1200bps
  regs.h.al = (regs.h.al < 5) | 0x03;   /* 8/N/1 */
  regs.x.dx = PORT;
  regs.h.ah = 0x00;
  int86(SERIAL,&regs,&regs);
  log("io_init() - Set line characteristics.\r\n");

  log("io_init() - Set flow control\r\n");
  /* // Set RTS/CTS Flow control */
  regs.h.ah = 0x0f;
  regs.h.al = 0x02;
  regs.x.dx = PORT;
  int86(SERIAL,&regs,&regs);
  log("io_init() - Set flow control success\r\n");

  io_raise_dtr();
}


Re: -bitb only working at 110 baud in ibmpcjr [Re: TSCHAK] #115487 07/06/19 03:34 AM
Joined: Mar 2015
Posts: 2
T
ted Offline
Member
Offline
Member
T
Joined: Mar 2015
Posts: 2
Maybe just a typo in your post but shouldn't it be:
regs.h.al = (regs.h.al << 5) | 0x03; /* 8/N/1 */

Re: -bitb only working at 110 baud in ibmpcjr [Re: TSCHAK] #115515 07/17/19 05:21 PM
Joined: Jul 2011
Posts: 139
T
TSCHAK Online Content OP
Senior Member
OP Online Content
Senior Member
T
Joined: Jul 2011
Posts: 139
yeah, it is. and yes, that's correct. smile


Who's Online Now
3 registered members (robcfg, zino, Darkstar), 156 guests, and 1 spider.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,673
Posts113,788
Members4,852
Most Online418
Aug 14th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3