Banggood 0.96" GLCD Geekcreit Display

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Banggood 0.96" GLCD Geekcreit Display

Post by ianjoh »

Just experimenting with a 0.96" GLCD to learn how to drive it before using in a project.
I got it from Banggood but I may have got the wrong one or have it configured incorrectly as it is running at a Snails pace.
I am running it in SPI mode but it takes almost a second to write "hello world"
The connections I have are.

PIC FC component DISPLAY
Port B1 RS DC
Port B2 SD D1
Port B3 SCK D0
Port B4 RST RES
Port B6 CS CS

Feature:

Control chip: SSD1306
Display area: 21.744 x 10864mm
Physical size: 27.3 x 27.8mm
Interface type: Default 4-wire SPI
Switchable rear resistor to use 3-wire SPI, IIC interfaces
Number of pins: 7
Display color: yellow blue
Working temperature: -40~70°C
Net weight: 5g

Interface definition:

1> GND (Power ground)
2> VCC (Power + 3.3-5V)
3> D0 (SPI clock line for SPI interface and IIC clock line for IIC interface)
4> D1 (SPI data line for SPI interface and IIC data line for IIC interface)
5> RES (OLED reset, OLED needs to be reset once after power-on)
6> DC (SPI data/command selection pin, used to set IIC address when IIC interface)
7> CS (OLED SPI chip select, active low, if you do not want to use must be grounded)

I have attached FC file, its a bit messy as it was an old project that I have just stripped down as the PIC was already set up on my breadboard.

thanks
Ian
Attachments
GLCD_SPI.fcfx
(23.18 KiB) Downloaded 130 times
Screenshot_2020-04-11-22-52-55 (1).png
(236.45 KiB) Downloaded 458 times
Last edited by ianjoh on Wed Apr 15, 2020 10:38 am, edited 3 times in total.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by viktor_au »

Hello Ian

You have two oled's in your program.
However you do use only one in your test program.
What about the second one?
Is it connected as well on your hardware setup?
Attachments
oled-1.jpg
(26.83 KiB) Downloaded 445 times

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by ianjoh »

Hi Viktor
I had only one connected at the time and removed any initialisation of it so I don't think it had any bearing on the problem. I found another post about using this display on I2c so I changed the resistors and the component macro inc all the connections but it refused to even light up. it hangs with the led lit when writing to the display. I have ordered a similar display that is only i2c to play with. I might try a different pic to see if anything changes.
Thanks Ian

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by viktor_au »

Hi again

I prefer to stay away from SPI mode and buy only i2c ssd1306 as it is easy to setup and reasonably fast to work.
-----------
I tested your program again and FC8 reported some errors
Attachments
oled_1.jpg
(56.29 KiB) Downloaded 436 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by Benj »

Hello Ian,

The chip in your project only seems to be configured to run at 1MHz. This seems slow and will result in a very slow display.

See here for help configuring your device and getting it running at the right speed.
https://www.matrixtsl.com/wiki/index.ph ... ED_flasher

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by ianjoh »

Hi all, thanks for your replies.
The strange thing with the frequency is that the speed of the display is the same whether it is set to 1Mhz internal or 12Mhz external.
After each frequency change I do an Led flasher check so that looks like it is not causing the problem.
Could it be a handshake type problem either hardware or software?

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by ianjoh »

Quick update, I had a look at the data sheet for the PIC that is on the board, the 12Mhz external crystal is on the secondary oscillator input, T1OSO & T1OSI. Moved it to the primary oscillator OSC1 & OCS2 and the difference is significant! At 12Mhz it is faster, can I use the PLL to speed it up even more? I don't really understand that part of the configuration settings.
At least I have got some change in the display speed as I thought I was going nuts!
Attachments
GLCD_SPI.fcfx
(16.86 KiB) Downloaded 155 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by Benj »

Glad you're making progress and running faster now.

Have a go with these settings and hopefully it will go even faster.
config.jpg
config.jpg (117.11 KiB) Viewed 3142 times

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: Banggood 0.96" GLCD Geekcreit Display

Post by ianjoh »

Thanks Ben - every little helps!
Ian

Post Reply