olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.02k stars 1.04k forks source link

tinyAVR 1-series issue #918

Closed sognatore99 closed 5 years ago

sognatore99 commented 5 years ago

I have attempted to get this to work on a TinyAVR series 1 (1614 in particular and a SSD1306 display) using Atmel Studio 7, but have not been successful. I have attempted to use various I2C configurations and followed the example provided in replacing the 2nd parameter in this setup command u8g2_Setup_ssd1306_128x64_noname_1(&u8g2, U8G2_R0, u8x8_byte_avr_hw_i2c, u8x8_avr_delay) with one that would call the appropriate routines for hardware but to no avail. So can this software work with the Tiny AVR series 1? I will note that my main programming language is not c++ and I have only worked with I2C with Attiny 85. I did get an I2C implementation to work on the 1614 with a different OLED driver using "simple_i2c_fgras78" but wanted to use this library instead.

olikraus commented 5 years ago

This is not supported as such, but there are some hints here: https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform#atmel-avr

I do not know u8x8_byte_avr_hw_i2c but probably you can use u8x8_byte_sw_i2c and a custom gpio and delay procedure (https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform#template-for-the-gpio-and-delay-callback) for a first quick and dirty implementation.