Subversion Repositories svn.mios

Rev

Rev 914 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
859 tk 1
$Id: README.txt 1206 2016-01-01 17:08:59Z tk $
2
 
3
BLM_SCALAR Firmware
4
===============================================================================
5
Copyright (C) 2009 Thorsten Klose (tk@midibox.org)
6
Licensed for personal non-commercial use only.
7
All other rights reserved.
8
===============================================================================
9
 
10
A precompiled binary is already part of this package:
11
   o project.hex (can be loaded into MIOS Studio)
12
 
13
Following tools are required to recompile the code:
14
   o SDCC
15
   o gputils
16
 
17
The details are described under
18
   http://www.midibox.org/dokuwiki/application_development
19
 
20
===============================================================================
21
 
22
Required hardware:
23
   o one MBHP_CORE module
910 tk 24
   o a MBHP_BLM_SCALAR system with up to 320 buttons and Duo-Colour -LEDs
25
   o optional: up to 8 pots or faders
859 tk 26
 
27
===============================================================================
28
 
29
 
910 tk 30
!! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !!
31
 
32
Since this application supports faders/pots connected to J5,
33
all unusused analog inputs (J5.A0..J5.A7) have to be connected to ground!
34
 
35
If analog inputs are open (neither connected to a fader/pot nor to ground),
36
random CC events will be generated!
37
 
38
!! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !! IMPORTANT !!
39
 
40
 
41
 
1206 tk 42
===============================================================================
43
Prebuilt firmware variants
44
 
45
Manually configured in Makefile by changing the BLM_AIN_NUM_PINS and BLM_AIN_PIN_MAP
46
switches:
47
 
48
  o project_without_ain.hex            -> without AIN enabled (use this if J5 pins not connected to ground)
49
  o project_with_4_mapped_ains.hex     -> for Laticid On's BLM PCB layout, only 4 faders used
50
  o project_with_4_unmapped_ains.hex   -> AIN pins are mapped 1:1
51
  o project_with_8_mapped_ains.hex     -> for Laticid On's BLM PCB layout if 4 faders + 4 extension AINs are used
52
  o project_with_8_unmapped_ains.hex   -> AIN pins are mapped 1:1
53
 
54
===============================================================================
55
 
56
 
910 tk 57
MIDI Protocol
58
~~~~~~~~~~~~~
59
 
60
  All numbers in hexadecimal format!
61
  <row>: 0..F (coded into MIDI channel)
62
  <column>: 00..0F (Note Number)
63
  <button-state>: 00: depressed, 7F: pressed
64
  <colour>: 00: off, 20: green colour only, 40: red colour only, 7F: all colours
65
  <fader>: 00..0F (coded into MIDI channel)
66
 
67
 
68
Sent fader events:
69
+---------------------------------------+-----------------------------------+
70
| up to 8 faders connected to J5        | B<fader> 01 <value>               |
71
+---------------------------------------+-----------------------------------+
72
 
73
 
74
Sent button events:
75
+---------------------------------------+-----------------------------------+
76
| BLM16x16 Buttons                      | 9<row> <column> <button-state>    |
77
| Extra column buttons                  | 9<row> <40+column> <button-state> |
78
| Extra row buttons                     | 90 <60+column> <button-state>     |
79
| Additional extra buttons (e.g. Shift) | 9F <60+function> <button-state>   |
80
+---------------------------------------+-----------------------------------+
81
 
82
 
83
Received LED events (single access):
84
+---------------------------------------+-----------------------------+
85
| BLM16x16 LEDs                         | 9<row> <column> <colour>    |
86
| Extra column LEDs                     | 9<row> <40+column> <colour> |
87
| Extra row LEDs                        | 90 <60+column> <colour>     |
88
| Additional extra LEDs (e.g. Shift)    | 9F <60+function> <colour>   |
89
+---------------------------------------+-----------------------------+
90
 
91
 
92
BLM16x16 optimized LED pattern transfer (prefered usage):
93
+-----------------------------------------------+---------------------+
94
| column LEDs 0..6, green colour, 8th LED off   | B<row> 10 <pattern> |
95
| column LEDs 0..6, green colour, 8th LED on    | B<row> 11 <pattern> |
96
| column LEDs 8..14, green colour, 16th LED off | B<row> 12 <pattern> |
97
| column LEDs 8..14, green colour, 16th LED on  | B<row> 13 <pattern> |
98
+-----------------------------------------------+---------------------+
99
| column LEDs 0..6, red colour, 8th LED off     | B<row> 20 <pattern> |
100
| column LEDs 0..6, red colour, 8th LED on      | B<row> 21 <pattern> |
101
| column LEDs 8..14, red colour, 16th LED off   | B<row> 22 <pattern> |
102
| column LEDs 8..14, red colour, 16th LED on    | B<row> 23 <pattern> |
103
+-----------------------------------------------+---------------------+
104
 
105
 
