spi4teensy3 and 74hct595 shift registers
Look at this godawful mess. Look at it.
It’s a few surface-mount 74HCT595s chained from a Teensy 3.6, and it took me too long to work out why it wasn’t working.
More to remind myself as much as anything – don’t declare the clock and data pins as output pins. Like this:
void setup() {
spi4teensy3::init();
pinMode(10, OUTPUT); // attached to pin 12 of the 595
pinMode(13, OUTPUT);
pinMode(11, OUTPUT);
}
Nooooo. ‘Cos then it doesn’t work.
This’ll do the trick – Teensy pin 10 is acting as our slave select pin in this case:
void setup() {
spi4teensy3::init();
pinMode(10, OUTPUT); // attached to pin 12 of the 595
}
And then the lights come on, kaboom.
Here’s some panicky twiddling of a BCR2000 talking to a DIY monosynth through the above mess (plus a bonus DAC). Pitch and gate currently isn’t MIDI’d up but I’ll get there.
The synth bit sounds way better since I sorted the sawtooth waveform out and tracked down the resistor that was out by a factor of 100 in the filter… everything sounded like RAHHHHHHHMAXVOLUMERAHHHH all the time until I chopped that out. And not in a good way.
With lots of parameters being voltage-controlled, maybe it could have presets and a way to edit those sounds and extra software-generated LFOs and envelopes and MIDI program changes and a pony. It’ll be fun working out how on earth to actually do that.