0
\$\begingroup\$

I have an ILI9341 ST7735 240 x 320px display which I bought intending to use with a 6502 IC. However I cannot find any details online of the basic method of interfacing - all electronics projects seem to use some or other C/Arduino/semi-proprietorial library, which is probably beyond the scope of any 6502 project, and which defeats the point of comprehending exactly how to interface pixel displays with a 6502 or other early chips.

The nearest I have gotten to low-level control is the datasheet for the ILI9341, although the PIC18L2X4XK22 looks compatible with the display, but the 539-page datasheet for that PIC is a bit long if there is a simpler way.

Can anyone suggest an easier route to interfacing a colour display to the 6502 or is PIC interfacing a necessary evil in rigging up displays with older tech? Basically is there a way/tutorial for breadboard-level assembly-type control of a pixel display, without having to bring in masses of other components - Arduinos etc?

I am, of course, using the modern-day Western Digital 14 MHz version of the 6502 to do this, together with a 6522 VIA to (hopefully) speed things up. As ever, displaying basic text will do fine for now, though it would have to be in colour.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Of course it is possible. It is just a bit unclear which exact display you have to know what interface it has so with this info the question can't be answered. Both ILI9341 and ST7735 are just display controller chips, so even if your module has either of those chips, it still does not tell anything how to interface it. You need to read the datasheet/manual of the display module to find out how to connect and use it. \$\endgroup\$
    – Justme
    Commented Aug 3, 2021 at 11:29
  • \$\begingroup\$ If it's any help, the aliexpress product description is "1.44/1.77/1.8/2.2/2.4/2.8 Inch TFT Color Screen LCD Display Module Drive ST7735 ILI9225 ILI9341 Interface SPI 128*128 240*320" I don't know if there is a specific datasheet for the display or whether I'm expected to extrapolate from a generic one, e.g. for the ILI9341 or SPI or ST7735 etc. \$\endgroup\$
    – Hektor
    Commented Aug 3, 2021 at 11:32
  • \$\begingroup\$ So it could be anything with SPI interface and details are unknown. That is the problem with these shops, you have now a display which has no datasheet or manual what it is and how to use it. \$\endgroup\$
    – Justme
    Commented Aug 3, 2021 at 11:39
  • \$\begingroup\$ I believe this is the datasheet for the other chip I bought rhydolabz.com/documents/33/ST7789.pdf which I'd be just as happy to get working. If, as the answer from Marcus M. suggests the datasheet is everything, maybe I have all the tools I need? \$\endgroup\$
    – Hektor
    Commented Aug 3, 2021 at 11:43
  • \$\begingroup\$ It depends which bus interface you are going to use. How do you even know if the power supply and bus voltages are compatible? Connecting 5V outputs to 3.3V inputs can cause damage for example. \$\endgroup\$
    – Justme
    Commented Aug 3, 2021 at 11:47

1 Answer 1

1
\$\begingroup\$

Well, you've found the datasheet, which lists the commands you can send to the device; that's all you really need: look up which commands you want to use and write code that uses them.

all electronics projects seem to use some or other C/Arduino/semi-proprietorial library

Well, you've got exactly two choices: use a library or write yourself. I'd personally say, a C library is pretty much what you'd be looking for – absolutely portable, all you probably need to do is throw it a function pointer to a method of sending control words on your hardware.

Now, a 6502 might not be a great target for C code (with cc65, there is a C compiler for it). But that's really your choice here: If you really want to build something "simple", then using a 46 year old microprocessor is probably a bad start. There's nearly half a century of microprocessor design for the benefit of the developer since the 6502 was released – and the 6502 was explicitly not designed for software ease, but for cheap manufacturing, under large time pressure.

EDIT seems from your comment you don't actually know what device you have – well, then you're buying the wrong thing. You need to know which hardware you deal with. So, no definite info, no sale, simple as that. Don't be the electronic waste disposal for an aliexpress seller.

\$\endgroup\$
10
  • \$\begingroup\$ The controller datasheets are useless at this point, as it's not know which interface(s) the LCD module exposes from all the possible interfaces the controller supports. It could be serial or parallel interface, and parallel could be CPU or RGB interface, serial could be 3 or 4 wire. \$\endgroup\$
    – Justme
    Commented Aug 3, 2021 at 11:37
  • \$\begingroup\$ Thanks for the advice. I edited the question to show that I am using the 14MHz version of the chip with step-through to keep things straightforward. Ultimately I intend to move up to the 68000 family of chips, I just thought getting things like a display working on the 65c02 would make building a 680x0 system a lot easier. Should I simply be jumping in at the deep end? \$\endgroup\$
    – Hektor
    Commented Aug 3, 2021 at 11:38
  • \$\begingroup\$ @Marcus M. If as you say, the datasheet is all I need, then I guess I'm pretty much set. Heavy couple of days reading admittedly. \$\endgroup\$
    – Hektor
    Commented Aug 3, 2021 at 11:39
  • 1
    \$\begingroup\$ why would using a predecessor to the 68000 be easier than using the 68000 itself? It's not like technology usually becomes worse over time! For the 68000, GCC even has a backend – you can compile modern C code for it, directly. If you have a C library, it will probably make things much much much much easier. \$\endgroup\$ Commented Aug 3, 2021 at 11:44
  • \$\begingroup\$ I thought the step-through on the 65c02 would simplify things, but I'll take your advice. Free-running 68000 here I come. \$\endgroup\$
    – Hektor
    Commented Aug 3, 2021 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.