SSD1322

For general Flowcode discussion that does not belong in the other sections.
Maverick
Posts: 68
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

SSD1322

Post by Maverick »

I purchased an ssd1322 spi display with the connections shown below, the flowcode ssd1322 buffered display has only 4 pins, CS,SD.SCK.RST
Please advise how to connect display in flowcode so it will compile to pic micro
OLED pin OLED pin name
#01 GND
#02 Vcc
#04 CLK
#05 DIN
#14 D/C
#15 RES
#16 CS

chipfryer27
Valued Contributor
Posts: 1165
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 287 times
Been thanked: 415 times

Re: SSD1322

Post by chipfryer27 »

Hi

That display can operate in parallel, 4-pin SPI or 3-Pin SPI depending on how it is configured and that most likely will depend on the manufacturer of the display (many out there).

SPI connections are SCK (clock), SD (data), CS (chip select) and RST (reset)

Do you have any more details on the board such as manufacturer or even a link to where you bought it as that may give you more details on pin out / config?

I'm not familiar with it, but it looks like

Pin 1 and 2 are your Ov and Supply voltage respectively, check datasheet for limits.
Pin 4 is your Clock so this would equate to SCK
Pin 5 is your Data so this equates to SD
Pin 15 appears to be Reset (RST)
Pin 16 appears to be Chip Select (CS)

That leaves pin 14 D/C which I think is Data / Command. Depending if high/low the chip treats the data as actual data or commands. I'd perhaps hold it High and see what happens.

Depending on your PIC the pin outs may vary, but if you drag the component on to your 2D panel and look at properties it will tell you which pins are CS/SD etc

Regards

Maverick
Posts: 68
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Re: SSD1322

Post by Maverick »

HI
Finally back on this display
I have configured the display pcb for 3 wire spi. connecting the d/c pin low as per the attached datasheet image.
I have written a test program from scratch also attached which works on the simulator but when I download it to the bl0080 all I get on the display is a speckled pattern shown in attached photo.
when compiling, the following warnings appeared which I don't know what they are and whether they are causing the issue
TEST3.c: 2743: (764) mismatched comparison (warning)
TEST3.c: 2743: (757) constant conditional branch (warning)

I might try and create a custom part by copying the existing one and editing it to be similar to ssd1306
Attachments
TEST3.fcfx
(9.43 KiB) Downloaded 46 times
ssd1322_interface.png
ssd1322_interface.png (69.47 KiB) Viewed 1863 times
speckled.jpg
speckled.jpg (29.9 KiB) Viewed 1863 times

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: SSD1322

Post by BenR »

Hello,

I've added a new property to the component for you that now allows you to choose the 3-wire or 4-wire SPI mode and for the 4-wire SPI mode the additional D/C pin is shown.

The new component is available from the Help -> Library updates menu.

Let us know how you get on.

Maverick
Posts: 68
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Re: SSD1322

Post by Maverick »

Hi Ben

Thanks for that unfortunately it didn't work, I did spot that the d/c pin was set to port B2 which was already in use so I changed it to B1.
I also tried a BL0139 display using the same flowcode file (obviously changed the display used) which worked and there were no warnings in the compile file. Googling this speckling site below suggests that the speckling is the initialisation phase of the display and its not fully initialising and clearing the display prior to text display
https://iotexpert.com/debugging-ssd1306 ... -problems/

On another note which this exercise has shown up which would be a useful enhancement is to change all occurrences of a component library macro to another similar one. eg ssd1322 to BL0139. this could be achieved either by renaming dashboard part or find and replace on flowcode

Maverick
Posts: 68
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Re: SSD1322

Post by Maverick »

found this while googling, not that it helps much
https://www.matrixtsl.com/mmforums/view ... hp?t=19742
i have also had an ssd1309 working using the ssd 1306 component

Maverick
Posts: 68
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Re: SSD1322

Post by Maverick »

Just tried it using the ssd1309. attached photo shows it worked, code is also attached, no compile warnings
Attachments
ssd1309.jpg
ssd1309.jpg (71.42 KiB) Viewed 1839 times
TEST5.fcfx
(9.61 KiB) Downloaded 45 times

chipfryer27
Valued Contributor
Posts: 1165
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 287 times
Been thanked: 415 times

Re: SSD1322

Post by chipfryer27 »

Hi

Glad to hear you have a working display. I notice in your v3 you were running at 32MHz but had the Clock Speed set at 8MHz, now it's at 32 too. Also, in your display properties you only have one font enabled (0), but you call font 1 in your code so I'm guessing it is just defaulting. You can have up to four different fonts, 0-3 which I find very handy.

Regards

Maverick
Posts: 68
Joined: Wed Dec 02, 2020 10:58 am
Has thanked: 27 times
Been thanked: 8 times

Re: SSD1322

Post by Maverick »

Hi
I already had the ssd1309 display working in the past, I just used it to check the flowcode program for the ssd1322 was working correctly. clock speed has no effect on the ssd1322 display. my thoughts are that as the ssd1306 compiles without any warnings and the ssd1322 has warnings when compiled, something must be wrong with ssd1322 flowcode part.

BenR
Matrix Staff
Posts: 1747
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: SSD1322

Post by BenR »

Great glad it's working but it looks to me like it's skipping over every other horizontal line.

This could be a difference between the 1322 and the 1309. I'll have another look at the component and see if I can purchase a 1322 display so we can get this properly sorted for you.

edit: there not cheap are they! I've bought one that can be configured for parrallel and also 3/4 wire SPI so hopefully that will allow me to get both components up and running correctly. Should be here in a couple of weeks.

https://www.aliexpress.com/item/3294928 ... 18029aTmbR

Post Reply