datacute / Tiny4kOLED

Library for an ATTiny85 to use an SSD1306 powered, double buffered, 128x32 pixel OLED, over I2C
MIT License
264 stars 39 forks source link

external crystal problem #21

Closed classic-audio closed 4 years ago

classic-audio commented 4 years ago

I have a sketch working fine on ATtiny85 with internal 8MHz setup. I have then used "burn bootloader" external 8MHz - uploaded the code again (setup with the 8MHz crystal). But after succesful code loading - the ATtiny85 dont work with the 128x32 OLED display. Why?

classic-audio commented 4 years ago

I have loaded the LED / blink sketch to ATtiny85 ext. 8MHz crystal and that works fine. Then I added one tekst line and the Tiny4kOLED.h to the LED / blink sketch. The LED blink function work, but no tekst on the OLED

datacute commented 4 years ago

Sorry for taking a while to respond. I've never used the External Crystal clock options on the ATTiny85. I've purchased some cheap crystals, including 8MHz, and I'm waiting for them to arrive so I can experiment. Are you using Spence Konde's ATTinyCore?

classic-audio commented 4 years ago

Thank you - I hope for a good solution. Are you using Spence Konde's ATTinyCore? - no.

classic-audio commented 4 years ago

I can now use an external xtal with the ATtiny85. (the library update jan 2020)

datacute commented 4 years ago

I've finally received some crystals, and tested, and confirm what you saw. The change made in January to use a more robust OLED initialisation fixes the problem. I also found that resetting the ATtiny85 would work, as would waiting longer before initialising the OLED. It's the same behavior as seen with the blue OLED, which is what prompted me to investigate the startup code in January. Thanks for reporting the issue.