Question: You will design a pacemaker using a Moore FSM. There is one input and one output. The input will be high if the heart is

 You will design a pacemaker using a Moore FSM. There is

You will design a pacemaker using a Moore FSM. There is one input and one output. The input will be high if the heart is beating on its own. The input will be low if the heart is not beating on its own. If the heart is not beating your machine should pace the heart. If the heart is beating on its own, the input will be high and your output should be low. However, if the input is low, you should pace the heart by giving a 10 ms output pulse every 1 sec. PB0 is output, PB1 is input. Show the FSM state table and state diagram in Moore format. The structure and the main program is fixed. Show the C code for FSM definition, and specify the initial state const struct State{uint32_t out; uint32_t wait; uint32_t next[2]; typedef const struct State State_t; uint32)_t s;//define FSM here void main(void){PORTB_Init(); SysTick_Init() while(1) GPIO_PORTB_DATA_R_FSM[s].out; sysTick wait1ms(FSM[s].wait); input (GPIO_PORTB_DATA_R&0x02)>>1; s = FSM[s] next[Input];}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!