hsnhsyn1
Junior Member level 1
- Joined
- Mar 19, 2013
- Messages
- 16
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,400
Hi, I'm trying to design a counter using finite state machine, with a start and a stop input. as output, I need the count value for calculating the time between start and stop signals.
I calculated my max. count value as 90000, 17 bits (90 ms, with 1 MHz clock frequency). By the way I'm not sure if I must use a max value or not.
I have read and understood some counter examples as finite state machine, but they were all small values of count, for example modulo 8. So I can't figure out how to do it.
Thanks for any help.
Edit: I made a state diagram with two states; in stats S0, machine waits for the start input to go high. when start signal is high, it moves to state S1 and Enables the counter to count until the stop signal comes. When the stop signal comes it moves back to the state S0.(But I don't know if it is okay or not)
I calculated my max. count value as 90000, 17 bits (90 ms, with 1 MHz clock frequency). By the way I'm not sure if I must use a max value or not.
I have read and understood some counter examples as finite state machine, but they were all small values of count, for example modulo 8. So I can't figure out how to do it.
Thanks for any help.
Edit: I made a state diagram with two states; in stats S0, machine waits for the start input to go high. when start signal is high, it moves to state S1 and Enables the counter to count until the stop signal comes. When the stop signal comes it moves back to the state S0.(But I don't know if it is okay or not)
Last edited: