To demonstrate some of the new commands from the new firmware 5.2, we interfaced the DE-DP014 from Sure-electronics. This is a single, SPI-like controllable 1.8″ single 5×7 dotmatrix. It has an on-board PIC controller which stores a special ASCII font. The package consist of two units, a simple demo board and two 10-pin cables. Sure provides a decent manual, which is only downloadable from their store.
The DE-DP014 has two 10-pin shrouded headers to provide power, brightness control, data-in, data-out, and clock. The top header is the input and the bottom one the output. Up to 20 units can be daisy chained (according to the manual, we don’t earn enough to buy such an amount!).
Bus Pirate v3a Firmware v5.2 (r422) Bootloader v4.1 DEVID:0x0447 REVID:0x3043 (B5) http://dangerousprototypes.com HiZ>
We used an external power supply to power the device. The manual states the maximum power draw is 500mA, the Bus Pirate only can supply up to 160mA, so we didn’t dare to use it. On the back there are extra power supply connections. Next we connected the MOSI, CLK and GND to the unit. We also connected AUX to the dimmer input. We double checked the connections and powered everything up.
HiZ> m 1. HiZ ... 7. 3WIRE 8. KEYB 9. LCD x. exit(without change) (1)> 7 Set speed: 1. ~5KHz 2. ~50KHz 3. ~100KHz 4. ~400KHz (1)> 2 Select output type: 1. Open drain (H=Hi-Z, L=GND) 2. Normal (H=3.3V, L=GND) (1)> 2 Ready. 3WIRE>
We switched into raw3wire mode.
HiZ> m 7 2 2 R3W (spd hiz)=( 1 0 ) Ready. 3WIRE>
Alternatively we could use the shorthand form (not for the fainthearted!) to switch modes.
Always be sure to check if the settings are OK. The current settings should be printed before ‘Ready’. In this case speed=1 (0=5KHz, 1=50KHz, 2=100KHz, 3=400KHz) and HiZ=0 (0=off, 1=on). The settings are printed like they are in the code!
3WIRE> L MSB set: MOST sig bit first 3WIRE>
The manual stated that the data should be MSB first (this is why we can’t use the hardware SPI module).
<pre>3WIRE> g 100 50 PWM active 3WIRE>
Also the dimmer input should have a PWM signal (or just a ‘1’) to display anything, we used a 100KHz with 50% duty-cycle.
3WIRE> "?" WRITE: "?" 3WIRE>
Note that we used the concatenated version of this command and now finally we got to the point to display something! We’re gonna use a new feature of the v5.x firmware to easily display text strings. We introduced the ” command which send the string one-byte-a-time to the bus.
Say Cheese! Actually we wanted to show a ! but it was too hard to see on the pictures.
3WIRE> "STOP" WRITE: "STOP" 3WIRE>
BTW we wonder what will happen if we installed four of these in our car and issued this command.