6502 with the RA8875

For discussing the 65xx hardware itself or electronics projects.
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

so I can't draw a single pixel (nothing shows up) but I can draw a very very short line ;)

The colour in real life is much more vibrant than the image
PC6502_DISP_MANDLEBROT_CROP.jpeg
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Hi Paula,
If you're able, could you post a timing diagram (even written on a piece of tablecloth in good engineering style) of the EN signal and data-bus of your working parallel interface. I'm still having problems with my 6522-driven interface (no level translators as the whole system is running at 3v3 : Pi Pico2 'oblige'). At 1MHz I can seemingly get through the initialization part (the loop waiting for the graphic fill to complete works correctly) - but the screen remains (infuriatingly) blank. At higher speeds it hangs at random places.
Thanks, in advance.
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
Hi Paula,
If you're able, could you post a timing diagram (even written on a piece of tablecloth in good engineering style) of the EN signal and data-bus of your working parallel interface. I'm still having problems with my 6522-driven interface (no level translators as the whole system is running at 3v3 : Pi Pico2 'oblige'). At 1MHz I can seemingly get through the initialization part (the loop waiting for the graphic fill to complete works correctly) - but the screen remains (infuriatingly) blank. At higher speeds it hangs at random places.
Thanks, in advance.
I'll grab it again in a bit, but the main thing was ensuring the E line goes high AFTER the address, data and RnW lines change.. it's a bit of a night mare to get right.

Paula
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
Hi Paula,
If you're able, could you post a timing diagram (even written on a piece of tablecloth in good engineering style) of the EN signal and data-bus of your working parallel interface. I'm still having problems with my 6522-driven interface (no level translators as the whole system is running at 3v3 : Pi Pico2 'oblige'). At 1MHz I can seemingly get through the initialization part (the loop waiting for the graphic fill to complete works correctly) - but the screen remains (infuriatingly) blank. At higher speeds it hangs at random places.
Thanks, in advance.
DisplayTiming.jpg
DisplayTiming2.jpg
Link to my BASIC code (if it helps) - https://github.com/TechPaula/PC6502/blo ... T_TEST.BAS

Good luck, let us know how you get on :)
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

Larger picture of the Mandelbrot
DisplayMandle.jpeg
And a Sierpinski triangle/gasket
SierTriangle.jpg
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

PaulaM wrote:
Link to my BASIC code (if it helps)
Good luck, let us know how you get on :)
Thanks ! The basic code was useful in order to have a known good init sequence. The timing for EN is in your CPLD logic, however.
Armed with your diagrams I'll compare with what my setup is doing.
More news soon, but I've currently been banned from the dining-room table - so progress will be whenever it's light enough and warm enough for me to be in my 'den'. :roll:
Glenn-in-France
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 »

GlennSmith wrote:
More news soon, but I've currently been banned from the dining-room table - so progress will be whenever it's light enough and warm enough for me to be in my 'den'. :roll:
So, get a second dining-room table.  :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: 6502 with the RA8875

Post by barnacle »

Heh. My (attic) workshop has no fewer than five desks, plus a temporary workbench, and they're _all_ full of stuff...

Neil
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
PaulaM wrote:
Link to my BASIC code (if it helps)
Good luck, let us know how you get on :)
Thanks ! The basic code was useful in order to have a known good init sequence. The timing for EN is in your CPLD logic, however.
Armed with your diagrams I'll compare with what my setup is doing.
More news soon, but I've currently been banned from the dining-room table - so progress will be whenever it's light enough and warm enough for me to be in my 'den'. :roll:
hehe, I'm currently working on the sofa :)

