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 »

A list of things you'll need to change for the 800x480 display :)

This is taken from the Adafruit RA8875 library, which is what I based mine on.

Code: Select all

// (_size == RA8875_800x480)
  {
    pixclk = RA8875_PCSR_PDATL | RA8875_PCSR_2CLK;
    hsync_nondisp = 26;
    hsync_start = 32;
    hsync_pw = 96;
    hsync_finetune = 0;
    vsync_nondisp = 32;
    vsync_start = 23;
    vsync_pw = 2;
    _voffset = 0;
  }

  writeReg(RA8875_PCSR, pixclk);
  delay(1);

  /* Horizontal settings registers */
  writeReg(RA8875_HDWR, (_width / 8) - 1); // H width: (HDWR + 1) * 8 = 480
  writeReg(RA8875_HNDFTR, RA8875_HNDFTR_DE_HIGH + hsync_finetune);
  writeReg(RA8875_HNDR, (hsync_nondisp - hsync_finetune - 2) /
                            8); // H non-display: HNDR * 8 + HNDFTR + 2 = 10
  writeReg(RA8875_HSTR, hsync_start / 8 - 1); // Hsync start: (HSTR + 1)*8
  writeReg(RA8875_HPWR,
           RA8875_HPWR_LOW +
               (hsync_pw / 8 - 1)); // HSync pulse width = (HPWR+1) * 8

  /* Vertical settings registers */
  writeReg(RA8875_VDHR0, (uint16_t)(_height - 1 + _voffset) & 0xFF);
  writeReg(RA8875_VDHR1, (uint16_t)(_height - 1 + _voffset) >> 8);
  writeReg(RA8875_VNDR0, vsync_nondisp - 1); // V non-display period = VNDR + 1
  writeReg(RA8875_VNDR1, vsync_nondisp >> 8);
  writeReg(RA8875_VSTR0, vsync_start - 1); // Vsync start position = VSTR + 1
  writeReg(RA8875_VSTR1, vsync_start >> 8);
  writeReg(RA8875_VPWR,
           RA8875_VPWR_LOW + vsync_pw - 1); // Vsync pulse width = VPWR + 1

  /* Set active window X */
  writeReg(RA8875_HSAW0, 0); // horizontal start point
  writeReg(RA8875_HSAW1, 0);
  writeReg(RA8875_HEAW0, (uint16_t)(_width - 1) & 0xFF); // horizontal end point
  writeReg(RA8875_HEAW1, (uint16_t)(_width - 1) >> 8);

  /* Set active window Y */
  writeReg(RA8875_VSAW0, 0 + _voffset); // vertical start point
  writeReg(RA8875_VSAW1, 0 + _voffset);
  writeReg(RA8875_VEAW0,
           (uint16_t)(_height - 1 + _voffset) & 0xFF); // vertical end point
  writeReg(RA8875_VEAW1, (uint16_t)(_height - 1 + _voffset) >> 8);
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Thx Paula, I was delving into similar code also. But time is running-out... *And* I have cakes to make today.... I'll let you know asap.
Glenn-in-France
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
Thx Paula, I was delving into similar code also. But time is running-out... *And* I have cakes to make today.... I'll let you know asap.
I love cake......

BTW, I made a version of the code to work with the 800x480 RA8875 driver, might help you with the timings for yours
https://github.com/TechPaula/LT6502/blo ... MANDLE.BAS

Works a treat :)
LT6502_800x480_test.jpeg
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:
BTW, I made a version of the code to work with the 800x480 RA8875 driver, might help you with the timings for yours
https://github.com/TechPaula/LT6502/blo ... MANDLE.BAS

Works a treat :)
LT6502_800x480_test.jpeg
That’s a nice-looking board.  What method did you use to solder the fine-pitch SMT parts?
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 »

BigDumbDinosaur wrote:
PaulaM wrote:
BTW, I made a version of the code to work with the 800x480 RA8875 driver, might help you with the timings for yours
https://github.com/TechPaula/LT6502/blo ... MANDLE.BAS

Works a treat :)
LT6502_800x480_test.jpeg
That’s a nice-looking board.  What method did you use to solder the fine-pitch SMT parts?
a fine tip soldering iron.

a lot of the "chicken feed" (caps/resistors) I got assembled by JLCPCB, but the majority was hand soldered (my day job means I regularly solder 0201 and smaller)
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: 6502 with the RA8875

Post by barnacle »

PaulaM wrote:
(my day job means I regularly solder 0201 and smaller)
You have my sympathies. I try not to solder anything under 0402. 0201 is for pick'n'place machines.

Neil
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:
BigDumbDinosaur wrote:
PaulaM wrote:
BTW, I made a version of the code to work with the 800x480 RA8875 driver, might help you with the timings for yours
https://github.com/TechPaula/LT6502/blo ... MANDLE.BAS

