This week I am rewriting the read and write functions in C programming for UART. Dr Shawn really taught me a lot about the easy and correct way to write the codes.
In order to solve this problem, I referred to the LW and SW case and tried to implement the objectMapping method to LB (Load Byte) and SB (Store Byte). It actually did worked as expected.
Next I will have to configure the status register flags, where I need to set or clear certain flags of data register when read/write function is called. In actual world, the uart transfer data bit by bit, so it might take some time to finish the data transmission and would require constant checking for the status register. However, in simulator, the transfer speed is a lot faster. So what I need to do is just set or clear the related flags according to the actions (either read or write data).
That is all for this week.