6502 with the RA8875

For discussing the 65xx hardware itself or electronics projects.
J64C
Posts: 239
Joined: 11 Jul 2021

Re: 6502 with the RA8875

Post by J64C »

BigDumbDinosaur wrote:
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:
Even the package calls is itself ‘Quad’ :lol:
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 6502 with the RA8875

Post by BigDumbDinosaur »

barnacle wrote:
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:
Adding insult to injury, the “chips” aren’t chips at all, but French fries.  :evil:  When I see “chips” I expect potato chips, or maybe poker chips.  :D

I got a chuckle out of the lawyer describing the subject restaurant as “sustainable.”  Exactly what is it the restaurant is “sustaining?”  It doesn’t sound as though it is “sustaining” truth in advertising.  :shock:
x86?  We ain't got no x86.  We don't NEED no stinking x86!
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

barnacle wrote:
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
I'm doing some more experiments, with delays as well.
Currently the suspect is the TXB0108 level shifter chip, I have an alternative I'll be trying tomorrow.
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

PaulaM wrote:
I'm doing some more experiments, with delays as well.
Currently the suspect is the TXB0108 level shifter chip, I have an alternative I'll be trying tomorrow.
I would be interested in your findings, I'm thinking of using those level-shifters myself.
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

I swapped the TXB0108 for a TXS0108 and I'm having more success, thankfully it's a drop in pin compatible part!

I've finally got data back from the RA8875 via the 65SPI2 CPLD.

Code: Select all

RUN
RA8875 INIT:
CMDWrite>: 0x80 CMD>:0x00
DATAREAD>: 0x40 Data<:0x75

Ready
Here is my code

Code: Select all

10 REM -------------------------
11 REM DISPLAY VIA SPI TEST

100 SP = $A0C0
101 SS = SP+1     : REM SPI STATUS ADDR
102 CS = SP+2     : REM CHIP SELECT ADDR
103 RS = 0        : REM SPI STATUS VALUE

110 CM = 0        : REM COMMAND BYTE
111 RG = 0        : REM REGISTER
112 DT = 0        : REM DATA




1000 REM --------------------
1001 REM MAIN CODE
1010 GOSUB 2000

1100 PRINT "RA8875 INIT:"

1110 CM = $80
1115 RG = $00
1117 GOSUB 2100    : REM WRITE COMMAND

1120 CM = $40
1127 GOSUB 2200    : REM READ DATA


1999 END

2000 REM ---------------------
2001 REM INIT SPI
2010 POKE CS,$00    : REM CS HIGH
2011                : REM STATUS OF 80 IS READY
2015 POKE ST,$80    : REM SOFTWARE RESET

2020 FOR DL = 0 TO 500
2021 NEXT DL

2030 POKE ST,%00010100
2031        : REM FRX SET, ECE SET
2032        : REM FRX DOESN'T SEEM TO WORK
2040 REM PRINT BIN$(PEEK(ST),8)
2045 RETURN


2100 REM ---------------------
2101 REM SEND COMMAND

2107 PRINT "CMDWrite>: 0x";
2108 PRINT HEX$(CM,2);
2109 POKE CS,$00
2110 POKE SP, CM

2120 RS = PEEK(SS)
2122 IF RS <> $80 THEN GOTO 2120

2130 PRINT " CMD>:0x";
2131 PRINT HEX$(RG,2)
2135 POKE SP,RG

2140 RS = PEEK(SS)
2142 IF RS <> $80 THEN GOTO 2140

2145 POKE CS,$FF
2149 RETURN



2200 REM ---------------------
2201 REM READ DATA

2205 POKE CS,$00
2210 POKE SP, CM

2215 PRINT "DATAREAD>: 0x";
2220 PRINT HEX$(CM,2);

2230 RS = PEEK(SS)
2235 IF RS <> $80 THEN GOTO 2230

2240 POKE SP,$00      : REM DUMMY WRITE
2250 PRINT " Data<:0x"; 
2255 DT = PEEK(SP)
2260 PRINT HEX$(DT,2)
2270 POKE CS,$FF
2290 RETURN
I have to do a dummy write to read data, which isn't what I was expecting as I thought the FRX bit on the 65SPI2 would drive the SPI clock when a read happened, at least that was my understanding of the data sheet.
I can see that without the dummy write the SPI clock doesn't happen

Anyway, also attached is a screen grab of the data (now clean!) with the TXS0108 in
first part of the RA8875 spi test
first part of the RA8875 spi test
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Interesting results between the two shifter types. Will you be trying the 8-bit // mode again (as that was what I was wondering about using) ?

