Skip to content

Commit 86053de

Browse files
author
ScrapComputing
committed
Rev 0.7: PCB with 8 preset buttons, and updated README
1 parent e5f2ba3 commit 86053de

7 files changed

Lines changed: 15109 additions & 11007 deletions

File tree

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ It is tailored to the needs of vintage PC enthusiasts, so it drives a 4-digit 7-
9191
You can connect to the Throttle Blaster via the serial port and set the Frequency and PWM Period.
9292
This is convenient for launching a game with a `.bat` file that first configures the Throttle Blaster and then launches the game.
9393

94+
# Preset Buttons (since rev 0.7 )
95+
Since revision 0.7 you can also directly select a preset by pushing one of the 8 available buttons.
96+
This functionality is compatible with all other modes of operation.
97+
98+
Please note that you don't need a Rev 0.7 PCB to use this feature.
99+
You can simply connect buttons to the Pico's GPIOs, with one button pin to the GPIO and the other to ground, see table below:
100+
101+
102+
GPIO | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 21
103+
------------|----|----|----|----|----|----|-----|-----
104+
Freq (MHz) | 4 | 8 | 10 | 25 | 33 | 66 | 133 | Max
94105

95106
## Reverse Direction jumper JP3 (since rev 0.4)
96107
Since revision 0.4 the default rotation direction of the knob has been changed and a new jumper JP3 has been added.
@@ -189,9 +200,10 @@ Jumpers | 2 | 2.54mm pitch Jumpers
189200
Q1 | 1 | 2N7000 N-channel MOSFET | Pulls down the CPU's STPCLK# pin
190201
R1 | 1 | 1K Resistor SMD 1206 | For the throttle transistor gate.
191202
R2 | 1 | 100 Ohm Resistor SMD 1206 | Between the throttle pin and the throttling transistor.
192-
RV1 | 1 (mode POT) | 10K linear potentiometer | Selects Frequency in Potentiometer mode.
203+
Pot1 | 1 (mode POT) | 10K linear potentiometer | Selects Frequency in Potentiometer mode.
193204
SW1 | 1 (mode 1Btn) | Push button | Selects Frequency in 1Btn mode.
194205
SW3 | 1 (mode 2Btn) | Push button | The right button in 2Btn mode.
206+
Preset Btns P1-P8| 8 (optional) | 1x02 (or one 8x02) male through-hole pin-header 2.54mm| Headers for the 8 preset push-buttons.
195207
SW2 | 1 (mode ROT) | Rotary Encoder with push-button, (ALPS EC11E-Switch) Vertical | Selects Frequency in Rotary mode. Note: These are widely available online using keywords like: "rotary encoder switch Arduino" and they can also be found in kits with fitting knobs.
196208
U2 | 1 | Raspberry Pi Pico |
197209
U3 | 1 | 1x04 horizontal pin header 2.54mm pitch | For connecting to the floppy power connector, for powering the unit.
@@ -239,6 +251,7 @@ So I don't think there is a way to get the Throttle Blaster to work universally
239251

240252

241253
# Change Log
254+
- Rev 0.7: Adds support for 8 preset buttons.
242255
- Rev 0.6: Firmware bug fixes: (i) fix saving MHz/Period adjustments to flash and (ii) one-button mode frequency glitch.
243256
- Rev 0.5: Replaces potentiometer capacitor with SMD and several firmware fixes.
244257
- Rev 0.4: Reverses knob direction and adds jumper JP3 for selecting direction.

firmware/src/CommonLogic.cpp

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,28 @@ void CommonLogic::presetBtnsTick() {
125125
else
126126
// The last preset always sets max frequency.
127127
Presets.cycleMax();
128+
int NewKHz = Presets.getActualKHz();
129+
int NewPeriod = Presets.getPeriod();
130+
DBG_PRINT(std::cout << "NewKHz=" << NewKHz << " NewPeriod=" << NewPeriod
131+
<< "\n";)
132+
DC.setKHz(NewKHz);
133+
DC.setPeriod(NewPeriod);
134+
DBG_PRINT(DC.dump();)
128135
break;
129136
}
130137
default:
131138
break;
132139
}
133140
};
134-
for (int BtnIdx = 0, E = (int)PresetBtns.size(); BtnIdx != E; ++BtnIdx)
135-
HandleBtn(PresetBtns[BtnIdx], BtnIdx, /*IsLast=*/BtnIdx == E - 1);
141+
142+
switch (CurrMode) {
143+
case Mode::Presets:
144+
case Mode::Manual:{
145+
for (int BtnIdx = 0, E = (int)PresetBtns.size(); BtnIdx != E; ++BtnIdx)
146+
HandleBtn(PresetBtns[BtnIdx], BtnIdx, /*IsLast=*/BtnIdx == E - 1);
147+
break;
148+
}
149+
default:
150+
break;
151+
}
136152
}

0 commit comments

Comments
 (0)