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.
I2C between ATTINY85 and STM32F103C8
Re: I2C between ATTINY85 and STM32F103C8
Hi
hard to tell maybe an issue referenced in the STM32F103c8 errata sheet.
Or an issue on clock line due to voltage level (3.3V vs 5V) but should be ok with the PU.
hard to tell maybe an issue referenced in the STM32F103c8 errata sheet.
Or an issue on clock line due to voltage level (3.3V vs 5V) but should be ok with the PU.
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: I2C between ATTINY85 and STM32F103C8
IMO, you are needlessly complicating the design:MyloCalibre wrote: Sun Sep 20, 2020 4:25 am ...
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).
Ref: http://docs.leaflabs.com/docs.leaflabs.com/index.html
Section Master Pin Map
You will note I2C is 5V tolerant. No need for the tiny85. Were you to wish to really interface them, use Serial as it is more forgiving and easier to diagnose (use the IDE monitor.)
Here are posts in the old forum regarding WS2812B:
https://www.google.com/search?&q=WS2812 ... oforum.com
Port of WS2812B:
https://github.com/rogerclarkmelbourne/ ... /README.md
Port of SK6812RGBW here:
https://github.com/EdwardHartmann/SK6812RGBW
Ray