Open digi55 opened 4 months ago
yes of course
I don't have any new ideas just now... I'll test it with my blackpill.
You could use a SoftWire on I2C2 pins - I just tested and it works fine for me. Init the Wire interface this way:
#include <SoftWire.h>
SoftWire SWire(PB10, PB3, SOFT_FAST);
See the example STM32F4/libraries/Wire/examples/i2c_scanner_softwire
for details.
I guess the SoftWire library is not compatible with the at2cxxx library. Again, there is no signal on the pins.
As a test try to run an i2c_scanner script - is your AT24xx chip visible?
I tested all the examples. wire and Hwire unfortunately do not work. Only softWire is working. Do you have any advice on how to make the at24cxxx library compatible with SWire?
Do you have any advice on how to make the at24cxxx library compatible with SWire?
I will see it
try this code:
#include <SoftWire.h>
SoftWire SWire(PB10, PB3, SOFT_FAST);
#include <at24c02.h>
AT24C02 EEPROM(AT24C_ADDRESS_0, SWire);
uint8_t BRIGHTNESS_adres = 20;
uint8_t BRIGHTNESS = 0;
void setup() {
SWire.begin();
delay(30);
BRIGHTNESS = EEPROM.read(BRIGHTNESS_adres);
}
void loop() {}
with library attached to the message arduino-library-at24cxxx-main-b707.zip PS please test only the class for at24c02, the other library classes remain unfixed.
Now, everything is OK with SoftWire and yours edited at24cxxx library. thank you so much @board707
I also finally managed to fix the support for the second hardware I2C. if SoftWire doesn't suit you, I can send you the fixes for the Arduino_STM32 package. May be, you lookup for programmer for your project? :)
I would be very happy if you could also send me the necessary fixes for Hardware I2C2. I am grateful for your help and support.
For the stm32 family, an external eeprom is a must. Because although there is an eeprom emulation in the F1 series, after about 200 writes, an overflow occurs in the eeprom and the system crashes.
The external eeprom did not cause any problems in the F1 series. Everything worked as it should.
But you also saw that there was a problem in the F411, the hardware I2C1 and I2C2 did not work. And I could not find the reason. With your help, the software I2C worked very well. The F411 series is a very powerful processor, it works very well with P2.5 panels with a speed of 100Mhz.
there was a problem in the F411, the hardware I2C1 and I2C2 did not work.
Didn't the first i2c1 work too? I have no problems with it
yes hardware I2C1 and I2C2 did not work. I wonder why I2C2 is not working
hardware I2C1 and I2C2 did not work.
I think you are mistaken, I2C1 worked from the start. I checked it before I started fixing I2C2. Besides, I had projects with blackpill boards before which use a i2c1 and it worked. But with i2c2 there really were problems in the STM32 code. I think you just made some mistake when you run your tests I2C1.
Added: I'll show you the edits for fixing the I2C2 a little later, I need to finish the corrections in all the files.
It may be possible, I tried a lot. I remember testing it with I2C1 at one point. I think there are many bugs in the stm32 library for arduino.
Hi I just updated my fork of Arduino_STM32 package, fixing a support of second I2C channel for STM32F4 boards. Also I add a third I2C3 interface for F401/F401 controllers on pins PA8 (SCL) and PB4(SDA). The code was tested on hardware (I2C EEPROM module FR24C04 on blackpill F401 board).
To use a new package you need to download it from this link: https://github.com/board707/Arduino_STM32/tree/HardWire2 You just need to copy your definition of the additional pins for F411RE controller.
Finally hardware I2C2 working :) Many Thanks @board707
Hi Our changes of I2C2 has been merged in main trunk of Arduino_STM32 package https://github.com/rogerclarkmelbourne/Arduino_STM32 So you can replace my fork with main package now.
Could you please send me all files, that you changed while define an additional pins for F411RE mcu? Did you change anything specific to manage PD and PH pins to work?
/**
/**
//#define Port2Pin(port, bit) ((port-'A')*16+bit)
//#define BOARD_USART6_TX_PIN PA11 // USB_DM //#define BOARD_USART6_RX_PIN PA12 // USB_DP
//#define BOARD_NR_GPIO_PINS 32
enum { PA0,PA1,PA2,PA3,PA4,PA5,PA6,PA7,PA8,PA9,PA10,PA11,PA12,PA13,PA14,PA15, PB0,PB1,PB2,PB3,PB4,PB5,PB6,PB7,PB8,PB9,PB10,PB12=(PB10+2),PB13,PB14,PB15, PC0,PC1,PC2,PC3,PC4,PC5,PC6,PC7,PC8,PC9,PC10,PC11,PC12,PC13=(32+13),PC14,PC15, PD2=(48+2), PH0=(64+0),PH1, BOARD_NR_GPIO_PINS };
Hi, @board707 I just added the missing pins to blackpill_f411.h. I didn't just test the PH0 and PH1 pins. Apart from that, I checked all the other pins and they work fine.
Thank you
Thank you too
Hi I tested P2.5(128x64) RGB Panel with stm32F103RCT6 72Mhz and blackpill stm32F411CE 100Mhz
stm32F411CE with 1 panel(128x64) or 2 panels (128x128) without Noise and Flickering , Correct Colors , every test results OK.
stm32F103RC with 1 panel(128x64) without Noise and Flickering, Correct Colors , every test results OK.
stm32F103RC with 2 panels (128x128) without Noise and Correct Colors. But, have Flicker problem.
Is it possible to solve the flickering problem when using 2 panels?