To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 1771
1770  |  1772
Subject: 
Re: librcx & interrupt handler
Newsgroups: 
lugnet.robotics.rcx
Date: 
Wed, 28 Aug 2002 19:17:25 GMT
Viewed: 
2387 times
  
Cédric Meuter <Cedric.Meuter@ulb.ac.be> wrote:
Well, at the moment, I'm looking into writing a very basic set of
functions for IR messaging. The "send" is already present in librcx, but
for the "recieve" function, instead of actively waiting for an incoming
message (things like "while (1) { if (message_waiting()) do_something()
}"), I'd like to set up a handler that would copy the message in some
buffer I could check later on in the program... I'm not (not yep
hopefuly) familiar with the RCX (H8/3292) architecture, but I suppose
there must be an interrupt linked to the IR port...

The ROM already supports a buffer size of 1 if that is enough for you.  The
ROM receives a message asynchronously into that buffer, and you can check
it whenever you like and respond accordingly.

The code I linked to should help you with buffer sizes greater than 1, as
should the ROM pseudocode.  There is an interrupt when a byte is received
on the H8's serial input, so that interrupt is basically a state machine
that receives entire messages one byte at a time.  There is also an
interrupt that happens on serial errors (maybe just parity check, I forget)
that clears the input buffer and resets the state machine.

Anyways, you should be able to figure it out.  If you don't have it
already, find yourself the proper H8 hardware reference manual.  I can give
you a link if you don't have it and can't find it.

-Kekoa



Message has 1 Reply:
  Re: librcx & interrupt handler
 
hi, I have another question about interrupt handlers. I would like to know how (if it is possible) I could call the ROM OCIA handler. The reason is that I would like to execute a small task periodicaly but if I simply redirect the OCIA handler (...) (22 years ago, 29-Aug-02, to lugnet.robotics.rcx)

Message is in Reply To:
  Re: librcx & interrupt handler
 
Hello, First, thanx for your answer, I'll be looking at the code and link you mentioned, today, it may very well answer the question I have... (...) everyone, (...) (URL) (...) programs for RCX, and up till now it works (...) like to set my own (...) (22 years ago, 28-Aug-02, to lugnet.robotics.rcx)

7 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