To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 240
239  |  241
Subject: 
Re: Blocking IR
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sun, 20 Jun 1999 13:34:55 GMT
Viewed: 
3567 times
  
Thanks for your help but I think I might have a broken RCX. The code I've been
testing and the examples you have help me with all work if I place the light
sensor about 2 mm from the IR transmitter. At about 2cm it no longer works at
all.

I have tried setting the IR transmitter power with:

*((unsigned char*)0xffb7)&=~0x01;


Any  ideas, could I post the .srec file and see if it works on any other units?



Thanks,

Phil Mack.




In lugnet.robotics.rcx.legos, Kekoa Proudfoot writes:
> Regarding your program.  Try sending 0s, not xs, i.e.:
> 
> char *buffer = "\0\0\0\0\0";
> 
> Zeros are coded with the IR on 91% of the time, while xs are coded with the
> IR on only 45% of the time, neglecting the modulation, which cuts that all
> down by half.
> 
> Also, five characters takes 23 ms to send, but you wait for 100 ms, so you
> cut down your average IR output by another factor of 23/100.  Try:
> 
> result = dir_write(buffer, sizeof(buffer));
> 
> Which blocks for exactly the right amount of time.
> 
> If all you want to do is make the IR light in the RCX turn on, all you
> really need to do is set the IR transmit pin to output low:
> 
> *(char *)0xffb8 = *(char *)0xfd84 |= 1; /* Set port 5 bit 0 to output */
> *(char *)0xffb6 &= ~1; /* Set port 5 bit 0 to low */
> 
> Note the update of the ROM shadow register, 0xfd84.  I'm pretty sure LegOS
> has symbolic names for these registers, but I do not know them.
> 
> Also, the serial interface must have transmission off, but this is the
> default if you are not sending anything using the serial interface (by
> using e.g. dir_write).
> 
> To turn the IR off and make dir_write work again:
> 
> *(char *)0xffb8 = *(char *)0xfd84 &= ~1; /* Set port 5 bit 0 to input */
> 
> I haven't tested any of this code specifically, but previous tests and
> notes I have indicate that setting port 5 bit 0 to output low turns on the
> IR light all the time, jamming transmissions.  This is what you want, no?
> To be able send IR continuously so you can detect it with the light sensor?
> 
> -Kekoa



Message has 1 Reply:
  Re: Blocking IR
 
(...) I doubt you have a broken RCX. If you did, firmdl.c would not download firmware correctly. (...) That is a good thing to try; I suppose it did not help things? (...) I don't see why you couldn't post the .srec file. I don't know if you also (...) (27 years ago, 20-Jun-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: Blocking IR
 
Regarding your program. Try sending 0s, not xs, i.e.: char *buffer = "\0\0\0\0\0"; Zeros are coded with the IR on 91% of the time, while xs are coded with the IR on only 45% of the time, neglecting the modulation, which cuts that all down by half. (...) (27 years ago, 16-Jun-99, to lugnet.robotics.rcx.legos)

12 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
    

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