Page 1 of 6

6502 with the RA8875

Posted: Thu Oct 15, 2020 8:59 am
by joncard
Maybe I'm getting over my head here, but I just bought the 6502 project from Ben Eater and I'm looking forward past going through the tutorial to getting it to work with an RA8875 chip to drive a touch screen TFT. I've been going over the timing to see if it will work, and I'm not sure I'm reading something right. I would appreciate it if someone with more experience could give me some guidance.

The RA8875 data sheet is here (https://cdn-shop.adafruit.com/datasheet ... 12_Eng.pdf). I can't find a link to the full datasheet on the Raio site; only an abbreviated one.

I'm planning to use the 6800 mode, connecting the A0 address pin (6502) to the RS pin (RA8875), the R/W pin (6502) to the RW# pin (RA8875), some nand or something gates to decode two addresses (xxx0 for register select 0 and xxx1 for register select 1) to the CS# pin (RA8875). What has me stumped is the RW# pin (RA8875).

I was thinking of using the clock and maybe some gates to create the enable signal. I think the read timing is ok, because the read hold time on the RA8875 is from 0ns to 25ns, and the 6502 requires 10ns (pg. 57 of the RA8875 datasheet). What concerns me for write, the RA8875 has a data hold time minimum of 10ns (which, correct me if I'm wrong, means it requires the 6502 to hold the data for a minimum of 10ns) and the 6502 has a write data hold time minimum of 10ns. So the 6502 may only provide the data for 10ns, and the RA8875 requires 10ns to get the data properly; am I reading that right?

Are there better suggestions for the RA8875 Enable pin than the 6502 system clock? I was looking at the BE pin, but I don't understand what it is saying in the timing diagram with a READ DATA, a WRITE DATA, and a DATA timeline, and what "BE to Valid Data" means. I was wondering if I could use the BE line to trigger the Enable pin, but only on writes, to give some extra time for the RA8875 to read the data before the 6502 ends its data hold time.

Thank you.

Re: 6502 with the RA8875

Posted: Thu Oct 15, 2020 9:14 am
by GARTHWILSON
Welcome!
joncard wrote:
What concerns me for write, the RA8875 has a data hold time minimum of 10ns (which, correct me if I'm wrong, means it requires the 6502 to hold the data for a minimum of 10ns) and the 6502 has a write data hold time minimum of 10ns. So the 6502 may only provide the data for 10ns, and the RA8875 requires 10ns to get the data properly; am I reading that right?

The 6502 does not drive the bus during the phase-2-low period; so after the end of the write, bus capacitance will hold the data for a surprisingly long time when nothing is driving the bus—not just nanoseconds, not just microseconds, but even milliseconds, according to related experiments of mine. (Actually, I tripped across that fact accidentally, and although I observed the milliseconds part, I did not go further to see just how long I could take it. Also, this applies only if all loads are CMOS whose inputs don't take any DC current to speak of. For example, don't use 74LS!)

Re: 6502 with the RA8875

Posted: Fri Oct 16, 2020 6:52 pm
by joncard
Thank you! When the kit arrives next week, I'll give it a try and see what happens, then.

Re: 6502 with the RA8875

Posted: Wed Nov 18, 2020 6:50 am
by bytearray
Any progress on the RA8875? I have a running RA8875 display (800x480) on my 65c02 breadboard.

I can't find many people using the RA8875 with the 6502 (probably since it is cheating to have a display controller chip that powerful on the 6502 :D )

I am running it in text mode and using it as a text terminal. I am talking with it through SPI. It works great. The initial setup sequence is a bit long (since the RA8875 have so many registers). If you want I can share my codes for the initial setup sequence through SPI?

I am not planning on using any of the touch functionality but just as a text terminal display. I might venture into some graphics mode later for some of my programs.
Or I have considered splitting up the screen so the left side has the text terminal and the right side some static area with information about the time, current directory, and stuff like that.

Attached is a picture of it in action.

Re: 6502 with the RA8875

Posted: Wed Nov 18, 2020 8:18 am
by BigEd
(Welcome, and congratulations on a successful build!)

Re: 6502 with the RA8875

Posted: Mon Jul 05, 2021 12:37 am
by dourish
I'm pretty sure that encountering this thread was the first time I came across the RA8875, so it seems only appropriate to note here that I've just managed to get mine working with my 65C02 board, also over SPI (bit-banged via a 6522 although I'm planning to try moving to Daryl's 65SPI). It's working great, although I'm not demanding much of it since it is mainly to replace a serial terminal interface. The keyboard in the photograph is running to my laptop since input is still via serial, although I've got the output from my FORTH running to the display. Once I hook up a PS/2 keyboard, it'll be entirely self-contained.

A version of this design on a PCB would be no larger than that display -- my wire-wrapped board is overly spacious to accommodate my klutzy assembly skills. So right now I'm rather liking the idea of mounting both the board and the display in a 3D-printed case with a slot for the SD card -- just plug in a keyboard and power and go!

--p.

Re: 6502 with the RA8875

Posted: Fri Nov 21, 2025 4:14 pm
by PaulaM
Has anyone got this type of display working with the interface in 6800 8 bit parallel mode?

I'm having a heck of a time getting it working in parallel mode. It works fine in SPI mode (changing jumpers on the driver board) from a teensy, but in parallel mode using my 65C22 and some level shifters no dice at all :(

Re: 6502 with the RA8875

Posted: Fri Nov 21, 2025 8:38 pm
by BigDumbDinosaur
PaulaM wrote:
Has anyone got this type of display working with the interface in 6800 8 bit parallel mode?

I'm having a heck of a time getting it working in parallel mode. It works fine in SPI mode (changing jumpers on the driver board) from a teensy, but in parallel mode using my 65C22 and some level shifters no dice at all :(

You might have better luck with running the display in 808x mode and generating separate /RD and /WD signals.  My read of the data sheet suggests to me that operating the panel in 6800 mode creates some timing issues.

Re: 6502 with the RA8875

Posted: Fri Nov 21, 2025 8:50 pm
by PaulaM
BigDumbDinosaur wrote:
PaulaM wrote:
Has anyone got this type of display working with the interface in 6800 8 bit parallel mode?

I'm having a heck of a time getting it working in parallel mode. It works fine in SPI mode (changing jumpers on the driver board) from a teensy, but in parallel mode using my 65C22 and some level shifters no dice at all :(

You might have better luck with running the display in 808x mode and generating separate /RD and /WD signals.  My read of the data sheet suggests to me that operating the panel in 6800 mode creates some timing issues.
oh?

Interesting, I can give that a whirl.

Re: 6502 with the RA8875

Posted: Fri Nov 21, 2025 8:54 pm
by BigDumbDinosaur
PaulaM wrote:
BigDumbDinosaur wrote:
PaulaM wrote:
Has anyone got this type of display working with the interface in 6800 8 bit parallel mode?

I'm having a heck of a time getting it working in parallel mode. It works fine in SPI mode (changing jumpers on the driver board) from a teensy, but in parallel mode using my 65C22 and some level shifters no dice at all :(

You might have better luck with running the display in 808x mode and generating separate /RD and /WD signals.  My read of the data sheet suggests to me that operating the panel in 6800 mode creates some timing issues.
oh?

Interesting, I can give that a whirl.

A single 74xx00 gate can generate both signals from RWB and Ø2.

Intel-Style Read/Write
Intel-Style Read/Write

Re: 6502 with the RA8875

Posted: Sat Nov 22, 2025 1:37 am
by J64C
BigDumbDinosaur wrote:
A single 74xx00 gate can generate both signals from RWB and Ø2.
We can finally give BDD’s “Minor pedantic note™” back to him. :lol:

That’s three gates in your pic.

Re: 6502 with the RA8875

Posted: Sat Nov 22, 2025 6:27 am
by BigDumbDinosaur
J64C wrote:
BigDumbDinosaur wrote:
A single 74xx00 gate can generate both signals from RWB and Ø2.
We can finally give BDD’s “Minor pedantic note™” back to him. :lol:

That’s three gates in your pic.

Yes, but they are all in one package.  :D  Whether there are two cars or 100 cars in a train, we still call it a train.  :mrgreen:

Re: 6502 with the RA8875

Posted: Sat Nov 22, 2025 6:58 am
by barnacle
One package, one chip, four gates?

We must be careful in our pedantry... but I note that BDD lives in a country where ordering 'fish and chips' does not necessarily include the chips :shock:

https://dennisbeaver.com/fish-and-chips ... and-anger/

And we wouldn't want to cause customer confusion and anger!

Neil :mrgreen:

Re: 6502 with the RA8875

Posted: Sat Nov 22, 2025 10:35 am
by PaulaM
I was thinking about this, I can already read and write to registers in 6800 mode (I can write to registers and read back what I've written), so I don't see what switching to 8080 mode will give me.
I think the problem I'm having is with the initialisation of the chip, I think.

Also I do have a CPLD on the PCB, so it's easy enough to generate other control signals if I need.

Re: 6502 with the RA8875

Posted: Sat Nov 22, 2025 10:40 am
by barnacle
I don't know that chip, but I do recall that some (many?) similar display drivers have a long wake up time after reset. Might be worth a delay of 100ms or so?

Neil