Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/08/04 01:58
Read: times


 
#82739 - Some other suggestions
Responding to: ???'s previous message

The other respondents have given some direction on the division problem. I see you've done the fifo using the 'brute force' method - there other ways that can be more efficient - especially using pointers. Search on code for 'circular buffers'. Your method is fine for small fifos, but once your fifo gets larger, the overhead becomes significant. Also, do you really need to do the division in your interrupt routine? The idea of the fifo is to decouple the interrupt from your mainline code - the interrupt code puts the values in, the mainline code reads the values and processes them. It is wise to minimise the time spent in interrupt routines - especially if you have other interrupt sources (uart, timer etc). For example - if you're receiving comms at 19200baud on the uart, the rx interrupt will happen every 520uS approx, if your timer interrupt routine is spending >520uS, then characters will be lost. It is also wise to minimise the number of interrupt sources where possible to minimise the possibility of strange interactions.

List of 8 messages in thread
TopicAuthorDate
24bit /8bit long division            01/01/70 00:00      
   24bit /8bit long division            01/01/70 00:00      
      How about rotate left?            01/01/70 00:00      
         multibyte rotate            01/01/70 00:00      
            Compact code            01/01/70 00:00      
               Rotate in hardware.            01/01/70 00:00      
         Yes, that's better            01/01/70 00:00      
            Some other suggestions            01/01/70 00:00      

Back to Subject List