User Tools

Site Tools


lab_6

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
lab_6 [2019/04/10 11:41]
hutch
lab_6 [2019/11/19 14:29] (current)
hutch [simonControl State Machine Code]
Line 75: Line 75:
 As with other state machines, you must have a ''​simonControl.h''​ and a ''​simonControl.c''​ file. The .h file must contain at least the function prototypes of ''​simonControl_init()''​ and ''​simonControl_tick()''​. ''​simonControl''​ provides the top-level control for the Simon Game and it coordinates the behavior of the other state machines to implement the Simon game. I don't provide any code for ''​simonControl''​ but you can watch the [[https://​www.youtube.com/​watch?​v=IxI0QVZK86A|Simon demo video]] to see how things are supposed to work. As with other state machines, you must have a ''​simonControl.h''​ and a ''​simonControl.c''​ file. The .h file must contain at least the function prototypes of ''​simonControl_init()''​ and ''​simonControl_tick()''​. ''​simonControl''​ provides the top-level control for the Simon Game and it coordinates the behavior of the other state machines to implement the Simon game. I don't provide any code for ''​simonControl''​ but you can watch the [[https://​www.youtube.com/​watch?​v=IxI0QVZK86A|Simon demo video]] to see how things are supposed to work.
  
 +Note: **It is incorrect for the simonControl state machine to call any ''​tick()''​ functions.** All ''​tick()''​ functions are invoked in ''​main()'',​ Review the ''​main()''​ function from the clock lab that performs the flag-method of interrupts. Note that ''​clockControl_tick()''​ is called inside the while loop. Your main function for simon will be similar with the tick functions for all 4 state machines being called within that while loop at the same point as the ''​clockControl_tick()''​.
 +
 +The simonControl state machine coordinates the operation of the various state machines by invoking their corresponding enable functions.
 ---- ----
  
lab_6.txt ยท Last modified: 2019/11/19 14:29 by hutch