I'm planning on using my Raspberry Pi in my car as an XBMC server. I'll be able to select songs/videos using the Android remote control app, but it occurred to me that it would be really neat if I could control XBMC using the CD player controls.
I drive a Toyota Tarago and have the stock CD player which can connect to a CD changer using AVC-LAN (similar to IEBus). The CD player head-unit allows you to select the disc, file and track. I think it would also allow you to "seek" back and forward within the song/movie.
I've seen a few sites that use various PICs together with CAN transceivers and comparators. Does anybody have any experience with using a Pi to communicate on the IEBus directly? The Pi has I2C, SPI and UART - would any of these be suitable?
According to this document I would need timing resolution down to the microsecond (might have a tolerance of 1 or 2 microseconds). I can't bit-bash using the GPIO because test results I've seen show that even with CONFIG.PREEMPT_RT defined in the kernel, when you request a 100us sleep, a C program will actually sleep anywhere between 12 to 282us.
I figure that I should be able to format a char and send via UART/SPI/I2C. Basically I need to drive the line (and ultimately read from the line):
- high for 7us
- low for 20us
- high or low for 13us depending on the bit value.
I think that I should be able to make something like this, substituting the AtMega8 with a RPi to drive the PCA82C250