SSD1322

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

SSD1322

Post by Lord Grezington »

I apologise if this is a repeated post, however I was sure I posted it yesterday but it seems to have disappeared... ( :? perhaps forgot to press the button?)

Anyway, I have attached a datasheet for a display I am looking to use in a project. Thing is using parallel is pin hungry. Can this one be used using the PIC RAM? if so, how much RAM is needed?

Secondly, if we use the parallel component, do we need to use all the data pins? (as we have an option to only use 4 on alphanumeric displays).

Thanks
NHD-2.7-12864WDY3.pdf
Datasheet
(864.78 KiB) Downloaded 180 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: SSD1322

Post by Benj »

Hello,

The buffered component using three/four wire SPI will require (128 x 64) / 8 = 1024 Bytes of RAM.

The none buffered component is able to read back from the displays memory and so does not require the buffer.

Hope this helps.

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

Thanks Ben

But I dont really like the idea of using up the RAM and parallel consumes all my pins. I have decided to go with the EA DOGM128B-6 using the ST7565R with th SPI.

Thanks

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

Hi Ben

I went with the EA DOGM128B-6 using the ST7565R, however I am getting compiler errors when I attempt tp initialise.

using updated 32-bit floating-point libraries; improved accuracy might increase code size
Panel Test.c: 835: (1250) could not find space (128 bytes) for variable _FCV_0b3a1_gLCD_ST7565R_SPI1__DRAM0
Panel Test.c: 835: (1262) object "_FCV_0b3a1_gLCD_ST7565R_SPI1__DRAM0" lies outside available data space (warning)
(908) exit status = 1
(908) exit status = 1

Any idea's how I can solve this? I am using a 16F15385

Thanks

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: SSD1322

Post by medelec35 »

Hi,
Your microcontroller has not got enough RAM memory.
Try compiling using 18F27K40.
That has run every gLCD I have thrown at it, even large touch screen that has loads of bitmap images and shapes with a working clock analogue clock.
Martin

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

Hi Martin

Thanks for this.

Yes, it compiles fine with the 27K40. I will need to do some mods to the hardware as I had a pcb made...

I have a similar problem on another project where I am looking to use the SSD1306 i2c component with the 18F24Q10. When I use the 25Q10 or even the 26Q10 I still get compiling errors. Is this the same issue?

Thanks

C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_UART.c:
382: #define _PIE3_RCIE_POSN
^ (111) redefining preprocessor macro "_PIE3_RCIE_POSN" (C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic\include\pic18f24q10.h: 3353) (warning)
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_I2C.c: FC_CAL_I2C_Master_Init_1()
256: = 14;
^ (195) expression syntax
257: = 13;
^ (195) expression syntax
331: tris |= (1 << (0));
^ (192) undefined identifier "tris"
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_I2C.c: FC_CAL_I2C_Slave_Init_1()
625: = 14;
^ (195) expression syntax
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1
Autoclose turned off
FINISHED
Compile errors.png
(160.34 KiB) Downloaded 376 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: SSD1322

Post by medelec35 »

No, that error is not related to memory.
Check the I2C pins are mapped correctly?
I'm out at the moment.
When I get back home I will check it out.
Martin

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

No need, thank you very much Martin!!!

I made an amature mistake by having a I2C component as well as the LCD, and now compiles.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: SSD1322

Post by medelec35 »

That's great!
Happens to us all, no matter how much experience we have.
Thanks for letting us know.
Lord Grezington wrote: I will need to do some mods to the hardware
Another route to try is request 18F56K42?
Not sure if possible or not?
It has the same amount of pins 16F15385 has.
Although it's not supported with compiler version shipped with Flowcode, it is supported with the latest version.
I have explained how to enable that here,
Martin

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

Hi Martin

With the SSD1306, it compiles fine with no warnings. However, when I put it into hardware I start getting issues... As soon as I initialise the SSD1306, the program no longer works. I have just used a simple blinker program to test, I am running on the HFINTOSC HFFRQ = 64Mhz.

I have attached a program for you to take a quick look.

EDIT - One thing I need to note. The cable for hte SSD1306 was reveresd so I needed to order a new one. If I enable the SSD1306 without the display being connected, would this cause the program to crash as its not getting a ACK from the display via the I2C?

Thanks
Attachments
OLED Testing V1.0.fcfx
(28.13 KiB) Downloaded 157 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: SSD1322

Post by medelec35 »

Lord Grezington wrote:However, when I put it into hardware I start getting issues... As soon as I initialise the SSD1306, the program no longer works
I get that when there is a hardware issue or a bug in the Flowcode component.
See if it works in software mode first.
If not carefully check connections.
Martin

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

Thanks Martin

I will check this when my correct cables come in.

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: SSD1322

Post by Benj »

Hello,

The lock up could potentially be caused by clock stretching. Do you have pull up resistors (external or internal) on the SDA, SCL traces?

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

Hi Ben

The PIC no longer locks up :D

However Im not getting anything on the display. I have simplified the program to just have the OLED and attached it. The blinker on there is just a verification that the program is running. I have tried swapping the address.

I have also attached the schematic for hte OLED board, its fairly simple. The U1 connector pins go directly into the PIC on the main board.

I have also checked the SDA SCL pins with a scope, the CLK looks like clock signal and the SDA does look like a Data signal
OLED Schematic.png
(31.85 KiB) Downloaded 67 times
Attachments
OLED Testing V1.0.fcfx
(28.05 KiB) Downloaded 110 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: SSD1322

Post by LeighM »

Looks like you are holding OLedReset low.
Try releasing it high again after a few mS

Lord Grezington
Flowcode V4 User
Posts: 288
Joined: Wed Nov 02, 2011 11:15 pm
Has thanked: 29 times
Been thanked: 30 times
Contact:

Re: SSD1322

Post by Lord Grezington »

Hi Leigh

The datasheet does say to take it low, however taking it high did work :idea: perhaps I am just miss reading it... But it does now work
OLED Schematic.png
(283.94 KiB) Downloaded 57 times
Thanks

Post Reply