The first project is designed to familiarize you with serial communication on the STM32F446 Nucleo board. To do this each student will be assigned a unique I2C slave address for their processor board. The instructor will have a “master” controller set up with an I2C bus that multiple students can connect to simultaneously. We will play a modified version of “Simon says,” where the master will signal a specific slave to respond. The game will be played with the following protocol:
- The master will initiate communication by sending a start condition followed by a random
- If the master sends a “write” command the following data byte will a number between 1-15.
The owner of the address should then blink an LED the number of times indicated by the data byte sent. (Note: the frequency of blinks should be such that the number of blinks can be easily counted by a human).
- If the master sends a “read” command the owner of the address should send back a list of all
data bytes received since the start of the game. For example:
a. If no data has been received by the owner of the address a zero should be returned.
b. If the owner of the address has received only a 7 then the owner should send only a 7.
c. If the owner of the address has received 7, 12, 2, 5 over the course of the game then all of those numbers should be sent in a 4-byte sequence.
- Students may use an alternate method for displaying data. For example, students may use a
liquid crystal display, 7-segment LED display, etc.
- Students may write a “master” routine to control the game. Be warned that the master routine
is much more sophisticated. Students must demonstrate the abilities outlined above in addition to controlling the game.