Skip to content

Commit b334453

Browse files
committed
Fixed some mistakes in the documentation
1 parent a14d3bf commit b334453

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

FloppyDriveController.sketch/FloppyDriveController.sketch.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
// ** Hardware Modification Changes to get the best support for disk change notifications **
4444
// Pin 34 on the floppy drive connector (Disk Ready/Change) must be connected to Pin 10 on the Arduino
45-
// Pin 12 on the floppy drive connector (Select Disk B) must be *disconnected* from pin 16 on the Arduino and connected to Pin 12. Note you *must* leave the connection between Arduino Pin 5 and Floppy Connector 16 in place
45+
// Pin 12 on the floppy drive connector (Select Disk B) must be *disconnected* from pin 5 on the Arduino and connected to Pin 11 on the Arduino. Note you *must* leave the connection between Arduino Pin 5 and Floppy Connector 16 in place
4646
// On the Arduino, connect Pin 12 to GND (0v) - this enables this advanced mode automatically.
4747
// If you can't connect pin12 to GND because you want to use the ISP headers, then see https://amiga.robsmithdev.co.uk/isp
4848

@@ -615,7 +615,7 @@ void checkWriteProtectStatus() {
615615
serialBytesInUse++; \
616616
}
617617

618-
// 12 is the minimum number here. Any less than this and the CHECKSERIAL_ONLY() code will impact the output. The pulse width doesn't matter as long as its at least 0.125uSec (its the falling edge that triggers a bit write)
618+
// 14 is the minimum number here. Any less than this and the CHECKSERIAL_ONLY() code will impact the output. The pulse width doesn't matter as long as its at least 0.125uSec (its the falling edge that triggers a bit write)
619619
// Because only the falling edge is important we achieve precomp by shifting the pulse starting position back or forward two clock ticks
620620
// Because it may go back 2 ticks, we increase this number here by 2. 12 ticks is 750 ns, 14 ticks is 875 ns and 16 is 1000ns (1us)
621621
// By doing this, the bit cell timing remains constant, but the actual write position is shifted +/- 125ns as required
@@ -651,10 +651,6 @@ void writePrecompTrack() {
651651

652652
PIN_CTS_PORT|=PIN_CTS_MASK; // stop any more data coming in!
653653

654-
// While the INDEX pin is high wait. Might as well write from the start of the track
655-
if (waitForIndex)
656-
while (PIN_INDEX_PORT & PIN_INDEX_MASK) {};
657-
658654
// Signal we're ready for data
659655
PIN_CTS_PORT &= (~PIN_CTS_MASK);
660656

@@ -676,6 +672,10 @@ void writePrecompTrack() {
676672
TCCR2A = bit(COM2B1) | bit(WGM20) | bit(WGM21)| bit(WGM22); // (COM2B0|COM2B1) Clear OC2B. on compare match, set OC2B at BOTTOM. WGM20|WGM21|WGM22 is Fast PWM.
677673
TCCR2B = bit(WGM22)| bit(CS20); // WGM22 enables waveform generation. CS20 starts the counter runing at maximum speed
678674

675+
// While the INDEX pin is high wait. Might as well write from the start of the track
676+
if (waitForIndex)
677+
while (PIN_INDEX_PORT & PIN_INDEX_MASK) {};
678+
679679
// Get it ready
680680
OCR2A = 0; // Because we're using the PWM limits backwards this causes it to get stuck when it reaches 0
681681
OCR2B = PULSE_WIDTH_VALUE; // pulse width is set to default

0 commit comments

Comments
 (0)