To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3090
3089  |  3091
Subject: 
Re: Interesting BrickOS Timing Results
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 15 Jan 2003 15:20:46 GMT
Viewed: 
3318 times
  
In lugnet.robotics.rcx.legos, Mark Riley writes:

Looking at the code in sys_time.c, it seems possible
that the OCRB interrupt could be consolidated with the
OCRA interrupt, freeing the OCRB interrupt to be
used for sample rates > 1 KHz.

Timer B is usually unused but has a lower priority than Timer A. If you do a
lot of stuff in the timer A routine, this will block timer B interrupts
(especially if timer B generates more interrupts than timer A).
The mean thing is that those ROM routines seem to be hardcoded on timer A. So
you can't just put the whole system on timer B and speed up timer A. Maybe
there's someone who knows exactly how timer A is connected to the routines in
ROM and if speeding up timer A just influences on the sound output.

Gunther



Message has 1 Reply:
  Re: Interesting BrickOS Timing Results
 
OCRA and OCRB are output interrupts for the 16 bit timer. They can be programmed to fire at specific points along the timers run. So, technically, they cannot be used independently of each other. If OCRA resets the timer value back to zero, then (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Interesting BrickOS Timing Results
 
Joe, That's definitely an improvement! So, that would be a 250 Hz sample rate for any given sensor. I just tried a modification similar to yours that did all 4 conversions every OCRA/B interrupt (or 1 KHz sample rate) and got: IDLE: 82 2ROT: 77 (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)

19 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR