|
| | Re: Interesting BrickOS Timing Results
|
| This was a terrific analysis. It's not surprizing that current implementation hogs so much CPU time. If all four A/D channels are scanned every 150 us then the A/D interrupt is occuring every 37.5 us since each A/D channel generates its own (...) (22 years ago, 14-Jan-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
| | 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)
| |
| brickos (score: 1.747) |
|
| | Re: Interesting BrickOS Timing Results
|
| (...) I've found that any interrupt on the RCX has a minimum overhead of 101 to 113 states (or about 7 us). This is the time taken by the CPU to recognize and dispatch the interrupt plus the time the ROM routine takes to dispatch the interrupt to (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
| | Re: Interesting BrickOS Timing Results
|
| (...) 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 (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
| | Re: Interesting BrickOS Timing Results
|
| (...) My thought was that the OCRA interrupt could be used as the general 1ms interrupt and the subsystem handler (which is currently using OCRB) could be called every other time from the OCRA handler by using a flag (toggled every 1ms). Actually, (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
| | Re: Interesting BrickOS Timing Results
|
| Hi Marc, (...) Nice idea, but wouldn't that result in at least one of four cycles beeing blocked by OCRA? or is our system interrupt finished within less than 250msec? (...) Right, that was what I did for my Lepomux patch - works fine. Gunther (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
| | Re: Interesting BrickOS Timing Results
|
| (...) 250msec? Not blocked entirely, but delayed. That's what I meant by "stutter". I've measured the general interrupt handler to take anywhere from 70-150us. So, the higher the sample rate the more significant the disruption. Anything faster than (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
| | Re: Interesting BrickOS Timing Results
|
| (...) I forgot to mention... This is *almost* the same as moving some of the subsystem code into a seperate high priority task. For example, LCD refresh code is executed in the 1ms timer ISR. It really doesn't need to be in the ISR. It can do it's (...) (22 years ago, 15-Jan-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
| | Re: Gcc/BrickOS installation issues
|
| (...) Not so. Here is the script I use. I suspect that the buildgcc.sh may have omitted to make sure the newly-installed binutils were in the PATH whilst building gcc. Max. BEGIN-SCRIPT #!/bin/bash # Syntax: ./build-h8x (binutils-srcdir|gcc-srcdir) (...) (22 years ago, 25-Mar-03, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
|
| brickos (score: 1.747) |
|
| | Re: The BrickOS Task Manager
|
| (...) Sorry, I'm still just not getting it at all. I have type errors all over the place trying to pass arguments to my task. Could someone please simply email me or post an example of a program that starts, runs two or more threads, and will (...) (21 years ago, 10-Jan-04, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |
|
| | Re: The BrickOS Task Manager
|
| (...) This works. Steve ---- #include <unistd.h> #include <dbutton.h> #include <dmotor.h> int MotorSpeed = 0; int RunMotor() { while (!shutdown_requested()) { motor_a_dir(MotorSpeed); } return 0; } int CheckButton() { while (!shutdown_requested()) { (...) (21 years ago, 10-Jan-04, to lugnet.robotics.rcx.legos)
| |
| brickos (score: 1.747) |