Serial Port Initialization - Modem Control Register
Posted: Sun Feb 27, 2022 3:36 am
Hi,
I am following Serial Ports Tutorial.
In the Initilization section, modem control register is written multiple times with different flags.
Here, bits 0,1 and 3 is set, so Data Terminal Ready pin is set, Request to Send pin is set and OUT2 pin is set. If I understand correctly, OUT2 pin enables IRQ's.
Here, DTR is unset, RTS is still set, OUT1 is set, OUT2 is set and LOOPBACK is set.
I understand that by writing 0x1E to modem register, loopback mode is activated. But, what is the purpose of writing 0x0B to it first?
Best Regards,
I am following Serial Ports Tutorial.
In the Initilization section, modem control register is written multiple times with different flags.
Code: Select all
outb(PORT + 4, 0x0B);
Code: Select all
outb(PORT + 4, 0x1E);
I understand that by writing 0x1E to modem register, loopback mode is activated. But, what is the purpose of writing 0x0B to it first?
Best Regards,