If things go as I hope, the following will take an iPod with it’s serial RX line connected to RB0 and skip it forward one track when the tactile switch RA0 on my dev board is pressed:
program ipod_next_track_test
dim buttonstate as byte
Soft_Uart_Init(PORTB, 1, 0, 9600, 0)
main:
while true
if Button(PORTA, 0, 1, 1) then
buttonstate = 255
end if
if buttonstate and Button(PORTA, 0, 1, 0) then
Soft_Uart_Write(0xFF 0x55 0x03 0x02 0x00 0x08 0xF3)
buttonstate = 0
end if
wend
I just have to make an appropriate cable and I can test it. (The one I had made broke.)
Now, if that works I can get to work on making the EUSART on the chip respond to the Honda Music Link with enough intelligence to make it think that an iPod is present.
Then, if that works I can get to work on making some of the commands received from the HML act as the aforementioned button press, and I’ll have negated the function crappyness of the HML.
After that point I can make up a cheesy little PCB for the circuit and a PIC16F688 (the smallest PIC I could find with an EUSART) to sit permanently in the car. It shouldn’t need much more than the PIC, a crystal (because I’m not sure the mikroElektonika stuff can set the frequency on the internal oscillator), either a LM78L05 or small switching regulator, headers for the DIN connector cables, and a couple of caps. If I’m bored enough I might even make it my first SMT board.