New answers tagged

0 votes
Accepted

Why is no data written to the I2C bus using this PIC12LF1822 code?

I ended up changing to a PIC16F18313 instead, but I hope the below details are useful for anyone with the same issue. There are two problems with the original code. The MSSP module is never assigned ...
BlueShoes's user avatar
0 votes

Understanding the flow of a PI Controller?

...
Avinash R K's user avatar
2 votes
Accepted

MCU slave receiver I2C shifts incoming data by one bit when replying with ACK

Thanks to the other answer that pastes the data sheet, the problem is now clear why clearing or setting bits individually to TWCR register did not work. The TWINT bit will be set to logic 1 when TWI ...
Justme's user avatar
  • 144k
1 vote

MCU slave receiver I2C shifts incoming data by one bit when replying with ACK

I solved it. The issue was on the MCU's firmware. I needed to set the whole TWCR register at once, not one bit at a time. The datasheet of atmega328 states about TWINT flag in TWCR register: Also ...
Christianidis Vasilis's user avatar

Top 50 recent answers are included