| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | RS232 |
Hi Christian,
> I need some Help to write a program using RS232 at
> 19200 Bauds without Fossil
> and UART 16550 compatible.
> BIOSCOM () can't handle speed over 9600 Bauds. :(
> I Will apreciate any Help, C source code examples,
> libraries etc...
It's pretty simple. The UART has a divisor register. Just set that to the
required value for the speed you want. Of course there is a snag. There always
is. :-) You can only write to the divisor register immediately following a
write of a 1 to bit 7 of the LCR. The registers are at:-
0x2f8 (0x3f8) Tx/Rcv buffer or Divisor register LSB
....9 IER (interrupt enable register) or MSB of divisor.
....A IIR
....B LCR (Line control register).
Essentially you read the LCR, OR it with 0x80, and write this value to it.
You then write the divisor value you want to the divisor latches. Then you AND
the value of the LCR with 0x7f and write it back. That's it and all about it,
unless you don't know what values you want to send to the latches. I'm sure
it's 6 for 19200.
Since input and output to registers varies from compiler to compiler, I
won't even attempt to offer you C code without knowing yours.
Best wishes,
Bill.
---
* Origin: Meerkats Anonymous (2:2504/200)SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728 810 SEEN-BY: 639/252 670/213 218 @PATH: 2504/200 213 2503/501 252/356 255/1 251/25 2320/38 270/101 396/1 @PATH: 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.