Subject:
|
bad motor output because of bad lego firmware?!
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Thu, 28 Oct 2004 15:58:29 GMT
|
Viewed:
|
5497 times
|
| |
| |
Hi there,
I've spent the last two days trying to write a function in NQC that transfers
data to the Lepomux I/O-extender. The data transfer is normally done by
connecting the Lepomux to one of the motor ports. Each transition from one motor
state to another indicates the start of a new bit on the lepomux side. This
includes transitions from forward to backward or vice versa.
When I do something like this
On(OUT_B);
SetPower(OUT_B, OUT_FULL);
while (1)
{
SetDirection(OUT_B, OUT_TOGGLE);
}
nothing happens at all.
Something like this toggles between forward and backward:
On(OUT_B);
SetPower(OUT_B, OUT_FULL);
while (1)
{
SetOutput(OUT_B, OUT_ON);
SetDirection(OUT_B, OUT_FWD);
SetOutput(OUT_B, OUT_ON);
SetDirection(OUT_B, OUT_REV);
}
But the output waveform looks like this:
FWD ____ ____
| | |
OFF |____ ____| |____
| |
REV |____|
There is a gap of at least 3ms between the fwd->off and the off->rev edge. This
makes it impossible for the Lepomux to recognize it as one edge.
The reason for this behaviour seems to be that the bytecode interpreter (or even
the ROM routines) don't directly access the motor output register in the RCX
(two bit per motor for off,fwd,rev,brk).
Does anyone know a workaround or do I really have to patch the Lego firmware
image?
|
|
Message has 2 Replies: | | Re: bad motor output because of lego firmware?!
|
| (...) I suspect part of this delay is inherant to the firmware, and won't be "patchable" In any case, if you want your extender to be something you can market to most users, it should work with the standard firmware, without modification. Just my (...) (20 years ago, 28-Oct-04, to lugnet.robotics.rcx.nqc)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|