STM8 MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

TIM4 and I2C don't work together

I have a Arduino Mega and a STM8S003F3. I set up I2C communication between them. Arduino Mega is master. STM8S is slave. STM8S runs at 3.3V. Arduino Mega I2C clock frequency is the default(100KHz). TIM4 goes into interrupt every 1ms.If I don't enable...

AMehm.1 by Associate
  • 522 Views
  • 0 replies
  • 0 kudos

STM8S00F3 to read/write I2C device

1. I have to read/write NAU7802 register, datasheet of which is attched.2. STM8S is running at 16Mhz.3. Write three functions:a) i2c_init() : init the i2c peripheralb) i2c_read_one_byte_data() : read from address of NAU7802 and read only one bytec) i...

what does the line 6 wait do?

void sEE_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead) { //__IO uint32_t timeout = 0xFFFF; __IO uint32_t timeout = 0xf00; /*!< Wait the end of last communication */ for (;timeout > 0; timeout--);   /* Set the poin...

STM8S005K6 - I2C (Bus always busy)

Hi ! This question has already be posted but i don't find a solution of my problem.I have an LCD screen (MC20805A6W-BMLW-V2) with I2C communication and I try to communicate with my controller via I2C (STMS005K6).First I initialize my port :GPIO_DeIni...

0690X000009jzf6QAA.png
ET_FR by Associate
  • 334 Views
  • 0 replies
  • 1 kudos

With the STM8s105c6 and the STM8af5288tay, both which I use. what is the correct way to initialize multiple i2c devices on the same SDA/SCL port. i.e. I wish to have a RTC, i2c LCD as well as an EEPROM on the same i2c port.

How for example do I initialize all 3 devices, where addressing and necessary parameters are concerned.  Any sample code or advice in this regard would be very welcome. (RTC : either PCF8563 or DS1307; I2C LCD with PCF8574 expander and 24c32 or 24c64...

MGoss.19 by Associate
  • 343 Views
  • 0 replies
  • 0 kudos

I2C always reports ''busy'', SR2->BERR

Posted on May 30, 2018 at 18:02I'm using an STM8L051F3 chip as slave and a STM32L476 as master, but the STM8L refuses to respond, it keeps reporting a SR2->BERR aka busy error.I know the STM32 code is ok as I had two of them working on an I2C link w...

Unable to clear I2C BUSY bit in STM8S-discovery

Posted on March 01, 2011 at 11:28Hello Friends,  I am a newbie to the world of microcontroller programming. I am stuck with a deadlock and am not able to move even a bit. The BUSY bit in I2C.SR3 is set it is not getting freed, according to datasheet...

confusion in stm8s_eval_i2c_ee.c of STM8S_StdPeriph_Lib

Posted on April 09, 2018 at 17:29As a detailed look into STSW-STM8069 / STM8S_StdPeriph_Lib v2.2.0 : http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm8-embedded-software/stsw-stm8069.html, the Utilities/STM8S_...

STM8S001J3 I2C: Nothing happens

Posted on September 11, 2017 at 15:06 I'm trying to get I2C to work, but nothing happens on either SDA nor SCL. I've connected the STM8S001J3 like so: Pin 5 SDA Pin 6 SCL (There are pull-ups on both of the lines) 1. I initialize t...