the task is:
a) using the BIOS 14h serial port services, write a program in C (inline ASM when necessary) to read a char from the
keyboard,send it to the COM2 port,recieve back from COM2, and echo it to the screen.
I am OK as far as reading the char from the keyboard and echoing to the screen.The part I am hung up on is what is
the sequence of events necessary to prepare the UART,send the data,and recieve the data. I have a table of the
registers in the UART and I have a loopback plug for the COM2 port.
b) in only C, send a char to COM2,read the char from COM2 using polling, and then echo it to the screen using memory
mapped IO. I have written programs in ASM to write to the screen using memory mapped IO, but I don't understand how
to translate the assembly into C code.
c) same as above but write an ISR to read from the COM2 port.You must specifically enable the COM2 interrupt.
My understanding is that bit 3 in the Interrupt Mask Register of the PIC must be cleared in order to
enable the COM2 interrupt. Beyond that I am confused about what to do with the UART and in what order to do it.
I am ok on how to get and save an ISR from the IVT and replace it with my own.
Any help in understanding how the UART works and how to program it would be great.
CpE student
Start Free Trial