-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocoldecode
122 lines (104 loc) · 3.8 KB
/
protocoldecode
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
M(P) Bus Lines
All lines have 5V levels.
BCLK Clock. Bidirectional, idle high. Timing 20-30us per bit, 3-8ms between bytes
BDATA Data. Bidirectional, idle high. Data changes at clock negative edge. 8 bit, transmitted LS bit first
BRST Reset. Unidirectional, idle high. Pulled low by head unit for about 0.5s at startup, before any
other bus activity and again when power to head unit is off
BSRQ Service request. Unidirectional, idle high. Asserted at startup by peripherals (CD or tape) needing
attention. Then while a peripheral is playing may be asserted at 0.5 - 1 second intervals. Head
unit does not poll peripherals at startup so if SRQ not asserted will assume none are present.
BRXEN Receivers Enable. Bidirectional, idle high. Pulled low by talker when sending each byte
Messages from / to head unit
First 2 bytes are message type and number of bytes in rest of message. Thus each message is a minimum of
2 bytes.
Type
00 status when system off?
01 head unit status?
03 command to tape?
06 command to CD
21 command to dashboard
60 status from CD (not playing)
61 status from CD (playing)
71 status from tuner
Status (01)
01 Type
03 always 3 bytes
p1 bit 4 appears to be power flag: off=1
0s source: 0=off, 6=cd, 7=tuner
00,02,04
to tape (03) 1st message in response to SRQ, probably to determine if there's a tape
03 Type
00 No more bytes
to CD (06) 1st message in response to SRQ, probably to determine if there's a cd
06 Type
00 No more bytes
to CD (06)
06 Type
01 always 1 byte
cc command: 00=statusreq, 06=play, 16=stop, 26=track+, 27=track-, 28=toggle random, 3d=change disc to d,
f0=?, f6=? these 2 appear only at start up, ff=reset
to dashboard (21)
21 Type
08 always 8 bytes
00
0d Display type: 0=normal, 1=cd selector, 2=bass, 3=treble, 4=balance, 5=fade, 6=volume
vv volume, hex 00-1E
30
00
00
00
00 value
from CD (60) response to first message (06 00) and reset command (ff). Head unit will send reset at power off
60 Type
01 always 1 byte
1c bit 3 is cd magazine presence, bit 4 is acknowledge. if b4=0 the head unit will reset again
from CD (60) response to status request (00) when not playing
60 Type
02 always 2 bytes
0c bit 3 is cd magazine presence
ss previous state of cd: 11=off, 12=no magazine, 00=playing
from CD (60) response to f0 command (only occurs at startup)
60 Type
03 always 3 bytes
1c bit 3 is cd magazine presence, bit 4 is acknowledge
ss previous state of cd: 11=off, 12=no magazine, 00=playing
01 ?, always the same
from CD (60) response to f6 command (only occurs at startup) if not playing, otherwise 61 response as below
60 Type
02 always 2 bytes
1c bit 3 is cd magazine presence, bit 4 is acknowledge
ss previous state of cd: 11=off, 12=no magazine, 00=playing
from CD (61) response to any command when playing
61 Type
0A always 10 bytes
ss command status: 08 normally, 18 to acknowledge command (not status), 48 when changing track
SS State: 00=stopped, 01=paused, 02=reading disc, 03=changing track, 04=playing, 07=buffer filling, 11=changing disc
Fd d = disc number 1-6
mm Track time minutes, BCD. FF if not relevant
ss Track time seconds, BCD. FF if not relevant
tt Track number, 1-99, BCD. FF if not relevant
00
3F ?, always the same
dd Discs present (bits): 0 : 0 : disc6 : disc5 : disc4 : disc3 : disc2 : disc1
00
from tuner (71)
71 Type
0A,12 10 bytes if no RDS name, 18 otherwise
00
10,11,12,13,16 appears to be some indication of lock
fl frequency bcd coded FM: 100's MHz, F=blank | tuner list in use: 1,2,3 for FM, D for LW
ff frequency bcd coded FM: 1's | 10's MHz, LW: 1's | 10's kHz
0f frequency bcd coded FM: 0 | tenths MHz, LW: ?
pp preset number 01-06
01
04,14 bit4=RDS present?
00,34
00
nn RDS station name char 1, ascii, hex
nn char 2
nn char 3
nn char 4
nn char 5
nn char 6
nn char 7
nn char 8