CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

I need SSD1309 library code

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hsogukpinar



Joined: 20 Sep 2021
Posts: 8

View user's profile Send private message Send e-mail

ssd1309 library code
PostPosted: Fri Sep 24, 2021 5:55 am     Reply with quote

I need SSD1309 code library please anybody who has, share the sample code. I will go crazy. I have 16f877a and 18f4550, I need CCS C code.
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Sat Sep 25, 2021 2:49 am     Reply with quote

Your huge problem is all the chips you are talking about are 5V chips.
These displays are 3.3v devices. Pull ups to 3.3v, will not give acceptable
operation to a PIC I2C connection. You _might_ be able to get it to work
by having a 3.3v supply to the chip, pullups to 3.3v, and then in the PIC
I2C setup code specify 'SMBUS' (making sure your chip has support for this
in the datasheet first).
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Sep 25, 2021 5:09 am     Reply with quote

As Mr. T says, you first need to get the device properly connected. You really need to post which MODULE you're using. The SSD1309 is just a 'chip', not the LCD or PCB. I downloaded the SSD1309 datasheet and while the LOGIC interface needs 3 volts, the DISPLAY driver section needs 7-16 volts, so I'll assume a MFR of SSD1309 DISPLAY modules, will have builtin power supply for the display. They may, or may not, also include the necessary 3v to 5v, 5v to 3v level shifters for the LOGIC pins.
Once you confirm how to properly connect it, configure for I2C interface, then download PCMPs 'I2C scanner' program from the 'code library' forum here. Program your PIC with it, and run. It will 'find' the display and it's I2C device address. If it doesn't find it, you'll have to see why.
Once this works THEN look for a driver for the display. I saw there are Arduino drivers but they MUST be modified and converted to become CCS C versions. Also, there may be a similar device (1306, 1307, 1308, ????) that shares a common command and font structure, possibly use that and modify as needed.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Sat Sep 25, 2021 5:43 am     Reply with quote

Jay the SSD1306 drivers I've already posted in the code library do work for
this chip (I do mention this in the code library). There was an issue for
me, that I had to operate the reset line to the chip to get it to work
properly, it did not default to resetting correctly.

As you say the critical thing is he needs to get the interface to the chip working
first. Most of the standard boards for chips like the Arduino, do not have
the level shifting needed to make it work for a 5v PIC.... Sad
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group