This week, I have been trying to complete the Master SPI module (MSPI) as soon as possible. In the simulator, the MSPI is suppose to send data to a device and/or read data from a device. This can be done by using the same function. I created a ‘transfer’ function in which it can store or read the value passed into the function.

This week I did some study on how to detect the connection status of MSPI ports, where the MOSI, MISO and SS pin must connect to a device in order to transfer data. I referred to LCD module where it requires user to connect certain pins in order to show the output on LCD screen. If it is not connected, the user are told to connect it.

However, the way I am doing it is wrong. The users will not be able to see the console log when they are using the simulator, so it is not possible for users to know whether the ports are connected. Also, it is not necessary to do the port connection checking. A simulator is just to allow the users to perform testing on the devices in an easier way. What I am doing now is making the simulator more complicated. So currently I removed the codes for connection checking, and move on to another module — UART. That is all for this week.