Interfacing expansion port of a Commodore 64

Status
Not open for further replies.

dashiad

New member
Hello!
I'm pretty new to the Teensy ecosystem, but, even if my impression is that it's not the right board for the task, i'd really really love to use it for interfacing with the expansion port of the commodore 64. I got my Teensy 4.1 working as a disk drive, but had to switch to stm32 for the expansion port, mainly for two reasons:
- Voltages: all signals from the C64 are 5V, and the clock frequency is 1Mhz, although many signals switch at half that frequency.
- Pin count: Interfacing with the address+data buses requires 16+8 pins , plus around 10 more for control signals, and then 6-8 more for SPI / utility buttons, etc.

The disk drive emulation required just a few pins and level converters (thru-hole boards with 4 converters), but i thought scaling that to that many pins would be a bit overkill.
Right now i'm using a stm32h7 based board, which addresses both issues without needing external components, but it has problems of its own (specially, very slow GPIO), and it's a bit at the limit.I'd really love to use the Teensy, but i dont see an easy way to solve both problems (given that i want to use as few external components as possible).


Still, if i were to lift that restriction about external components, what components would you recommend for this project, given that time between reading and writing a bus/signal (mostly with low processing overhead), should ideally be in the 250-300ns?
 
Last edited:
Hello!
I'm pretty new to the Teensy ecosystem, but, even if my impression is that it's not the right board for the task, i'd really really love to use it for interfacing with the expansion port of the commodore 64. I got my Teensy 4.1 working as a disk drive, but had to switch to stm32 for the expansion port, mainly for two reasons:
- Voltages: all signals from the C64 are 5V, and the clock frequency is 1Mhz, although many signals switch at half that frequency.
- Pin count: Interfacing with the address+data buses requires 16+8 pins , plus around 10 more for control signals, and then 6-8 more for SPI / utility buttons, etc.

The disk drive emulation required just a few pins and level converters (thru-hole boards with 4 converters), but i thought scaling that to that many pins would be a bit overkill.
Right now i'm using a stm32h7 based board, which addresses both issues without needing external components, but it has problems of its own (specially, very slow GPIO), and it's a bit at the limit.I'd really love to use the Teensy, but i dont see an easy way to solve both problems (given that i want to use as few external components as possible).


Still, if i were to lift that restriction about external components, what components would you recommend for this project, given that time between reading and writing a bus/signal (mostly with low processing overhead), should ideally be in the 350-400ns?

Well.. I don't know what NXP drove here.. but the T4 has either fast Interrupts on GPIO or fast IO. Not both. In addition, it is not 5V tolerant.
Best option from the Teensy universe would be a T3.5, with 5V tolerant IO. With 120MHZ, one instruction is ~8.3ns, so, if you write fast code, it can work.
 
Talking to bussed signals at 5V from a 3.3V only microcontroller is possibly a problem someone designed a chip for (haven't searched myself)

However you can definitely combine logic families to achieve this. 74HCTnn series, powered at 5V, can drive 5V signals from 3.3V inputs.
74LCXnn or 74LVCnn I believe are both 5V tolerant input, 3.3V compatible families (powered at 3.3V)

So perhaps you can use 74HCT244 to drive busses, 74LVC244 to read them? The 244 has an awkward pin out though, I think there are
some chips out there with better pinout for 8 or 16 bit bus interfacing (try searching for 74LVC16244 and 74HCT16244 for 16 bit versions)
 
Mm..The loss of CPU speed (and half the available memory) would work for simple scenarios, but not for the slightly more complex ones (which are the ones for which i'd really prefer using the Teensy over the stm32).
Anyway, it's a good suggestion for other projects..Thank you!
 
Talking to bussed signals at 5V from a 3.3V only microcontroller is possibly a problem someone designed a chip for (haven't searched myself)

However you can definitely combine logic families to achieve this. 74HCTnn series, powered at 5V, can drive 5V signals from 3.3V inputs.
74LCXnn or 74LVCnn I believe are both 5V tolerant input, 3.3V compatible families (powered at 3.3V)

So perhaps you can use 74HCT244 to drive busses, 74LVC244 to read them? The 244 has an awkward pin out though, I think there are
some chips out there with better pinout for 8 or 16 bit bus interfacing (try searching for 74LVC16244 and 74HCT16244 for 16 bit versions)

Mm..Those are interesting components..The control signals have a defined direction (either are input or output), bus buses should be read/write, so i'd need bi-directional level converters for them.
 
One does the driving, the other does the reading, you control the output-enable to select direction. They are the level converters,
that's the point of using those particular families for each chip.
 
Status
Not open for further replies.
Back
Top