Oled lcd 128*64 using I2c protocol interfacing with atmega16

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello, 

I am trying to interface my oledd i2c LCD 128*64 using I2c with my controller Atmega 16 I had written code and had given the slave address as 0x3c but it's not working I don't know the reason I had also initialized oled and had given the SSD1306 address but still I don't know why its not working

Please help,

I am giving my c code please find the mistake

Attachment(s): 

Last Edited: Mon. Jun 25, 2018 - 01:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anurag_Maheshwari wrote:
had given the slave address as 0x3c

And is that the correct Slave Address?

 

And is it in the correct form (7-bit or 8-bit) expected by your I2C code?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I2C will tell you what is wrong, but all of your functions are void functions and thus you are ignoring any feedback it could provide you.

I would suggest using proven I2C code such as peter fluery's I2C functions to at least prove your h/w works and you have proper pull up resistors on your I2C lines.

 

Welcome to AVR Freaks!

Make the above corrections and if your still having problems come back and you will find more help.

 

 

Jim

 

Click Link: Get Free Stock: Retire early!

share.robinhood.com/jamesc3274