Paula
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Hi everyone,
Well I have negotiated my corner of the table for a few days, some progress has been made. The screen is now filled with black. :o
Here are some traces of the dialogue (sorry I haven't been able to get my analyzer clips to stay on the data connections) System clock is currently 1MHz.
a) a global view of a 'hello world' dialogue. You can see the individual writes of each letter at the end of the trace.
Hello world dialogue
Hello world dialogue
b) a close-up of the first two "instructions" : two writes to the reset register.
Close-up : two instructions
Close-up : two instructions
The protocol seems to be correct, and the WAIT signal is pulled by the RA8875 from time-to-time which seems to imply that it is doing things in response to the instructions. But no text :(

And to complete the package, the top-level PLASMA code (blatently copied from PaulaM's BASIC program (thanks Paula))

Code: Select all

// --------------------------------- Main program --------------------------------
    via_init()
    puts("SOFT RESET"); putln
    CmdWrite($01)
    DataWrite($01)
    Wait(1)
    CmdWrite($01)
    DataWrite($00)
    Wait(1)

    puts("Pll Init"); putln
    CmdWrite($88)
    DataWrite($0A)
    Wait(1)
    CmdWrite($89)
    DataWrite($02)
    Wait(1)

    puts("COLOUR DEPTH & MCU INTERFACE"); putln
    CmdWrite($10)
    DataWrite($00)
    Wait(1)

    puts("PCLK INVERS"); putln
    CmdWrite($04)
    DataWrite($82)
    Wait(1)

    puts("HORIZONTAL SET"); putln
    CmdWrite($14)
    DataWrite($3b)
    Wait(1)
    CmdWrite($15)
    DataWrite($00)
    Wait(1)
    CmdWrite($16)
    DataWrite($01)
    Wait(1)
    CmdWrite($17)
    DataWrite($00)
    Wait(1)
    CmdWrite($18)
    DataWrite($05)
    Wait(1)

    puts("VERTICAL SET"); putln
    CmdWrite($19)
    DataWrite($0F)
    Wait(1)
    CmdWrite($1A)
    DataWrite($01)
    Wait(1)
    CmdWrite($1B)
    DataWrite($02)
    Wait(1)
    CmdWrite($1C)
    DataWrite($00)
    Wait(1)
    CmdWrite($1D)
    DataWrite($07)
    Wait(1)
    CmdWrite($1E)
    DataWrite($00)
    Wait(1)
    CmdWrite($1F)
    DataWrite($09)
    Wait(1)

    puts("ACTIVE WINDOW X"); putln
    CmdWrite($30)
    DataWrite($00)
    Wait(1)
    CmdWrite($31)
    DataWrite($00)
    Wait(1)
    CmdWrite($34)
    DataWrite($DF)
    Wait(1)
    CmdWrite($35)
    DataWrite($01)
    Wait(1)
    puts("ACTIVE WINDOW Y"); putln
    CmdWrite($32)
    DataWrite($00)
    Wait(1)
    CmdWrite($33)
    DataWrite($00)
    Wait(1)
    CmdWrite($36)
    DataWrite($0F)
    Wait(1)
    CmdWrite($37)
    DataWrite($01)
    Wait(1)

    puts("DISPLAY ON"); putln
    CmdWrite($01)
    DataWrite($80)
    Wait(1)

    puts("FILL SCREEN WITH BLACK"); putln
    CmdWrite($91)
    DataWrite($00)
     Wait(1)
    CmdWrite($92)
    DataWrite($00)
     Wait(1)
    CmdWrite($93)
    DataWrite($00)
     Wait(1)
    CmdWrite($94)
    DataWrite($00)
     Wait(1)
    CmdWrite($95)
    DataWrite($DF)
     Wait(1)
    CmdWrite($96)
    DataWrite($01)
     Wait(1)
    CmdWrite($97)
    DataWrite($0F)
     Wait(1)
    CmdWrite($98)
    DataWrite($01)
     Wait(1)

    CmdWrite($63)   // BG RED BITS 0..2
    DataWrite($00)
     Wait(1)
    CmdWrite($64)   // BG GREEN BITS 0..2
    DataWrite($00)
     Wait(1)
    CmdWrite($65)   // BG BLUE BITS 0..1
    DataWrite($00)
    Wait(1)
    CmdWrite($90)
    DataWrite($B0)
    Wait(10)

    puts("WAIT...")
    CmdWrite(90)
    repeat
        temp = DataRead() & $80
    until temp <> 0
    puts("  OK!"); putln

    puts("TEXT MODE"); putln
    CmdWrite($40)
    DataWrite($E0)   // TEXT MODE, BLINK CURSOR
    Wait(1)
    CmdWrite($44)    // BLINK RATE REG
    DataWrite($20)
    Wait(1)

    puts("SET CURSOR POSITION"); putln
    CmdWrite($2A)  // X LSB POSITION
    DataWrite($0A)
    Wait(1)
    CmdWrite($2B)  // X MSB POSITION
    DataWrite($00)
    Wait(1)
    CmdWrite($2C)  // Y LSB POSITION
    DataWrite($0A)
    Wait(1)
    CmdWrite($2D)  // Y MSB POSITION
    DataWrite($00)
    Wait(1)

    puts("SET TEXT COLOUR"); putln
    CmdWrite($63)  // FG RED BITS 0..2
    DataWrite($07)
    Wait(1)
    CmdWrite($64)  // FG GREEN BITS 0..2
    DataWrite($04)
    Wait(1)
    CmdWrite($65)  // FG BLUE BITS 0..1
    DataWrite($00)
    Wait(1)

    CmdWrite($02)  // Data write register
    DataWrite('H')
    DataWrite('e')
    DataWrite('l')
    DataWrite('l')
    DataWrite('o')
    DataWrite(' ')
    DataWrite('W')
    DataWrite('o')
    DataWrite('r')
    DataWrite('l')
    DataWrite('d')
    DataWrite('!')
    
    puts("DONE!"); putln
done
I think I'll go and read the manual yet again !!
Glenn-in-France
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Heh, I've found some better probe hooks and I think I can see what's wrong...
Oops, no data !
Oops, no data !
Something is terribly wrong - especially as the RA8875 inputs are pulled-up with 10k resistors...
Glenn-in-France
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Back again !
Well the terribly wrong was an error in addressing the non-handshake port A of the 6522 (ORG+$0F) : I was writing my data into unused address space :cry:
With that fixed, I was then seeing very strange behavior between bits D3 and D4 of the data lines - they were following each other - yes, you've deduced the cause : a short circuit. Caused by a fragment of a pin when it was clipped after soldering. Had to get my 'old guy' reading glasses out to find that...
So the result still isn't what I was expecting
At last something to read.
At last something to read.
But it's MUCH better! Now I just need to get my head around all of the display format commands !
Thanks again, PaulaM, for your helpful inputs.
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
Back again !
Well the terribly wrong was an error in addressing the non-handshake port A of the 6522 (ORG+$0F) : I was writing my data into unused address space :cry:
With that fixed, I was then seeing very strange behavior between bits D3 and D4 of the data lines - they were following each other - yes, you've deduced the cause : a short circuit. Caused by a fragment of a pin when it was clipped after soldering. Had to get my 'old guy' reading glasses out to find that...
So the result still isn't what I was expecting
At_last.jpg
But it's MUCH better! Now I just need to get my head around all of the display format commands !
Thanks again, PaulaM, for your helpful inputs.
AWESOME!!!!!

Can I ask, do you have level shifters between your 6502 and the RA8875?
One thing I found with mine is that I had to disable the level shifter when I wasn't accessing the display (the TXS0108 has an OE pin) as I was getting interference with the main databus.
(my 6502 is running at 5V and the display signals are 3.3V)

Second question, DO you use the /WAIT signal from the display? I currently don't as I found a few things online saying it kinda worked, but not always.


My next challenge is the LT7683 driver chip, eeeep.
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

PaulaM wrote:
AWESOME!!!!!
Thankyou, but I still haven't managed to get the full display to clear, and I've lost the "Hello World!" text... I'll get there one day. I'll have to be quick, 'cos my bail on the dinig table expires Friday night (family arriving)
PaulaM wrote:
Can I ask, do you have level shifters between your 6502 and the RA8875?
No level shifting so far, I'm using a Pi Pico2 to drive my contraption (it drives PHI2 and provides an API for file IO and other functions, as well as UART) I'm running the whole show on 3v3 for the moment. Once I've got everything running (well, walking) properly I have plans to use the level translators to isolate the 3v stuff and run the 6502 (or the 65816 proto that I'm also working on) at 5v and crank the speed up to the limit. I'll keep in mind the info about dis-activating, though.
PaulaM wrote:
Second question, DO you use the /WAIT signal from the display? I currently don't as I found a few things online saying it kinda worked, but not always.
Yes, I'm using it and it seems to work as advertised. For example, when you launch a graphics draw operation, !Wait is pulled low during the operation. This is how I've hooked the display up using a 6522 (my original idea was to use the '22s handshaking, but the polarity is all wrong so I'm 'bit-banging' the !CS and EN handshaking).
Bit-bang RA8875 interface
Bit-bang RA8875 interface
PaulaM wrote:
My next challenge is the LT7683 driver chip, eeeep.
Yes, quite a complex beastie. I have a FT801Q-R still in it's sealed bag : that's a really complex beastie! BTW exactly what is the reference of your display ? Mine is TFTM070A3-5. I can't understand why your init values don't work on my device.
Thanks again!
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
but I still haven't managed to get the full display to clear, and I've lost the "Hello World!" text... I'll get there one day. I'll have to be quick, 'cos my bail on the dinig table expires Friday night (family arriving)
I had a thought, my code is set up for a 480x272 display (TFT043A4-3), as yours is a higher resolution you'll need to change the PLL timings and also window sizes.
This probably explains the double image and also random bits on the right hand side (they'll be outside the window that was cleared)

Paula
Post Reply