View Single Post
Old 3rd Dec 2021, 4:45 pm   #19
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default Re: Yet another MK14 tape interface (ESP32).

I only wrote a couple of programs for the SC/MP, so used the 1978 style in hex on paper.

I agree the Fast-loader should alter nothing on the MK14, so Fast-loader should be loaded using the existing interfaces into RAM. Any subsequent loads could then use Fast-loader. The loader could be developed further to include Start Address, Execution Address and length.

New load code below.

007C C408 FRTAPE: LDI 8
007E CBD5 ST COUNT(3)
0080 06 LOOP: CSA
0081 D420 ANI 20
0083 98FB JZ LOOP
0085 19 S10
0086 06 LOOP2: CSA
0087 D420 ANI 20
0089 9CFB JZ LOOP2
008B BBD5 DLD COUNT(3)
008D 9CF1 JNZ LOOP
008F 40 LDE
0086 CD01 ST@1(1)
0092 90E8 JMP FRTAPE

The Sense-B and Sin connection has been broken, Sense-B goes to G33 on the M5StickC and the Sin goes to G32 on the M5Stick.

As mentioned previously my M5StackC code is based on Slothie's original program, below is new sendByteSync function. What is the best way to share M5StickC code?

}
void sendByteSync(byte b) {
for (int i=0; i<8; i++) {
byte thisbit = b & 1;
Serial.print(thisbit);
b = b>>1;

if ( thisbit == 1 ){
digitalWrite(G32, HIGH);
}
else{
digitalWrite(G32, LOW);
}

digitalWrite(G33, HIGH);
delayMicroseconds(250);
digitalWrite(G33, LOW);
delayMicroseconds(250);

}
Serial.println();
}
Attached Thumbnails
Click image for larger version

Name:	20211203_142921.jpg
Views:	74
Size:	59.6 KB
ID:	247205  
coolsnaz2 is offline