Written some code for an ATtiny1606. Using the Adafruit_SSD1306.h to drive a 128x32 OLED.
I need mostly text (so yes, that could use the much smaller U8G2 text library or similar), but I need some very basic graphics, so I have had to go with the Adafruit_SSD1306.h.
I only need a rectangle command and a line command... that is literally it.
It fits on the ATtiny, but a 99% and I have no room for tinkering or adding any extra features.
Anyone know of a much lighter footprint library for drawing basic graphics? I tried using text based symbols for the lines but it just doesn't work well enough.
My only other though is possibly draw the graphics using some kind of array?
Yes, it does. U8X8 is part of U8G2, a part that only does text. U8G2 does graphics too.
U8G2 can use a "paged" mode which requires only 1/8th as much RAM as the Adafruit library. This can make updating the screen more difficult, because you can't just update any part of the screen any time you like. You have to re-draw the whole screen each time you need to change one part. As long as you know that in advance of writing your code, it's usually easy enough to deal with.
OK. Wanted to use the U8x8 Full buffer version because of the graphics commands...
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from sketch\0-10v_Tester_v11.ino.cpp:1:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:101: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\libraries\Wire\src\twi.c:24:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:13: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^~~~~~~
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\libraries\Wire\src\twi_pins.c:30:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:13: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^~~~~~~
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\libraries\Wire\src\Wire.cpp:35:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:101: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from C:\Users\steve\Documents\Arduino\libraries\U8g2\src\U8x8lib.h:43,
from C:\Users\steve\Documents\Arduino\libraries\U8g2\src\U8x8lib.cpp:40:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:101: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from C:\Users\steve\Documents\Arduino\libraries\U8g2\src\U8g2lib.h:49,
from C:\Users\steve\Documents\Arduino\libraries\U8g2\src\U8g2lib.cpp:40:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:101: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\libraries\SPI\src\SPI.h:24,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\libraries\SPI\src\SPI.cpp:22:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:101: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^
c:/users/steve/appdata/local/arduino15/packages/dxcore/tools/avr-gcc/7.3.0-atmel3.6.1-azduino6/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: address 0x80411d of C:\Users\steve\AppData\Local\Temp\arduino_build_494949/0-10v_Tester_v11.ino.elf section `.bss' is not within region `data'
c:/users/steve/appdata/local/arduino15/packages/dxcore/tools/avr-gcc/7.3.0-atmel3.6.1-azduino6/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: address 0x80411d of C:\Users\steve\AppData\Local\Temp\arduino_build_494949/0-10v_Tester_v11.ino.elf section `.bss' is not within region `data'
collect2.exe: error: ld returned 1 exit status
Yea... lets give that option a miss
Too much RAM usage I am guessing
OK. Gave up on the U8x8 and U8x2 libraries. Just not worth the grief getting them to work.
Only managed to get some text displayed with the U8x8M but nothing else.
So tried basic Tiny4kOLED.h sketch and got this disaster.
..... I'll stick to the working Adafruit_SSD1306.h. Life's too short
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from sketch\0-10v_Tester_v11.ino.cpp:1:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:101: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp: In function 'void USI_TWI_Master_Initialise()':
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:64:3: error: 'PORT_USI' was not declared in this scope
PORT_USI |=
^~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:64:3: note: suggested alternative: 'PORT_t'
PORT_USI |=
^~~~~~~~
PORT_t
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:66:11: error: 'PIN_USI_SDA' was not declared in this scope
<< PIN_USI_SDA); // Enable pullup on SDA, to set high as released state.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:69:11: error: 'PIN_USI_SCL' was not declared in this scope
<< PIN_USI_SCL); // Enable pullup on SCL, to set high as released state.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:71:3: error: 'DDR_USI' was not declared in this scope
DDR_USI |= (1 << PIN_USI_SCL); // Enable SCL as output.
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:74:3: error: 'USIDR' was not declared in this scope
USIDR = 0xFF; // Preload dataregister with "released level" data.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:75:3: error: 'USICR' was not declared in this scope
USICR = (0 << USISIE) | (0 << USIOIE) | // Disable Interrupts.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:75:17: error: 'USISIE' was not declared in this scope
USICR = (0 << USISIE) | (0 << USIOIE) | // Disable Interrupts.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:75:33: error: 'USIOIE' was not declared in this scope
USICR = (0 << USISIE) | (0 << USIOIE) | // Disable Interrupts.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:76:17: error: 'USIWM1' was not declared in this scope
(1 << USIWM1) | (0 << USIWM0) | // Set USI in Two-wire mode.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:76:33: error: 'USIWM0' was not declared in this scope
(1 << USIWM1) | (0 << USIWM0) | // Set USI in Two-wire mode.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:76:33: note: suggested alternative: 'USART0'
(1 << USIWM1) | (0 << USIWM0) | // Set USI in Two-wire mode.
^~~~~~
USART0
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:77:17: error: 'USICS1' was not declared in this scope
(1 << USICS1) | (0 << USICS0) |
^~~~~~
In file included from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\variants\txy6/pins_arduino.h:27:0,
from C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/Arduino.h:686,
from C:\Users\steve\Documents\Arduino\libraries\TinyWireM\TinyWireM.h:50,
from C:\Users\steve\Documents\Arduino\libraries\TinyWireM\TinyWireM.cpp:32:
C:\Users\steve\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.8\cores\megatinycore/timers.h:53:101: note: #pragma message: Note: This part does not have a TCD, hence there is no PWM from TCD available.
#pragma message("Note: This part does not have a TCD, hence there is no PWM from TCD available.")
^
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:77:33: error: 'USICS0' was not declared in this scope
(1 << USICS1) | (0 << USICS0) |
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:77:33: note: suggested alternative: 'USART0'
(1 << USICS1) | (0 << USICS0) |
^~~~~~
USART0
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:78:17: error: 'USICLK' was not declared in this scope
(1 << USICLK) | // Software stobe as counter clock source
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:79:17: error: 'USITC' was not declared in this scope
(0 << USITC);
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:80:3: error: 'USISR' was not declared in this scope
USISR = (1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:80:3: note: suggested alternative: 'ISR'
USISR = (1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~
ISR
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:80:17: error: 'USISIF' was not declared in this scope
USISR = (1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:80:33: error: 'USIOIF' was not declared in this scope
USISR = (1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:80:49: error: 'USIPF' was not declared in this scope
USISR = (1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:81:17: error: 'USIDC' was not declared in this scope
(1 << USIDC) | // Clear flags,
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:82:19: error: 'USICNT0' was not declared in this scope
(0x0 << USICNT0); // and reset counter.
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:82:19: note: suggested alternative: 'USART0'
(0x0 << USICNT0); // and reset counter.
^~~~~~~
USART0
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp: In function 'unsigned char USI_TWI_Start_Transceiver_With_Data(unsigned char*, unsigned char)':
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:161:13: error: 'USISIF' was not declared in this scope
(1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:161:29: error: 'USIOIF' was not declared in this scope
(1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:161:45: error: 'USIPF' was not declared in this scope
(1 << USISIF) | (1 << USIOIF) | (1 << USIPF) |
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:162:13: error: 'USIDC' was not declared in this scope
(1 << USIDC) | // Prepare register value to: Clear flags, and
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:163:15: error: 'USICNT0' was not declared in this scope
(0x0 << USICNT0); // set USI to shift 8 bits i.e. count 16 clock edges.
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:163:15: note: suggested alternative: 'USART0'
(0x0 << USICNT0); // set USI to shift 8 bits i.e. count 16 clock edges.
^~~~~~~
USART0
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:229:7: error: 'PORT_USI' was not declared in this scope
PORT_USI &= ~(1 << PIN_USI_SCL); // Pull SCL LOW.
^~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:229:7: note: suggested alternative: 'PORT_t'
PORT_USI &= ~(1 << PIN_USI_SCL); // Pull SCL LOW.
^~~~~~~~
PORT_t
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:229:26: error: 'PIN_USI_SCL' was not declared in this scope
PORT_USI &= ~(1 << PIN_USI_SCL); // Pull SCL LOW.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:230:7: error: 'USIDR' was not declared in this scope
USIDR = *(msg++); // Setup data.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:234:7: error: 'DDR_USI' was not declared in this scope
DDR_USI &= ~(1 << PIN_USI_SDA); // Enable SDA as input.
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:234:25: error: 'PIN_USI_SDA' was not declared in this scope
DDR_USI &= ~(1 << PIN_USI_SDA); // Enable SDA as input.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:266:7: error: 'DDR_USI' was not declared in this scope
DDR_USI &= ~(1 << PIN_USI_SDA); // Enable SDA as input.
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:266:25: error: 'PIN_USI_SDA' was not declared in this scope
DDR_USI &= ~(1 << PIN_USI_SDA); // Enable SDA as input.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:272:9: error: 'USIDR' was not declared in this scope
USIDR = 0xFF; // Load NACK to confirm End Of Transmission.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:274:9: error: 'USIDR' was not declared in this scope
USIDR = 0x00; // Load ACK. Set data register bit 7 (output for SDA) low.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp: In function 'unsigned char USI_TWI_Master_Transfer(unsigned char)':
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:295:3: error: 'USISR' was not declared in this scope
USISR = temp; // Set USISR according to temp.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:295:3: note: suggested alternative: 'ISR'
USISR = temp; // Set USISR according to temp.
^~~~~
ISR
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:297:16: error: 'USISIE' was not declared in this scope
temp = (0 << USISIE) | (0 << USIOIE) | // Interrupts disabled
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:297:32: error: 'USIOIE' was not declared in this scope
temp = (0 << USISIE) | (0 << USIOIE) | // Interrupts disabled
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:298:16: error: 'USIWM1' was not declared in this scope
(1 << USIWM1) | (0 << USIWM0) | // Set USI in Two-wire mode.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:298:32: error: 'USIWM0' was not declared in this scope
(1 << USIWM1) | (0 << USIWM0) | // Set USI in Two-wire mode.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:298:32: note: suggested alternative: 'USART0'
(1 << USIWM1) | (0 << USIWM0) | // Set USI in Two-wire mode.
^~~~~~
USART0
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:299:16: error: 'USICS1' was not declared in this scope
(1 << USICS1) | (0 << USICS0) |
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:299:32: error: 'USICS0' was not declared in this scope
(1 << USICS1) | (0 << USICS0) |
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:299:32: note: suggested alternative: 'USART0'
(1 << USICS1) | (0 << USICS0) |
^~~~~~
USART0
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:300:16: error: 'USICLK' was not declared in this scope
(1 << USICLK) | // Software clock strobe as source.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:301:16: error: 'USITC' was not declared in this scope
(1 << USITC); // Toggle Clock Port.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:304:5: error: 'USICR' was not declared in this scope
USICR = temp; // Generate positve SCL edge.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:305:14: error: 'PIN_USI' was not declared in this scope
while (!(PIN_USI & (1 << PIN_USI_SCL)))
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:305:30: error: 'PIN_USI_SCL' was not declared in this scope
while (!(PIN_USI & (1 << PIN_USI_SCL)))
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:309:28: error: 'USIOIF' was not declared in this scope
} while (!(USISR & (1 << USIOIF))); // Check for transfer complete.
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:312:10: error: 'USIDR' was not declared in this scope
temp = USIDR; // Read out data.
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:314:3: error: 'DDR_USI' was not declared in this scope
DDR_USI |= (1 << PIN_USI_SDA); // Enable SDA as output.
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:314:20: error: 'PIN_USI_SDA' was not declared in this scope
DDR_USI |= (1 << PIN_USI_SDA); // Enable SDA as output.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp: In function 'unsigned char USI_TWI_Master_Start()':
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:324:3: error: 'PORT_USI' was not declared in this scope
PORT_USI |= (1 << PIN_USI_SCL); // Release SCL.
^~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:324:3: note: suggested alternative: 'PORT_t'
PORT_USI |= (1 << PIN_USI_SCL); // Release SCL.
^~~~~~~~
PORT_t
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:324:21: error: 'PIN_USI_SCL' was not declared in this scope
PORT_USI |= (1 << PIN_USI_SCL); // Release SCL.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:330:22: error: 'PIN_USI_SDA' was not declared in this scope
PORT_USI &= ~(1 << PIN_USI_SDA); // Force SDA LOW.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:336:9: error: 'USISR' was not declared in this scope
if (!(USISR & (1 << USISIF))) {
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:336:9: note: suggested alternative: 'ISR'
if (!(USISR & (1 << USISIF))) {
^~~~~
ISR
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:336:23: error: 'USISIF' was not declared in this scope
if (!(USISR & (1 << USISIF))) {
^~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp: In function 'unsigned char USI_TWI_Master_Stop()':
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:349:3: error: 'PORT_USI' was not declared in this scope
PORT_USI &= ~(1 << PIN_USI_SDA); // Pull SDA low.
^~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:349:3: note: suggested alternative: 'PORT_t'
PORT_USI &= ~(1 << PIN_USI_SDA); // Pull SDA low.
^~~~~~~~
PORT_t
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:349:22: error: 'PIN_USI_SDA' was not declared in this scope
PORT_USI &= ~(1 << PIN_USI_SDA); // Pull SDA low.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:350:21: error: 'PIN_USI_SCL' was not declared in this scope
PORT_USI |= (1 << PIN_USI_SCL); // Release SCL.
^~~~~~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:351:12: error: 'PIN_USI' was not declared in this scope
while (!(PIN_USI & (1 << PIN_USI_SCL)))
^~~~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:358:9: error: 'USISR' was not declared in this scope
if (!(USISR & (1 << USIPF))) {
^~~~~
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:358:9: note: suggested alternative: 'ISR'
if (!(USISR & (1 << USIPF))) {
^~~~~
ISR
C:\Users\steve\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp:358:23: error: 'USIPF' was not declared in this scope
if (!(USISR & (1 << USIPF))) {
^~~~~
exit status 1
Error compiling for board ATtiny3226/3216/1626/1616/1606/826/816/806/426/416/406.
There is no u8x8 full buffer.
The u8g2 library has three modes:
Full buffer. A copy of the screen is kept in memory. Easy to use in the code.
Page buffer. Clumsy usage in the code. A "first page" then a number of "next page" in a while-loop.
u8x8. There is no buffer at all, everything is written directly to the display.
So the "core" that you use for the ATtiny is not compatible with the "tiny" library for the display. Okay, that is a disaster. Can you find other projects that use the ATtiny1606 ?
I have one small question: I have not seen a "Adafruit_SSD1307" by Adafruit yet. Which one do you use ?
Which constructor did you use with U8x8? I do not get the warning messages that you are seeing when compiling a U8x8 example sketch using megaTinyCore set for an atmega1606.
Are you using multiple fonts? It is possible to save memory by using a customized font file that only includes the specific characters that you need.
If the memory you are referring to is the flash memory (program memory), then 99% would be fine as far as stability is concerned, since that memory is fixed and will not change when the code is running.