Re: Counting Clocks

May 12, 2005 1 Replies

in your code, the value of synch_found is never reset after it has found the first synchronisation byte... Ben


I have what I thought was a simple problem. I need to count the number of
>clocks to determine when to take data out of the shift register. The data
>is a continuous stream and I want to be able to count every 8 bits. I
>thought I could use a 3 bit counter but can't seem to get the code correct.
>I then went to a 4 bit counter, and while it works I am not sure if the
>code is the best way. Any ideas?
>
> Thanks,
> Joel
>
>
>
>

And having said that... you've got to be sure of your clock synchronisation... i.e. the synchronisation bewteen SYS_CLK and SIO_CLK

Hmm, and one other thing, i'd use numeric_std and make BC a Natural..

HTH, Ben

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required