Question on wiring of a ST7565 as per Les's example code in LCD_ST7565R_SPI.inc

Started by TimB, Mar 16, 2023, 08:41 AM

Previous topic - Next topic

TimB


Hi

I'm trying to get an LCD to work that uses the ST7565. At this stage I have looked at the UGL code but the example is for different device and trying to figure out what is needed is not something I have had success with.

Searching the forum I came across a post where someone is using an old Les file. Its not using procs but seems easy enough to update and re comment.

https://protoncompiler.com/index.php/topic,312.msg2332.html#msg2332

Using that as a basis I'm working on converting it to work with a pic18f27q10. It uses hardware spi but using the PPS feature on the device I can remap my pins to the MSSP module SCK1 and SDO1 pins
However there is a pin in the code I'm not sure on its the A0 pin. The code was written for a EA DOGM128-6 device but hunting through the data sheet I found for that I could not see what pin that was and translate it to my device

Can anybody help?
 

'---[SPI/GLCD interface Defines]-------------   
    Symbol CS1B     = PORTC.7                   ' CS1B is the EADOGM128-6 "Chip Select Not" pin
    High CS1B                                   ' make sure it does't get any
    Symbol A0       = PORTC.2                   ' LCD A0: 0 = Command, 1 = data
    Symbol GLCD_RST = PORTB.0                   ' Reset Active low
    Low GLCD_RST                                ' keep in reset
                             

My lcd is this one https://www.aliexpress.com/item/1005001621784395.html?spm=a2g0o.order_list.order_list_main.23.21ef1802ynRGiN

Attached is the schematic

St7565 board.pdf

Stephen Moss

The RS pin is usually the one used to tell the LCD whether it is being sent a Command (instruction) or character data information.
Therefore as the comments for symbol A0 are 0 = Command, 1 = Data then to me it would seem that A0 should be referenced to the I/O pin driving the displays RS pin. 

top204

I had a few ST7xxx type LCDs that used the letters, DC, A0 and RS for the Data/Command pin. They all operate the same, it just seems to be the manufactures who cannot make their mind up on terminology. :-)

Also, on the backlight controlling pin, some LCDs wanted it low to turn on the backlight and some wanted it high and direct to the LEDs themselves.