6502 compatible peripherals

For discussing the 65xx hardware itself or electronics projects.
Atlantis
Posts: 122
Joined: 19 Jun 2018

6502 compatible peripherals

Post by Atlantis »

Currently I am working on a project, that utilizes 6502 and set of other chips to replicate the functionality commonly found in amateur embedded devices, based on modern microcontrollers. More specifically - I want to recreate one of my own designs, using "retro parts", a lot of DIP chips and multiple PCBs connected by ribbon cables. :)

At this point I am looking for chips providing I/O functionality, that (preferably) could be connected directly to the system bus and accessed via address in memory space. I know how to do it with UART, timers/counters and GPIO. My system generates RD and WR signals used by intel chips, so I can use 8251, 8252 and 8255. I was also able to connect HD44780 display. But what to do with following modules?

- Real Time Clock/Callendar with battery backup. Preferably separate battery. I know about those disposable Dallas modules with non-rechargeable battery built in, but I would rather use something else.
- SPI. Is there something interesting, or should I simply code software emulated SPI, using GPIO chip?
- Ethernet. Is there some solution, except of using ENC28J60 connected to the hardware of software SPI?
- Small amount of non volatile (EEPROM?) memory for storing configuration. Even 512 bytes will be fine.
- CAN bus controller. Not critical in case of my project. I am just curious if there is some solution, compatible with 6502 bus.
Last edited by Atlantis on Mon Sep 03, 2018 9:43 am, edited 2 times in total.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: 6502 compatible peripherals

Post by BigEd »

I think bit-banging SPI (or perhaps I2C) should be a good approach.

For network, it might be worth considering an ESP8266 and UART, which would give you WiFi rather than wired.
User avatar
ttlworks
Posts: 1464
Joined: 09 Nov 2012
Contact:

Re: 6502 compatible peripherals

Post by ttlworks »

Long time ago, I had used two PIC16C65 microcontrollers in a 6502 SBC to do things like
UART, PS\2 keyboard interface, SPI, PWM etc.

Image

PIC18F4680 is available in 40 pin DIP, seems to have parallel slave port, SPI, I2C, EEPROM, CAN, etc.
But I'm not sure if that chip matches your definition of "retro". ;) ...and not everybody likes PICs.
Atlantis
Posts: 122
Joined: 19 Jun 2018

Re: 6502 compatible peripherals

Post by Atlantis »

I know I could simply use modern microcontroller, "borrowing" its peripherals. But honestly I would rather like to take more traditional approach, using hardware controllers wherever it is possible. For the same reason I don't want to use ESP8266, however I am aware that would be the easiest way. :)
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: 6502 compatible peripherals

Post by GARTHWILSON »

For a 65-bus SPI IC, Daryl's 65SPI is nice, but the CPLD he was making it with is no longer available. I think he's all out. I have about five of the 65SPI's here I could let go.

I've bit-banged SPI several times. I have sample code at http://wilsonminesco.com/6502primer/SPI.ASM . I've also bit-banged I²C several times, and I have sample code at http://wilsonminesco.com/6502primer/GENRLI2C.ASM .

I've made tiny modules for both SPI and I²C. The I²C EEPROMs are not as dense as the SPI flash memories, which I suppose is because I²C is not as fast, so it would take too long to transfer a big file at I²C speeds. For really compact modules, let me recommend using our I2C-6 connector for I²C, and our SPI-10 connector for SPI. These are both very hobbyist-friendly. I have some I²C RTC ICs here that I got to make a tiny RTC module with as well, using a watch battery for backup, but I just haven't gotten around to it yet.

My tiny (half-postage-stamp-sized) SPI-10 flash modules can be seen on the front page of my website, linked below. My workbench computer has at least 81 bits of I/O, or possibly quite a bit more depending on how you count them. I could approximately double that number by adding four more VIAs if there were room on the main board. It does have fast A/D and D/A converters onboard, and a speaker amplifier to monitor what goes in and out of them.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
ttlworks
Posts: 1464
Joined: 09 Nov 2012
Contact:

Re: 6502 compatible peripherals

Post by ttlworks »

NXP has parallel to I2C interface chips like the PCF8584... but not everybody likes NXP.
Also, it looks like these chips are only available in SMD nowaday.
You probably are better off when Bit_banging I2C per software.

There were CS8900A based Ethernet interface cards for the C64, but manually soldering a CS8900A ain't fun.


Microchip MCP2515 is a SPI to CAN2.0 controller.
Microchip MCP2551 is a CAN transceiver.

Bosch AN82527 was a CAN controller with SPI plus parallel interface, but it's out of production.

Siemens\Infineon SAE81C90 and SAE81C91 seems to have SPI plus parallel interface, but availability doesn't look good.
User avatar
MichaelM
Posts: 761
Joined: 23 Apr 2012
Location: Huntsville, AL

Re: 6502 compatible peripherals

Post by MichaelM »

