Subject:
|
Re: Max poke rate?
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 11 Mar 1996 23:36:47 GMT
|
Original-From:
|
Mike Ross <mross@outland.jsc.nasa^nospam^.gov>
|
Viewed:
|
2106 times
|
| |
| |
On Mon, 11 Mar 1996, Franklin Ranier Roller wrote:
> Hi,
> I've been trying to write to PD2 using the following:
>
> int write_port(int port, int value, int mask)
> {
> poke(port,(value & mask)|(peek(port) & ~mask));
> }
>
> It works fine except that the fastest cycle that I can get out of
> PD2 is about 242 Hz. I need 1.6 kHz. In between PD2_on and PD2_off
> I put a msleep(1L) or a sleep(0.001) and the sleep function is faster,
> but still not a 1 mS or 1kHz. I've even tried sleep(0.0006) with same
> result. Any recommendations? Do I have to hog the processor or what.
>
> Frank
>
>
I think the Interactive-C overhead will prevent such fast repetition.
Simple statements take about a millisecond, with printf's taking 10
msec. You'll probably have to do it in assembler, and use an .icb file.
Hope this helps...
-mike
* Michael L. Ross/C33 | Lockheed Engineering & Sciences Co.****
* Robotics Department | 2400 Nasa Rd. 1, Houston, TX 77058*****
*(713)333-7094 voice,(713)333-6071 fax*#include <disclaimer.h>*
* Finger me for my public key. mross@outland.jsc.nasa.gov ****
* If you weren't a socialist in your twenties, you had no heart.
* If you weren't a conservative by your thirties, you have no brain.
|
|
Message is in Reply To:
| | Max poke rate?
|
| Hi, I've been trying to write to PD2 using the following: int write_port(int port, int value, int mask) { poke(port,(value & mask)|(peek(port) & ~mask)); } It works fine except that the fastest cycle that I can get out of PD2 is about 242 Hz. I need (...) (29 years ago, 11-Mar-96, to lugnet.robotics.handyboard)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|