No description
Find a file
2022-08-20 11:11:47 +02:00
.gitignore Custom memory config 2022-08-19 22:38:18 +02:00
driver.a65 Implement RX 2022-08-20 11:11:47 +02:00
LICENSE Added circuit with inverters 2022-07-21 22:36:35 +02:00
Makefile Custom memory config 2022-08-19 22:38:18 +02:00
mem.cfg Custom memory config 2022-08-19 22:38:18 +02:00
petwifi.kicad_pcb Added mounting holes 2022-08-13 20:43:40 +02:00
petwifi.kicad_prl Route everything through the inverters for buffering 2022-07-24 22:57:11 +02:00
petwifi.kicad_pro Added mounting holes 2022-08-13 20:43:40 +02:00
petwifi.kicad_sch Added mounting holes 2022-08-13 20:43:40 +02:00
README.md Describe RS232 signal 2022-08-13 20:43:52 +02:00

petwifi

An ESP8266 expansion for the Commodore PET / CBM.

Description

Unlike the C64, the Commodore PET does not have a serial port. For that reason, most serial port adapters for the C64 don't work, and an alternate interface must be found. Furthermore, the user port on the PET doesn't supply any power, so an external power supply would be necessary.

There is hope, however: The cassette port supplies 5V power and has suitable logic lines that can be used to emulate a serial port.

The drawback is that serial communication must be fully emulated in software.

Due to the different voltage levels of the ESP8266 and the PET, some voltage conversion is necessary. Luckily, this can be achieved with minimal circuitry: Converting from 5V to 3.3V can be done with a resistor divider. For the opposite direction, no conversion is necessary, because the voltage swing from 3.3V CMOS output drivers is sufficient to drive NMOS input gates.

Special care must be taken for the MOTOR control line (which is used as CTS control input on the ESP): It is driven by a darlington array on a 9V supply rail.

The other pin mappings are as follows:

PET pin ESP pin Direction Cassette #1 internal Cassette #2 internal
Cassette Write RXD PET->ESP VIA PB3 VIA PB3 (same as #1)
Cassette Read TXD ESP->PET PIA1 CA1 VIA CB1
Cassette Motor CTS PET->ESP PIA1 CB2 VIA PB4
Cassette Sense RTS ESP->PET PIA1 PA4 PIA1 PA5

A suitable serial signal (RS-232-like) must be generated/decoded in software. Make sure that you don't access the cassette port #1 while the adapter is connected.

For programming info, refer to this excellent document: http://www.6502.org/users/andre/petindex/local/pet-io-2.txt

RS232 Waveform

Logic L H
CMOS 0V 3V
RS232 +3V -3V
Start +3V
End -3V

H | | | | | | | | | | | | L || || |___| S 1 1 0 1 1 0 0 1 E

 _     _     ___

+3 | | | | | | | | | | | | -3 | || || |___ S 1 1 0 1 1 0 0 1 E