Jump to content

Talking To an Externally Connected (To Lpc Port) Device Over the Smbus?


Recommended Posts

So my friend and I are trying to replace the front panel LEDs with RGB LEDs using a separate microcontroller.
We were able to read the status from the current front panel so we can react to error codes properly, so it isn't just a "dumb" LED replacement with an external controller. 

Our next goal was to send commands over the SMBus to the Arduino (Nano, ATmega328P) we use to control the RGB LEDs. I customized the XBMC code to send data to the new address I defined for the Arduino, in our case we used 0xE9. Since the Wire library of the Arduino already shifts the bits, we set the Arduino's address to 0xE9 too. 
The thing is, the Xbox sends the signal, but the Arduino isn't reacting to the given address. We already tried to analyze the signal and we can confirm that there is data being sent through the SMBus. OFC we wired up SDA and SCL correctly, we checked twice and since the logic analyzer is able to sniff data, it should be correct.

Has anyone ever tried this yet? I've seen a couple of threads talking about controlling Ambilight over the SMBus but it seems like nobody has tried it yet. I guess we are doing something wrong, but we haven't yet figured out what it is that we are missing. Next thing would be buying a proper logic analyzer, but maybe somebody here has some experience and could lead us in the right direction before we spend the money. 

Is there any more documentation on the SMBus of the Xbox out there? I've just found the documented stuff on the xboxdevwiki. 

Thanks in advance!

Edited by shawly
  • Like 1
Link to post
Share on other sites

Yeah, but the LCD mod for the Aladdin only reads data from existing devices.

My goal is to register a new slave on the SMBus so we can send data to it. Which in theory should work, but in reality it doesn't, at least not like we expected. We ordered a proper logic analyzer now and we'll debug again this weekend, maybe we can find out more. I guess the problem is that the hardware address we set on our Arduino is wrong and that the real address is shifted further than one bit like the xboxdev wiki says.

  • Like 1
Link to post
Share on other sites

It could be that the actual address is 1 off of what your Arduino is expecting.  I recall something from an old robotics project about the Arduino's address being off by 1.  Try to send data to either address 0xe8 or 0xea.  I could be completely off here.  I've not used an Arduino for several years or have the source to look at the old project notes anymore.  Or, do I, ...hmm..., is that dropbox account still active. 

0xE9 = 1110 1001

But,...

I thought the SMBus/I2C only used 7-bit addressing (128 devices addressable - 0x00-0x7F). Where's 0xE9 fit?

See: https://www.totalphase.com/support/articles/200349176-7-bit-8-bit-and-10-bit-I2C-Slave-Addressing

 

Link to post
Share on other sites
4 hours ago, KaosEngineer said:

I thought the SMBus/I2C only used 7-bit addressing (128 devices addressable - 0x00-0x7F). Where's 0xE9 fit?

 

That could actually be the issue here, we only tried 8 bit addresses.. And we were wondering how it's possible to set the read and write bit when our address is 8 bit, oh god...

Edit: Just remembered we also tried 0x5A and I just talked to my friend and he knew about the Arduino being one bit off so he corrected it and it still didn't work. But are there any other steps necessary to put the Arduino into slave mode other than calling Wire.begin(<address>)?

Edited by shawly
Link to post
Share on other sites

 

12 hours ago, shawly said:

But are there any other steps necessary to put the Arduino into slave mode other than calling Wire.begin(<address>)?

Of that I'm not sure.  The project I worked on used the Arduino as the MASTER device all the time.

I see the 7-bit's in the address are shifted one bit to the left.  The LSB of the byte sent is the Read/Write control bit.

A6-7 A5-6 A4-5 A3-4 A2-2 A1-2 A0-1 R/W-0 - Address Byte Bit Usage - Bit position

 

Link to post
Share on other sites
  • 2 weeks later...

We did it. The problem was our hardware, after looking at the datasheet of the ATmega 328P we noticed that the HIGH voltage for the I2C is Vcc*0.7 and the Arduino was powered with 5V over USB.

After that we tried an ESP8266, which also was a fail since it doesn't have hardware I2C and the software implementation is too slow. Hence we bought an ESP32 devkit and we finally got it working!

We are now able to change between LED modes solid and cycle and we can control the colors for solid. 😀
Next step would be designing a new PCB to replace the front panel completely and to easier integrate the ESP. Last thing would be adding a separate web interface so it can be controlled via smartphone.

IMG_20190802_201909.jpg

IMG_20190802_201903.jpg

  • Like 3
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By AtariSoul
      Hello All
      I bought a faulty chipped 1.6 off of ebay.
      I removed the LPC rebuild board and I notice a pulled contact. I think I've managed to retrace it, I checked continuity and it was OK and it booted! See attached picture.
      I don't want to use the rebuild board but I am going to do a wire rebuild.
      There are lots of pcitures around with various wire rebuilds. Some use slightly different wiring and state a rebuild for Aladdin or Xenium. Are all rebuilds all the same for every modchip, so I can follow any of them?
      Also, I am quite nervous of trying this as it took a lot of patience to do the retrace. Should I use a glue gun or polyimide film tape to make sure the retrace doesn't come loose or am I tempting fate and should just leave it alone?
      Are there any points I could use instead? 
      Thanks in advance
      AtariSoul
       
       

    • By calebTree
      I grabbed a Kernel file from this page and I flashed it with XBlastOS.
      Does the kernel have to match the original kernel? 
      What is the kernel relative to the BIOS? Normally kernel and BIOS are two very different components of a computer. I shouldn't have been able to flash the TSOP with the kernel correct?
      How are those kernels meant to be used?
      I was looking for the default BIOS.
      Thanks
       
    • By Wyverino
      Hey guys, Wyverino here
       
      I am fairly new to the xbox modding scene. My gf just gifted me an old premodded 1.1 for christmas and I love it so far. I just want to tweak it a little more to make it my hopefully favorite console! 
       
      Wish all of you guys a happy new year! 

Board Life Status


Board startup date: April 23, 2017 12:45:48
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.