www.cavefischer.at/Sharp Pocket Computer
// Rx (D0) von Sharp PC-1401 (Pin 4 = Port Fo 1) mit 2400 bit/s
int inByte = 0;
void setup() {
Serial.begin(2400);
}
void loop() {
if (Serial.available() > 0) {
inByte = Serial.read();
tone(3, 2093, 10); // optional, D3 an Pin 1 des PC-1401 (Beeper)
Serial.println(inByte);
}
}
10:RESTORE
20:FOR X=0 TO 44
30:READ D
40:POKE &4100+X,D
50:NEXT X
100:"S"
110:INPUT "0-255:";I
120:POKE &4101,I
130:CALL &4100
140:GOTO 110
200:DATA 2,0,218,18,94,96,0,95,78,85,97,1,95,77
210:DATA 2,1,&83,198,18,94,56,7,96,0,78,36,44,5,97,1,78,40,95,209,90
220:DATA 43,20,78,58,96,0,95,78,85,55
Assemblerdarstellung des Maschinenprogramms | ||||||||||
&4100: | 002 | 000 | LIA | 0 | ||||||
&4102: | 218 | EXAB | ||||||||
&4103: | 018 | 094 | LIP | &5E | ||||||
&4105: | 096 | 000 | ANIM | 0 | ||||||
&4107: | 095 | OUTF | ||||||||
&4108: | 078 | 085 | WAIT | 85 | ||||||
&410A: | 097 | 001 | ORIM | 1 | ||||||
&410C: | 095 | OUTF | ||||||||
&410D: | 077 | NOPW | ||||||||
&410E: | 002 | 001 | LIA | 1 | ||||||
&4110: | &83 | LP03 | < | ─ | ─ | ┐ | ||||
&4111: | 198 | TSMA | │ | |||||||
&4112: | 018 | 094 | LIP | &5E | │ | |||||
&4114: | 056 | 007 | JRZP | 7 | ─ | ─ | ┐ | │ | ||
&4116: | 096 | 000 | ANIM | 0 | │ | │ | ||||
&4118: | 078 | 036 | WAIT | 36 | │ | │ | ||||
&411A: | 044 | 005 | JRP | 5 | ─ | ┐ | │ | │ | ||
&411C: | 097 | 001 | ORIM | 1 | < | ┼ | ┘ | │ | ||
&411E: | 078 | 040 | WAIT | 40 | │ | │ | ||||
&4120: | 095 | OUTF | < | ┘ | │ | |||||
&4121: | 209 | RC | │ | |||||||
&4122: | 090 | SL | │ | |||||||
&4123: | 043 | 020 | JRNCM | 20 | ─ | ─ | ─ | ┘ | ||
&4125: | 078 | 058 | WAIT | 58 | ||||||
&4127: | 096 | 000 | ANIM | 0 | ||||||
&4129: | 095 | OUTF | ||||||||
&412A: | 078 | 085 | WAIT | 85 | ||||||
&412C: | 055 | RTN |
Arduino UNO Pin | Name | Sharp PC-1401 11-pol. Schnittstelle |
D3 | MTout2 (Beeper) | Pin 1 |
GND | GND | Pin 3 |
RX 0 (Input, über open-collector Transistorstufe) | Port Fo 1 | Pin 4 |