Hey guys,
this is going to be a very long and detailed post because I would like to make myself clear as possible. No cliff notes
I am trying to integrate the navigation controls from the Mazda RX-8 into my setup. I have the unit and I've figured out a sort of pinout of the connector:
Code:
Mazda RX-8 Car Navigation Switch Pinout
O M K I G E C A
* * AA BB PWR * * *
* * BUS ILL GND * * *
P N L J H F D B
PWR = Power +12V
GND = Ground
ILL = Illumination (+12V)
BUS = Data Bus
AA = Unknown (Always High)
BB = Unknown (Always Low)
With this information, I put the data bus on my logic analyzer and got these waveforms:

This is a full data transaction.
Line goes low for ~9ms, then high for ~4.5ms. There is a .5ms pulse between each "bit". The longer "bit" (which i guess is 1?) is ~1.5ms (so 3 times the timing pulse...). The shorter "bit" is .5ms also.
After decoding all the keys ive come up with this: (does not include the ~9ms low, ~4.5ms high part)
Code:
Control
/-------------------------------------------------------------|
|Menu Button - 1000 0001 0101 0111 0011 0000 1100 1111|
|Voice Button - 1000 0001 0101 0111 0111 0000 1000 1111|
|Ret Button - 1000 0001 0101 0111 1001 0000 0110 1111|
|Pos Button - 1000 0001 0101 0111 1011 0000 0100 1111|
|Zoom-in Button - 1000 0001 0101 0111 1101 0000 0010 1111|
|Zoom-out Button - 1000 0001 0101 0111 0101 0000 1010 1111|
|Enter Button - 1000 0001 0101 0111 0001 0000 1110 1111|
|Joystick Up - 1000 0001 0101 0111 1100 0000 0011 1111|
|Joystick Down - 1000 0001 0101 0111 0000 0000 1111 1111|
|Joystick Left - 1000 0001 0101 0111 0100 0000 1011 1111|
|Joystick Right - 1000 0001 0101 0111 1000 0000 0111 1111|
|Joystick Up+Left - 1000 0001 0101 0111 0110 0000 1001 1111|
|Joystick Up+Right - 1000 0001 0101 0111 1110 0000 0001 1111|
|Joystick Down+Left - 1000 0001 0101 0111 1010 0000 0101 1111|
|Joystick Down+Right - 1000 0001 0101 0111 0010 0000 1101 1111|
\-------------------------------------------------------------/
In addition, I came across this site:
http://mazda.davidoshea.homelinux.net/radio/bus.html
which documents decoding the Mazda3 Radio bus. While similar, this Mazda3 bus is more variable PWM (bit+pulse always = constant timing, whereas with this bus, bit+pulse could either be 1ms - 2ms). It seems to definetly have some sort of protocol going on here. Which *kinda* maps up to the protocol shown on the Mazda3 radio page.
I've been googling for some time to see if this pattern matches up something already existing. I can't seem to find anything to help make this easier.
For right now, I'm just trying to get this data nicely into a PIC.
Here is some pseudocodish stuff ive come up with:
Code:
check if bus is low, if not wait
bus low? yes, now wait till it goes high again...
bus high? k now wait the 4.5 ms and go into bit collecting routine:
bit collecting
wait .5ms
bus high? add to counter
wait .5ms
bus high? add to counter
bus low? drop out (counter would be 1 if bit was low)
wait .5 ms
bus high? add to counter (counter would now be 3 if the bit was high)
bus low? drop out
wait .5ms
bus high? drop out (it shouldnt be high for 2ms)
decrease counter, skip next command if zero (if its a LOW bit, next command will be executed...)
move 0 bit into variable
move 1 bit into variable
go back to bit collecting
im sure some timing things have been left out but this is the best ive come up with at the moment that seems like it should work kinda okay. I wanted to post this up here and ask for any help or guidance on this little project if anyone is interested. I'm fairly intermediate with PICs, I've done some work with I2C and RS232, so dont be afraid to just throw stuff out there without having to hold my hand.
Thanks for any help or info you could provide,
bryan