911 tk 106
BLM16x16 optimized LED pattern transfer with 90 rotated view
912 tk 107
(rows and columns swapped, LSB starts at top left edge!)
108
+--------------------------------------------+------------------------+
109
| row LEDs 0..6, green colour, 8th LED off   | B<column> 18 <pattern> |
110
| row LEDs 0..6, green colour, 8th LED on    | B<column> 19 <pattern> |
111
| row LEDs 8..14, green colour, 16th LED off | B<column> 1A <pattern> |
112
| row LEDs 8..14, green colour, 16th LED on  | B<column> 1B <pattern> |
113
+--------------------------------------------+------------------------+
114
| row LEDs 0..6, red colour, 9th LED off     | B<column> 28 <pattern> |
115
| row LEDs 0..6, red colour, 9th LED on      | B<column> 29 <pattern> |
116
| row LEDs 8..14, red colour, 16th LED off   | B<column> 2A <pattern> |
117
| row LEDs 8..14, red colour, 16th LED on    | B<column> 2B <pattern> |
118
+--------------------------------------------+------------------------+
911 tk 119
 
120
 
910 tk 121
Extra Column optimized LED pattern transfer (prefered usage):
122
NOTE: in distance to single LED access, we always sent over the same channel!
123
+--------------------------------------------+-----------------+
124
| row LEDs 0..6, green colour, 8th LED off   | B0 40 <pattern> |
125
| row LEDs 0..6, green colour, 8th LED on    | B0 41 <pattern> |
126
| row LEDs 8..14, green colour, 16th LED off | B0 42 <pattern> |
127
| row LEDs 8..14, green colour, 16th LED on  | B0 43 <pattern> |
128
+--------------------------------------------+-----------------+
129
| row LEDs 0..6, red colour, 8th LED off     | B0 48 <pattern> |
130
| row LEDs 0..6, red colour, 8th LED on      | B0 49 <pattern> |
131
| row LEDs 8..14, red colour, 16th LED off   | B0 4A <pattern> |
132
| row LEDs 8..14, red colour, 16th LED on    | B0 4B <pattern> |
133
+--------------------------------------------+-----------------+
134
 
135
 
136
Extra Row optimized LED pattern transfer (prefered usage):
137
+-----------------------------------------------+-----------------+
138
| column LEDs 0..6, green colour, 8th LED off   | B0 60 <pattern> |
139
| column LEDs 0..6, green colour, 8th LED on    | B0 61 <pattern> |
140
| column LEDs 8..14, green colour, 16th LED off | B0 62 <pattern> |
141
| column LEDs 8..14, green colour, 16th LED on  | B0 63 <pattern> |
142
+-----------------------------------------------+-----------------+
143
| column LEDs 0..6, red colour, 8th LED off     | B0 68 <pattern> |
144
| column LEDs 0..6, red colour, 8th LED on      | B0 69 <pattern> |
145
| column LEDs 8..14, red colour, 16th LED off   | B0 6A <pattern> |
146
| column LEDs 8..14, red colour, 16th LED on    | B0 6B <pattern> |
147
+-----------------------------------------------+-----------------+
148
 
149
 
150
Additional extra LEDs, optimized LED pattern transfer (prefered usage):
151
+-----------------------------------------------+-----------------+
152
| extra  LEDs 0..6, green colour, 8th LED off   | BF 60 <pattern> |
153
| extra  LEDs 0..6, green colour, 8th LED on    | BF 61 <pattern> |
154
+-----------------------------------------------+-----------------+
155
| extra LEDs 0..6, red colour, 8th LED off      | BF 68 <pattern> |
156
| extra LEDs 0..6, red colour, 8th LED on       | BF 69 <pattern> |
157
+-----------------------------------------------+-----------------+
158
 
159
 
160
 
161
SysEx Commands
162
~~~~~~~~~~~~~~
163
 
164
  o F0 00 00 7E 4E <device-id> 00 F7
165
    Request Layout Informations
166
 
167
    Returns:
168
    F0 00 00 7E 4E <device-id> 01 <num-rows> <num-columns> <num-colours>
169
       <num-extra-rows> <num-extra-columns> <num-extra-buttons> F7
170
 
171
  o F0 00 00 7E 4E <device-id> 01 F7
172
    ignored if received
173
 
174
  o F0 00 00 7E 4E <device-id> 0E F7
175
    ignored if received
176
 
177
  o F0 00 00 7E 4E <device-id> 0F F7
178
    Ping: returns F0 00 00 7E 4E <device-id> 0F 00 F7
179
 
180
 
181
Communication
182
~~~~~~~~~~~~~
183
   - host requests layout informations with F0 00 00 7E 4E 00 00 F7
184
   - this application replies with F0 00 00 7E 4E 00 01 ... F7 to send back the
185
     available number of buttons and LEDs
186
   - host updates all LEDs by sending CC events (Bn ..)
187
 
188
   - during runtime host updates LEDs that have changed whenever required
189
 
190
   - if the application doesn't receive LED pattern updates within 5 seconds,
191
     the layout information SysEx string will be sent again.
192
     This keeps the BLM up-to-date if it temporary has been disconnected from
193
     the host, and allows to implement an additional timeout mechanism at the
194
     host site to check the bidirectional BLM connection.
195
 
914 tk 196
   - in any case, each 5 seconds a Sysex string will be sent. Either the
197
     layout info, or a ping.
198
     The host is allowed to stop sending data if no SysEx strig has been received
199
     within 15 seconds.
910 tk 200
 
201
 
202
As long as no MIDI data has been received after startup, the BLM is in test mode.
203
The buttons cycle the colour of the corresponding LED:
204
   - first button press: green colour
205
   - second button press: red colour
206
   - third button press: both colours
207
   - fourth button press: all LEDs off
208
   - period
209
 
859 tk 210
===============================================================================