For the non-Microchip Ethernet I/F you asked about, check out the Wiznet product line. Modules are available from Digikey. A module with an SPI I/F you may consider is the WIZ550IO. I haven't not used these chips or modules, but a reputable company built an Ethernet I/F to their equipment for one of my projects recently using these devices, and the I/F worked very well.
Michael A.
Guus Assmann
Posts: 26
Joined: 19 Apr 2018

Re: 6502 compatible peripherals

Post by Guus Assmann »

Hello,

Check the SJA1000 for Can-Bus. (Not sure if it's still available :-( )
For RTC, the good old MC146818.
BR/
Guus
Atlantis
Posts: 122
Joined: 19 Jun 2018

Re: 6502 compatible peripherals

Post by Atlantis »

ttlworks wrote:
There were CS8900A based Ethernet interface cards for the C64, but manually soldering a CS8900A ain't fun.
I am not afraid of SMD soldering. In some of my earlier projects I used LQFP/MLF chips and 0402 resistors/capacitors.
I see there are CS8900A also a modules containing CS8900. I assume there are drivers/libraries written in 6502 assembly or ready to compile with CC65?

MichaelM wrote:
For the non-Microchip Ethernet I/F you asked about, check out the Wiznet product line. Modules are available from Digikey. A module with an SPI I/F you may consider is the WIZ550IO. I haven't not used these chips or modules, but a reputable company built an Ethernet I/F to their equipment for one of my projects recently using these devices, and the I/F worked very well.
I know those chips. I've used them in one AVR based project few years ago. If I remember correctly W5100 can even be configured to work on parallel bus. But to be honest, network controller with built-in TCP/IP stack doesn't match 6502 system. ;)
User avatar
ttlworks
Posts: 1464
Joined: 09 Nov 2012
Contact:

Re: 6502 compatible peripherals

Post by ttlworks »

André Fachat had used a CS8900A based Olimex board with a PET.

On second thought, if you might be using Daryl Rictor's 65SPI peripheral anyway, also take a look at Daryl's ENC28J60 Ethernet module plus the related code.
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: 6502 compatible peripherals

Post by BillO »

ttlworks wrote:
NXP has parallel to I2C interface chips like the PCF8584... but not everybody likes NXP.
Also, it looks like these chips are only available in SMD nowaday.
The PCF8584 are readily available in DIP-20 on eBay. I recently bought 3 of them from a vendor named 'u-barn'. No issues.
Bill
Atlantis
Posts: 122
Joined: 19 Jun 2018

Re: 6502 compatible peripherals

Post by Atlantis »

Guus Assmann wrote:
For RTC, the good old MC146818.
I've read the documentation of that chip and I see it was designed rather for 8048/8051 microcontrollers than for 6502. It has data bus multiplexed with address lines, so it would require additional circuitry to implement it into my design.
Is there any other RTC chip with separate data and address lines and straight away compatible with 6502 bus (RW and PHI2 signals) or Intel bus (RD and WR signals)?
User avatar
GaBuZoMeu
Posts: 660
Joined: 01 Mar 2017
Location: North-Germany

Re: 6502 compatible peripherals

Post by GaBuZoMeu »

Atlantis wrote:
Is there any other RTC chip with separate data and address lines and straight away compatible with 6502 bus (RW and PHI2 signals) or Intel bus (RD and WR signals)?
Although I would prefer using an SPI or I²C device you may take a look at TI DP8573A:
dp8573a.pdf
(307.52 KiB) Downloaded 146 times
It appears to be in production but only as 28 pin PLCC. Mouser listed them, they aren't cheap. The datasheet says there had been a 24p narrow DIP variant as well, but I only found obscure sources and astronomical prices.

ST produces "Timekeeper RAM":
m48t08-955049.pdf
(457.68 KiB) Downloaded 168 times
The DIP packaged types (2K or 8K) seems to be monolithic but the SO variant has a "SNAPHAT" containing the crystal and a battery.


Regards,
Arne
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: 6502 compatible peripherals

Post by BillO »

Another possibility for an RTC is a Maxim SmartWatch. Used to be called the Dallas No-Slot Clock. Readily available on eBay. I bought 2 of these for my Apple II computers a few years back. Still going strong. Writing a driver should not be that hard.
Attachments
DS1216.pdf
(610.99 KiB) Downloaded 152 times
Bill
Atlantis
Posts: 122
Joined: 19 Jun 2018

Re: 6502 compatible peripherals

Post by Atlantis »

Thank you for suggestions.
I have another hardware related question. It is rather basic, so I ask it here, instead of creating another topic.
How nominal frequency of ACA chip relates to system frequency. For example: I have R65C51P2 chips, so they are designed to work with maximal frequency of 2MHz. What does it really mean? Is it about main system clock or some other factor? Can I use one of those chips with WDC65C02 clocked at 4MHz? If not, what kind of UART chip should I look for?
Post Reply