- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to count the transitions (high and low) of a incremental motor encoder.
I wrote a simple async counter, using only the encoder output signal as the my stimulus (i.e. always @ (posedge relEnc)) but it doesn't seem to work very well, especially at high speeds of the motor. Is there a way to know how fast I could operate this portion of the design? Like an fmax for the relative encoder speed? Otherwise, to get better more accurate counts, should it be done synchronously - use the main system clock 100mhz, to monitor and count the transitions of the encoder clock? Also, I must be blind, but I don't see an Altera LPM block for a simple counter! I wanted to experiment and see if my 'fmax' would be improved using an altera counter.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fmax should be reported in the compilation report as it is a seperate clock. The fmax is then the frequency of the counter, but also keep an eye on the duty cycle. I assume it cannot be too high or low. I have absolutely no idea about the minimum pulse width.
Also don't forget to implement a synchroniser between the two clock domains. Unsynchronised data transfers could result in strange behaviour. I don't know about any IP for this.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page