dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Serial remote code "STOP" (0xC2) partially not working

Re: Serial remote code "STOP" (0xC2) partially not working

From: Matthias Klumpp <>
Date: Sun, 21 Mar 2004 01:16:55 +0100 (MET)

> > Hardware connection is done via open-collector to the serial data pin of
> > headphones connector with negative logic.
> I assume you have this correct, as you say that most of the commands work,
> but are you sure you mean negative logic? It should be positive logic:
> 1 is o/c transistor is OFF (high voltage to input pin), 0 is transistor ON
> to input pin).

My explanation was not very correct - Sorry.
I guess it's positive logic (see below), I just wanted to say that the AJB
input stays high, when everything is disconnected (should be, because of the
pull-up inside the archos that you mentioned).

Well I did some measurements now with oscilloscope, maybe they could be
I'm still sending 9600 Bd, 8DB, 1SB, no parity.

Sending 0xC2 results in the following (measured directly at the AJB input):

start level is high (3.3V), then it goes:
200us low
110us high
410us low
then high for ever

Assuming a time grid of 100us, that would end up in:
0 0100 0011
putting it the other way round (it was LSB first)
1100 0010 0
that is 0xC2 with Stop Bit =0 (why that ?)

I tried inverting 0xC2 and sending ~0xC2=0x3D, just to see what happens:

start level is high (3.3V), then it goes:
100us low
100us high
110us low
420us high
200us low
then high for ever

Again the calculation:
0 1011 1100
other way round
0011 1101 0
that is 0x3D with Stop Bit =0

For me that seems to be perfectly good (w/o knowing the time frame for 9600
Bd and the Stop Bit=0 stuff)

> The REMOCLONE only uses 6 bits, but my remote sends 8 - from the JBR's
> point of view, there's little difference, since the two extra bits have
the same
> value as the stop bit (1). I chose to transmit 8 bits as it will allow me
> complete flexibility to define new commands should the Rockbox team
> implement new functions to control from the remote. I'm not sure how many
> bits the JBR actually receives (6 or 8). For example, I've had a request
> to implement Start Record from the remote, but there's no way to do so at
> present. However, there's nothing to stop Rockbox defining a "One-Touch
> Record" command.

I just had a look in the UART registers, but there is no way to configure
the UART for 6DB's otherwise I would have tried that :-((

> > If I'm sending the 0xC2 stop command while a file is playing, the AJB
> > does not react.
> As we've discussed offline, my remote send 0xC2 and a playing song stops
> as expected.

I suppose it's working with your Recorder (??, that's what you have, isn't
it ?).
Could there be any difference in Recorder and Studio Rockboxx ???

> > If I have backlight dimmed down, I can observe, that the backlight goes
> > That again tells me, that the AJB is receiving data, but still does not
> Without looking at the Rockbox source, it could be that the backlight goes
> on as soon as a start bit transition is received - it may not indicate
> correct reception of a command.


> Do you have the ability to tweak the bitrate of your UART? Just in case
> your timing is marginal?

Until now I never had any problems acc. to that.

Maybe my measuremenst are helping you.
Assuming 9600 Bd, what pulse widths for one bit should I get (so I'll try to
tune the uC's baud rate generator) ?


Sent by: Matthias Klumpp
E-Mail :
ACHTUNG  : Diese E-Mailbox wird nur einmal wöchentlich gelesen !
ATTENTION: This E-Mail account is read only once a week !
ATENCAO  : Este box e-mail será lido apenas uma vez por semana !
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos:
Received on 2004-03-21

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