Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: RE: ANNOUNCE: Rockbox emulates M-Bus car CD changer (Alpine and OEM)

RE: ANNOUNCE: Rockbox emulates M-Bus car CD changer (Alpine and OEM)

From: VanBaren, Gerald (AGRE) <"VanBaren,>
Date: Fri, 13 Feb 2004 11:15:57 -0700

Some thoughts on the Sony protocol using a UART to provide the bulk of the timing. This technique is not original, it is used as one alternative to interfacing to the Dallas/Maxim (www.maxim-ic.com) 1-wire interfaces (App Note 214)
  http://www.maxim-ic.com/appnotes.cfm/appnote_number/1189/ln/en

UARTs can typically do 8 bits and 7 data bits easily, and usually support 6 and 5 bits as well. You have to add a <start> bit, which is one bit time of zero, then 5..8 bits of data, followed by one bit time of ones known as the <stop> bit (which is identical to the gap between successive data frames.

Looking at how long in bit times 1200uSec is:
  9 bit times: 7500 baud
  8 bit times: 6667 baud
  7 bit times: 5833 baud
  6 bit times: 5000 baud

If you set your uart to 7500 baud, 1200uSec is 9 bit times (one start bit and 8 data bits). Thus, the 1200uSec "zero" will be seen by the uart as 0x00. The 600uSec "one" will be seen as 0xF8 (literally give or take a bit :-) since there will be one bit of start and then 3 bits (+/- a bit) of zeros followed by 4 bits of ones. An initialization pulse (2400uSec) will look like a <break>.

Transmitting a "zero" would consist of transmitting 0x00 and then waiting 600uSec for the inter-Sony-bit gap. Transmitting a "one" would consist of transmitting 0xF8 and then waiting 600uSec.

This assumes you can set your baud rate reasonably close to the required baud rate. Since there usually is a fair amount of tolerance built into this kind of protocol, it usually works if you are anywhere in the ballpark (7200 baud should work, 9600 might be a problem).

gvb


> -----Original Message-----
> From: rockbox-bounces_at_cool.haxx.se
> [mailto:rockbox-bounces_at_cool.haxx.se]On Behalf Of jobarjo
> Sent: Friday, February 13, 2004 12:34 PM
> To: Rockbox development
> Subject: Re: ANNOUNCE: Rockbox emulates M-Bus car CD changer
> (Alpine and
> OEM)
>
>
> > No, unfortunately the pin is not interrupt-capable. And
> this is where the
> > nice general concept collapses, sorry.
>
> Too BAD! ;-(
>
> I've read your source. Lucky that MBus encoding have fixed
> length bits.
> For the sony s-link it uses variable length pulses:
>
> http://www.undeadscientist.com/slink/encoding.html
>
> might still be possible to hack with the uart. But the BIG
> problem is that
> there is an uncertainty on the last bit value for each byte
> received. So it
> does not seems easily feasible.
>
> I dont like polling also.
>
> I will think about a solution.... or find an alpine cd pilot...
>
> Is it possible to program a 600us timer interrupt to sample
> the pin after
> the first falling edge?
>
> _______________________________________________
> http://cool.haxx.se/mailman/listinfo/rockbox
>



******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on 2004-02-13

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy