To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 393
392  |  394
Subject: 
Re: Major breakthrough serial wise.
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Mon, 5 Jun 2000 14:30:08 GMT
Reply-To: 
sjm@&spamless&judgement.com
Viewed: 
1887 times
  
Ralph Hempel wrote:
Great! I would leave the basic serial stuff alone and enable
interrupt driven serial IO in a separate set of words, like
RCX_INIT and SERVO_INIT etc. Maybe something that means
interrupt-driver serial init, but my brain can't think
of a good word. SERIAL_INIT maybe, but it does not imply
the interrupt driven part...

I'm confusing everybody by asking questions that imply
that I am changing existing code. I do not touch existing
code. The question about where to enable the interrupt
is a final cleanup one. It is not what I am doing now. I
have not touched the existing code in any way. I have
only added new words that obviously have no affect
until I invoke them.

This is my mode of debugging:

1) Make changes in new assembler code. This includes
new words, data structures and interrupt handler.
This is currently in a new file which is included at
the end of h8hforth just after the original serial
words and before the include of pbforth.asm.

2) Upload the new firmware.

3) Upload my serial debug testbench which includes
a variety of words that invoke the builtin serial
interrupt words and then interact with me via
the buttons and LCD.

4) Once the support code is downloaded I invoke my
serial debug testbench. This is a single top level
qord that never returns. Instead it is an infinite
loop that monitors the RCX buttons and invokes one
of my debug words as appropriate. The power button
invokes Ernst's new BYE word. One of the buttons
invokes a word that sets up the

My problems with IR come at step 3, i.e. before my
new code has done anything. I can duplicate the
behavior with original firmware which is a second
check on whether I have broken anything by accident.

Now I have to think about the correct place to clear
that bit. Ralph, do you think it is safe to enable
interrupts earlier?

As I said above this is a longer term issue, i.e. after
I get reliable communication via serial interrupts. For
now I just do RX_INIT first.

PS. My IR connection stinks. It is seldom that I can
upload more that 5 lines of script without at least one
error. I don't completely understand what is happening.

Is this normally, or with your serial code?

I only wish my serial code worked well enough to notice
IR quality problems.

It won't be just one bad byte. An entire string will
be wrong. My workaround is to only define words
in a script and then download several times till everything
gets defined, jiggling with the positions of RCX and
tower inbetween.

Do you have another source of IR in the room, like a security
monitor?

Nope. I also have two RCX's and the problem happens with both.
one is 1.0 and the other 1.5 so it is not likely to be a
common manufacturing defect. I also have two towers although
I haven't switch them since my last spate of problems. That
will be my next test.

It seems time of day sensitive so background IR (sun light)
is probably an issue.)

Very annoying. What is strange is that
the echo in the window is bad. This is generated by the
tower and probably has nothing to do with the RCX except
as a source of reflections. I don't understand how
reflections can cause problems. It is not like we are
dealing with current speed. IR is moving at the speed of
light (it is light) and all reflections basically get
there at the same time at 2400 baud speeds. It isn't the
normal signal broadening and overshoot that electrical
reflections cause. As far as I can guess it must be a
signal intensity problem eithor 0 or 1 or both.

Hmmm. I'd check the batteries. I use a 9V cheater that I really
should publish some pictures of...

Everytime things get really bad the first thing I do is change
all batteries, RCX and tower. I haven't noticed any difference.

NOTE: I also can't use LegOS lnpd, probably because of the
same problem. It has to be something in my computer room
that is different. I think I have eliminated everything
else. My dad might have a camera that sees infrared.
I'll have to check.



Message is in Reply To:
  RE: Major breakthrough serial wise.
 
Soirry for the late reply, I've been on a sudden business trip and was unable to get to my email... (...) Great! I would leave the basic serial stuff alone and enable interrupt driven serial IO in a separate set of words, like RCX_INIT and (...) (24 years ago, 3-Jun-00, to lugnet.robotics.rcx.pbforth)

4 Messages in This Thread:


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

Custom Search

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