Jump to content


Photo

[wip] Ultimate Xbox Ir Module (uxir) & Homebrew Ir Keyboard


  • Please log in to reply
4 replies to this topic

#1 Noobacide

Noobacide

    X-S Enthusiast

  • Members
  • 11 posts

Posted 19 June 2006 - 12:27 AM

I've just gotten into working on PIC microcontrollers, and have made what I'm going to call the "Ultimate Xbox IR Mod" or UXIR for short.
Unlike the other ir modules which only handle power / eject, my module even replaces the dvd remote sensor for use with XBMC ( yet to be implemented on the XBMC side ).

Basically it works like this:
if the xbox is off, the module waits for a power on sequence (user changeable).
If the xbox is on, but the module hasn't been polled in 15 seconds or more, and the power off button is pushed, then it turns the xbox off.
in all other cases it forwards the ir code to the xbox via the i2c bus. (the UXIR is an i2c slave)
using very simple i2c commands any program can poll it for ir codes.

Sample code for reading any available ir codes.
CODE

int c;
i2c_write(UXIR_DEV, UXIR_QUERY);  // Any codes queued?
c = i2c_read(UXIR_DEV);     // Read response

while(c) {
  i2c_write(UXIR_DEV, UXIR_RETR);   // Send me the first code

  type = i2c_read(UXIR_DEV);
  codehi = i2c_read(UXIR_DEV);
  codelo = i2c_read(UXIR_DEV);

  handleir(type, (codehi << 8) | codelo);

  c--;
}


Sample code for setting the power on/off code
CODE

i2c_write(UXIR_DEV, UXIR_SETPWR);  // Change the PowerOn code
i2c_write(UXIR_DEV, type);
i2c_write(UXIR_DEV, codehi);
i2c_write(UXIR_DEV, codelo);


So far I've got the PIC recognizing several types of remotes, and outputting the ir codes via RS232 (debugging) and I2C. I plan to finish up the code very soon and release the firmware & schematics.


My other current project is to take a cheap PS/2 keyboard, and turn it into an IR keyboard for use with XBMC and Windows Media Center. Right now it depends on someone dumping the IR codes from MS's $70 keyboard or another ir keyboard for media center.

Anyone have a Media Center keyboard they want to

#2 pablot

pablot

    X-S Freak

  • Moderator
  • PipPipPipPipPip
  • 1,275 posts
  • Location:Sweden
  • Xbox Version:v1.6
  • 360 version:none

Posted 19 June 2006 - 05:34 AM

Hi,

nice idea! The fact is that I had just the same idea, I've just been too lazy to actually test it. A problem that might exist is that the i2c bus is montiored and that the PIC will panic and shut the xbox off if it sees traffic that it doesn't like. But I don't think that is the case. What would need to be done is just a small code in xbmc that polls the i2c bus once in a while (every few ms) and ask for new key presses. Shouldn't be harder than that. The ir reciever can then simply forward it's code when asked! I might try it out myself this weekend if I get some time (doubt it.)

/pablot

#3 Noobacide

Noobacide

    X-S Enthusiast

  • Members
  • 11 posts

Posted 19 June 2006 - 02:33 PM

The system pic ignores all traffic not directed at it. I was informed that the X3 chip uses the I2C bus, so my only concern is finding what address they use so my firmware doesnt conflict with their use of the bus.

Spent the past 2 hours today working on the code.

Edit:
And your sig gave me an idea for addon code to do led control. Make our own 4 segment ring of light for original xbox owners.

Edited by Noobacide, 19 June 2006 - 02:35 PM.


#4 fisix

fisix

    X-S Enthusiast

  • Members
  • 24 posts

Posted 19 June 2006 - 11:41 PM

some things to consider:

if you could instead tie it to a key/lever sequence of a wireless game controller, that would very interesting. most of the adjustments you can do in xbmc are available with a game controller, and a user would only need the controller to do everything.

anyway, replacing the xbox dvd remote is a nice benefit. one mod for $19-25 instead of a mod and the xbox remote for $40-50.


#5 Noobacide

Noobacide

    X-S Enthusiast

  • Members
  • 11 posts

Posted 20 June 2006 - 06:12 PM

Currently I'm worried that the I2C interrupts might overlap when an IR event occurs causing some lost input.
I'll have to do some in-system testing to see what the odds are of this happening.
I'm thinking its about 3% chance or less.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users