Works a treat :)
LT6502_800x480_test.jpeg
That’s a nice-looking board.  What method did you use to solder the fine-pitch SMT parts?
a fine tip soldering iron.

a lot of the "chicken feed" (caps/resistors) I got assembled by JLCPCB, but the majority was hand soldered (my day job means I regularly solder 0201 and smaller)
I can barely see 0201 parts, let alone solder them.  I can’t even do SOIC packages anymore.  :cry:  I am going to have to enlist help to get my latest POC unit built, since use of fine-pitch SMT parts was unavoidable.
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 »

I have a microscope (at home and at work)
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: 6502 with the RA8875

Post by GlennSmith »

Sorry for the radio silence - my wife and I were both infected by a nasty virus - by the family! Over a week spent with fever and not eating... Not ideal conditions for thinking or working, so it was self-inflicted lockdown.
The brain cell has started to function again, so armed with Paula's suggestions I worked through my code again and corrected many values. It all helps understanding!
Hello world
Hello world
Needless to say, with the right parameters - it works. Thanks Paula, thanks all. The display works a treat in // mode, driven by a 6522. This now opens the way to a small, portable, device.
PaulaM wrote:
I have a microscope (at home and at work)
Are there any microscopes out there in china.com land that are worth the money? As a hobbyist, I mean.
Glenn-in-France
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: 6502 with the RA8875

Post by barnacle »

Someone mentioned one a few days ago that looked interesting, but I can't recall where...

Neil

edit: the search function... :roll: This one: https://www.amazon.com/dp/B08GSS1WLX
PaulaM
Posts: 56
Joined: 07 Oct 2025
Location: UK

Re: 6502 with the RA8875

Post by PaulaM »

GlennSmith wrote:
Sorry for the radio silence - my wife and I were both infected by a nasty virus - by the family! Over a week spent with fever and not eating... Not ideal conditions for thinking or working, so it was self-inflicted lockdown.
The brain cell has started to function again, so armed with Paula's suggestions I worked through my code again and corrected many values. It all helps understanding!
Hello_world.jpg
Needless to say, with the right parameters - it works. Thanks Paula, thanks all. The display works a treat in // mode, driven by a 6522. This now opens the way to a small, portable, device.
What size screen is that? 7"?
I recently got a 9" RA8875 from BuyDisplay and it doesn't work :(
GlennSmith wrote:
Are there any microscopes out there in china.com land that are worth the money? As a hobbyist, I mean.
I got a stereo microscope, was about £700 but I bought it when I ran my own cottage business. When I closed the business (thank you covid :evil: ) I kept it (thank you accountant :D )

They're cheaper now - https://www.amazon.com/AmScope-SM-3B-Pr ... ef=sr_1_27
User avatar
AndrewP
Posts: 368
Joined: 30 Aug 2021
Location: South Africa

Re: 6502 with the RA8875

Post by AndrewP »

barnacle wrote:
Someone mentioned one a few days ago that looked interesting, but I can't recall where...
edit: the search function... :roll: This one: https://www.amazon.com/dp/B08GSS1WLX
Might have been me, or maybe not. I don't remember. Either way I'm using that digital microscope and it's really capable for the price. I'd assumed it would be some fake low res thing with awful lenses but, nope, it gets the job done.
Screenshot from simple_aac_recording0.png
A screenshot of a video I took of me fumbling around with an address decoder. The quality is good enough to see solder bridges and unsoldered leads easily. Much better than squinting through a magnifying glass.
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: 6502 with the RA8875

Post by barnacle »

The thing I'm seeking is a large lens-subject separation. The cheapo 'webcam' microscope I have now has the magnification, but with a spacing to the subject of less than an inch, it's tricky to get a soldering iron under. I can't really recommend it, but it's better than nothing.

Plus I use an x5 headpiece so I can focus close for general use.

You've definitely got some solder bridges there!

Neil
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: 6502 with the RA8875

Post by barnacle »

In a past life, the company had a couple of these Mantis microscopes. A lot of people don't get on with infinity optics, but I loved 'em. The price, however, is somewhat on the high side for hobby use.
Mantis-Elite-Stereo-Microscope-2X-20X-Magnification.jpg
(We used to do things like dismantling electric motors with 10mm diameter, removing the rotor coils, and rewinding them with high-temperature wire. Fiddly.)

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

Re: 6502 with the RA8875

Post by GlennSmith »

PaulaM wrote:
What size screen is that? 7"?
I recently got a 9" RA8875 from BuyDisplay and it doesn't work :(
Yes, it's a 7" display. I had to rewire all of the jumpers to get it to work in 6800 // mode, it was hard-wired for 8080 mode. I followed the diagram to the letter, and presto! the beast came alive.
Note the jumper list...
Note the jumper list...
(EDIT: Thanks for the A'zon link.)
Glenn-in-France
Post Reply