(Edit) : Reading Daryl's datasheet does seem to imply that you have to send at least one initial byte:
Quote:
... Now, just read the SPI data port,store the value, and repeat until you are done. The controller will automatically send the last byte written after each read...
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

For now I'd like to work on SPI to confirm I have the config correct.

Basically I've got it working on a teensy, captured all the data going in/out (lots of print statements to print to the console) and rebuilt the code from that
Here is what I have in my basic code https://github.com/TechPaula/PC6502/blo ... OWORLD.BAS
and here is the output of the program https://github.com/TechPaula/PC6502/blo ... OUTPUT.TXT

the output of the teensy console is here - https://github.com/TechPaula/PC6502/blo ... OUTPUT.txt

I've added delays to the basic program where needed (1mS, 500mS, etc)

I'm not posting code here as it's 400 lines long and the output is also many many lines long and the output log files are also quite long.

If anyone spots something obvious please do let me know.

Paula
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 6502 with the RA8875

Post by BigDumbDinosaur »

PaulaM wrote:
I'm not posting code here as it's 400 lines long and the output is also many many lines long and the output log files are also quite long.

Rather than post a long chunk of code in-line, you can attach one or more source code files to your posts.  Files can be PDFs, plain text, assembly language source, or images (GIFs, JPEGs, etc.), such as what I attached to this post.  Local attachments are more convenient for others reading your posts—off-site links can go stale.

I, for one, never seem to be able to make heads or tails of anything on Github.

pem.asm
Assembly Language Source File
(57.69 KiB) Downloaded 27 times
JPEG Capture from Logic Analyzer
JPEG Capture from Logic Analyzer
x86?  We ain't got no x86.  We don't NEED no stinking x86!
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

bytearray wrote:
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.
Would you be willing to share your initilisation sequence and code?
I'm having a heck of a time trying to get mine working.
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Hi Paula,
I've at last received my RA8875-based LCD panel, and I'm currently browsing what I can find about the // interface - and the required startup sequences.
I have found three interesting sources :
  • An application note from RAIO (included below for everyone)
The AN has a sequence of startup instructions !
Hope it's useful.
(edit : added the RAIO technical download link)
Attachments
RA8875-Application-Note.pdf
Application note.
(285.07 KiB) Downloaded 39 times
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
Hi Paula,
I've at last received my RA8875-based LCD panel, and I'm currently browsing what I can find about the // interface - and the required startup sequences.
I have found three interesting sources :
  • An application note from RAIO (included below for everyone)
Thanks, I did find the AN, and my PCB has arrived, I also found someone who did something with a Z80 and an SPI RA8875 - https://painfuldiodes.wordpress.com/202 ... -homebrew/
I'll take a look at the other links, thank you.
My plan is to work on it this weekend (now the PCB has arrived).
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

Some progress, new PCB, 6800 parallel interface, CPLD programmed and a simple program to read the display ID

Code: Select all


10 REM -------------------------
11 REM DISPLAY parallel test
100 DT = $A320
110 AD = $A321
120 CM = 0        : REM COMMAND BYTE
121 RG = 0        : REM REGISTER
122 DA = 0        : REM DATA
1000 REM --- Check display code
1010 POKE AD,00
1020 DA = PEEK(DT)
1025 PRINT "0x";
1030 PRINT HEX$(DA,2)

Ready
RUN
0x75

Ready
So I can talk to the display!

next up initialisation......
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

PaulaM wrote:
Some progress, new PCB, 6800 parallel interface, CPLD programmed and a simple program to read the display ID
Hi Paula, could you post the wiring diagram for the 6800 mode (once you're sure it works) :)
Thanks. You're faster than me, I'm still in the 'reading the manual' stage, and wondering the best way of interfacing through a 65C22.
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

It's alive!!!

Currently text mode, and wrong rotation, but it's alive!!
The biggest issue was getting the timing for the read/write of the 6800 mode (the "E" line behaves differently to a 6800).

Rotation and graphics next.
PC6502_Stack_Display.jpeg
PC6502_Display.jpeg
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
Hi Paula, could you post the wiring diagram for the 6800 mode (once you're sure it works) :)
Thanks. You're faster than me, I'm still in the 'reading the manual' stage, and wondering the best way of interfacing through a 65C22.
Here is the display part of the schematic
partSchematic.jpg
Full schematics are here - https://github.com/TechPaula/PC6502/tre ... 502-KEYTFT
Post Reply