I2C between ATTINY85 and STM32F103C8
Posted: Sun Sep 20, 2020 4:25 am
Hi there ! I'm new to this forum and I hope there may be someone here who knows way more than me that can help me sort this out.
I've recently started using the STM32 Series micros, currently a generic "Blue Pill" style one off ebay. I've managed to get everything in my project to work except communication between the blue pill and an attiny85 i'm trying to use as intermediate to drive some LEDs (WS2812B). Currently i'm just trying to send a single byte from the Blue Pill (Master) to the Tiny as a slave and it act on it by blinking an LED on a signal receieve. I'm using the TinyWireS library on the Arduino IDE to program the 85 Via an uno in ISP, and a USB to serial converter on arduino IDE to program the F103C8 with the stmduino core. I can upload a blink sketch to the attiny and it works, I can upload code to the f103c8 and even go as far as to hook up an OLED screen and it work with an example from adafruit's GFX. I just simply cannot get the ATTINY85 to read anything the F103C8 is spitting out, despite it being able to interact with the OLED screen and other I2C devices. Clearly the ATTINY is most likely the issue. Now I am aware the F103C8 is a 3.3V device however the OLED I was using on it is a 5v device, and both seem to work just fine. Does anyone know how to get this sorted? Thank you so much,
cheers - mylo c.
EDIT: I have pull up resistors connected to both lines to 5V and I am running the tiny at 8MHZ internal clock.
I've recently started using the STM32 Series micros, currently a generic "Blue Pill" style one off ebay. I've managed to get everything in my project to work except communication between the blue pill and an attiny85 i'm trying to use as intermediate to drive some LEDs (WS2812B). Currently i'm just trying to send a single byte from the Blue Pill (Master) to the Tiny as a slave and it act on it by blinking an LED on a signal receieve. I'm using the TinyWireS library on the Arduino IDE to program the 85 Via an uno in ISP, and a USB to serial converter on arduino IDE to program the F103C8 with the stmduino core. I can upload a blink sketch to the attiny and it works, I can upload code to the f103c8 and even go as far as to hook up an OLED screen and it work with an example from adafruit's GFX. I just simply cannot get the ATTINY85 to read anything the F103C8 is spitting out, despite it being able to interact with the OLED screen and other I2C devices. Clearly the ATTINY is most likely the issue. Now I am aware the F103C8 is a 3.3V device however the OLED I was using on it is a 5v device, and both seem to work just fine. Does anyone know how to get this sorted? Thank you so much,
cheers - mylo c.
EDIT: I have pull up resistors connected to both lines to 5V and I am running the tiny at 8MHZ internal clock.