Page 1 of 2

65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Sun Sep 05, 2021 1:57 pm
by Jmstein7
I'm wondering if anyone knows of any microcontroller (PIC18F or 16F, Arduino, ESP32, Teensy, etc.) projects out there that can emulate a 65c51 or 6551 ACIA? I'm doing projects at 3.3v, so my standard WDC 65c51s won't work (5V only).

I've searched, but I'm not turning up anything that fits the bill, e.g., one of the projects I found for teensy requires all the Address lines(?). That's not going to happen. Control signals, Data Lines, and register select, i.e. That's all I can do.

Thanks!

Jon

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Sun Sep 05, 2021 2:36 pm
by BigEd
Can you share some of the links you did find? (I don't know why all the address lines might need to be available, but surely you could tie most of them off?)

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Sun Sep 05, 2021 2:47 pm
by Jmstein7
BigEd wrote:
Can you share some of the links you did find? (I don't know why all the address lines might need to be available, but surely you could tie most of them off?)
Sure:

https://github.com/olivierjan/6502-SBC-using-Teensy

https://github.com/c0pperdragon/6502ino

https://www.reddit.com/r/beneater/comme ... ompatible/

https://github.com/halfburnttoast/nano_6502_controller

https://github.com/chanmix51/soft65c02

https://github.com/olivierjan/6551-emulation-with-PIC

https://forum.pjrc.com/threads/65755-MC ... ight=65c02

These have, or link to, various elements with 6551 or 65c51 functionality.

And, one vhdl implementation that I can't get to work (the TX works but the RX does not):

https://github.com/jmstein7/65c02_errat ... /6551-ACIA

Dave and I worked on that; but, it only seems to work with "soft" 65c02s.

Jon

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Sun Sep 05, 2021 3:03 pm
by BigEd
Thanks! I like the look of Olivier Jan's - that's not much more than a dozen lines of code. It's minimal, so we see this comment:
// We simply ignore the case where we receive config /Control/Reset byte for ACIA.

But is that OK for you? Is sending and receiving enough?

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Sun Sep 05, 2021 3:23 pm
by Jmstein7
BigEd wrote:
Thanks! I like the look of Olivier Jan's - that's not much more than a dozen lines of code. It's minimal, so we see this comment:
// We simply ignore the case where we receive config /Control/Reset byte for ACIA.

But is that OK for you? Is sending and receiving enough?
It would be very nice, but I'm working with the newer Teensy 4.0s and 4.1s. To recode it from his 3.6 code would be a bit much for my skill level - the pin banks (which he is addressing directly) are quite different. Also, for the 4.0 and 4.1, it would be great to be able to employ the FlexIO and DMA channels. But, for that, I don't even have a starting point.

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Mon Sep 06, 2021 3:12 pm
by BigEd
Although I do have a Teensy, I've never used it, so I can't be much help.

Just to note another possible choice: the Raspberry Pi Pico board, or the RP2040 microcontroller which it's based on. I'm pretty sure it could do the job: Dominic P has ported PiTubeDirect to it, which involves bit-banging an interface on a 2MHz 6502 bus. (I assume you won't be running your bus faster than that?)

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Mon Sep 06, 2021 3:53 pm
by Jmstein7
BigEd wrote:
Although I do have a Teensy, I've never used it, so I can't be much help.

Just to note another possible choice: the Raspberry Pi Pico board, or the RP2040 microcontroller which it's based on. I'm pretty sure it could do the job: Dominic P has ported PiTubeDirect to it, which involves bit-banging an interface on a 2MHz 6502 bus. (I assume you won't be running your bus faster than that?)
Surprisingly, I’m chugging away at a blistering 6mhz. :D

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Mon Sep 06, 2021 3:54 pm
by BigEd
Well that certainly sets a deadline for dealing with each access!

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Tue Sep 07, 2021 12:32 am
by Jmstein7
BigEd wrote:
Well that certainly sets a deadline for dealing with each access!
Well, you know, the microcontrollers under discussion here are all plenty fast. J

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Tue Sep 07, 2021 7:09 am
by drogon
Jmstein7 wrote:
BigEd wrote:
Well that certainly sets a deadline for dealing with each access!
Well, you know, the microcontrollers under discussion here are all plenty fast. J
It's not just overall speed - often there are architectural limitations on just how fast a program can access the GPIO pins/ports and even then you have to detect the correct edge, run code, accept (or present) parallel data, all inside a timeframe measured in single digit (or less) nanoseconds.

-Gordon

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Thu Sep 09, 2021 4:14 am
by jmthompson
I've actually been toying with the idea of trying to implement an ACIA on a Raspberry Pi Pico. It would be primarily for a little side project of mine, a clone Apple Super Serial Card that I designed, but never got working due to what I am pretty sure are just crappy ACIAs from eBay. So far though though it hasn't left the thought experiment stage.

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Thu Sep 09, 2021 8:43 am
by gbm
Looks like a perfect idea for an RPI Pico project: the microprogrammable I/O should easily handle the 6502 bus even at 8 MHz or more, and the emulated 6551 could interface to a PC via RPi Pico USB using VCOM.

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Thu Sep 09, 2021 12:07 pm
by Jmstein7
jmthompson wrote:
I've actually been toying with the idea of trying to implement an ACIA on a Raspberry Pi Pico. It would be primarily for a little side project of mine, a clone Apple Super Serial Card that I designed, but never got working due to what I am pretty sure are just crappy ACIAs from eBay. So far though though it hasn't left the thought experiment stage.
What a great idea - I've never seen one (in all my searching)! That would be a very popular thing if you got it to work.

Jon

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Sat Sep 11, 2021 12:01 am
by jmthompson
Jmstein7 wrote:
jmthompson wrote:
I've actually been toying with the idea of trying to implement an ACIA on a Raspberry Pi Pico. It would be primarily for a little side project of mine, a clone Apple Super Serial Card that I designed, but never got working due to what I am pretty sure are just crappy ACIAs from eBay. So far though though it hasn't left the thought experiment stage.
What a great idea - I've never seen one (in all my searching)! That would be a very popular thing if you got it to work.

Jon
I had originally put this on the backburner since I didn't think there'd be any interest outside of me using this to make cheap SSC clones, but I had never considered the use case of people wanting to put ACIAs in 3.3V systems.

I've got some free time this weekend, and already picked up two picos a while back, so I can start messing around with this. I'm positive I saw a post a while back about someone already having done the work of building a 6502 bus interface for the Pico, so really all that will be needed here is to implement the ACIA itself as a wrapper around the Pico's built-in UART.

Re: 65c51 or 6551 ACIA microcontroller or SoC Emulators?

Posted: Sat Sep 11, 2021 7:27 am
by BigEd
> ...someone already having done the work of building a 6502 bus interface for the Pico...

Maybe Dominic's project?
https://github.com/dp111/PicoTube