Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
6 votes
9 answers
1k views

Is it a good idea to perform I2C Communication in the ISR?

I am working with an I2C based sensor. The requirement is that whenever some new data is ready, it generates an interrupt (hey, new data is ready, aka RDY.) What I have implemented currently is, I ...
stack-overflow---'s user avatar
1 vote
1 answer
153 views

I2C to USB converter with interrupt

I have a touch screen with I2C and interrupt output and I would like to connect this touch screen over a USB cable to a host controller. I know that it is possible to transfer interrupts on the USB ...
Stefan Wyss's user avatar
  • 7,793
0 votes
0 answers
54 views

Experiencing Much Higher Data Rate than Timer Interrupt Settings While Reading IMU Data via I2C on Arduino

I am currently using an Arduino MKR ZERO to gather IMU data from three MKR IMU SHIELD boards(BNO055 IMU). I have utilized the <Adafruit_ZeroTimer.h> library to set a timer interrupt with a ...
JING's user avatar
  • 1
1 vote
1 answer
80 views

MSP430G2553: ISR not triggering when I2CTX-Flag is set

So I need to get an I2C up and running. To do so the µC relies on ISR's to push data byte by byte onto the data-line. So far so good I programmed my functions and ISR's to transmit and receive data. I ...
Steve's user avatar
  • 21
0 votes
0 answers
101 views

Issues reading data back from 24LC512 EEPROM via interrupt on MSP430F47187

I have interfaced MSP430F47187 with 24LC512 EEPROM. I am able to write to the EEPROM without any issue but reading the data from the EEPROM is problematic as the reading stops after a while. I have ...
GBJ's user avatar
  • 1
0 votes
2 answers
96 views

How to make the microcontroller respond/compare I2C data faster in this case?

I measure the current via an I2C current sensor by using this STM32F302 Nucleo board. And I display internal temperature and the averaged current value in an OLED display. But I do everything in ...
user1999's user avatar
  • 1,515
2 votes
1 answer
444 views

MCP23017 open drain interrupts not working as expected

I have multiple MCP23017 ICs with their interrupts all connected in serial. The interrupt pins are configured to be open-drain. All the A port interrupt pins are connected together and all the B port ...
P4rk's user avatar
  • 23
0 votes
1 answer
3k views

Trying to use I2C ITs with HAL Functions

Hardware : STM32L452RET6 Software : STM32CubeFW_L4 v1.17 My problem : After using I2C with standard polling functions, i would like to use IT Functions to optimize my firmware. I try to work with ...
Volt's user avatar
  • 169
1 vote
1 answer
368 views

STM32 reading data from digimatic SPC and communication via I2C at the same time

I am working on an application running on STM32, which aims to read data from the digimatic spc protocol (mitutoyo device) and then send the data to the raspberry pi via the I2C bus. The Raspberry pi ...
Pavel's user avatar
  • 11
0 votes
0 answers
225 views

STM32: I2C works only sometimes with Interrupts

I'm working on a little project where I need to read the HMC 5983 Sensor with I2C from a STM32F103RB Board. When I tested the sensor with the Hal_I2C_Master_Transimt, everything worked fine. I could ...
Alexander Minor's user avatar
0 votes
0 answers
190 views

How to detect an I2C target's presence/absence as an interrupt?

Involved in a task to build a test equipment with a ARM M4F microcontroller for the purpose of testing various PCBs. One of the PCBs has I2C compatible current/voltage monitoring chip on it. Is there ...
Coppers Copernicus's user avatar
0 votes
1 answer
356 views

Master SW (bit-bang) I2C with Interrupts?

I've written a set of "bit-bang" software routines for the PIC18F2620 device. These routines work well for reading and writing 24LC256 EEPROM and DS1307 RTCC devices for the most part. (I wrote this ...
Doug12745's user avatar
  • 319
1 vote
4 answers
1k views

how long should an I2C slave wait for a STOP bit (if at all)?

I2C frames each group of message bytes in START and STOP conditions, defined as SDA changing state 1>0 or 0>1 (respectively) while SCL is high, as described here. I am writing interrupt driven ...
danmcb's user avatar
  • 7,893
1 vote
2 answers
313 views

Embedded system task scheduling for data aquisition on a CAN network

I'm struggling with the concept of how to schedule my tasks. My Setup: STM32F103 hooked up on CAN. Taking measurements with a Lidar V3 module comms via I2C, then distributing that measurement on the ...
Pop24's user avatar
  • 690
1 vote
0 answers
695 views

Reuse I2C SCL or SDA Pins to signal interrupt

In an I2C network, I am using an AVR microcontroller (AtMega328p) as a Master and I hooked it up to multiple sensors as Slaves, such as the TMP102, SI1145, MPU9250, among others. All of these sensors ...
Mihai Galos's user avatar
0 votes
1 answer
2k views

pic16 i2c interrupt

I’m trying to use the Microchip Code Configurator to make an I2C communication between two PIC16F1827. My application is very similar to the example they give with an emulated EEPROM. I've used ...
ardayigit's user avatar
1 vote
1 answer
837 views

dsPIC33E - I2C master interrupt flag is never set

I'm trying to design a program that polls a real-time clock (DS1307+) every second via I2C. The microcontroller used is dsPIC33EP64GS506. I use a master interrupt flag to wait until a task (start or ...
Marko Gulin's user avatar
  • 1,633
2 votes
0 answers
2k views

How to properly send stop condition when using DMA with I2C?

I'm using DMA transfer to get 1024 bytes from master (STM32F407VG) to slave OLED screen (SSD1306). The library I'm using does this: ...
Terraviper-5's user avatar
4 votes
1 answer
496 views

How to get I2C to shut up while waiting for data in master transmit mode on LPC1114

I have an LPC1114(FN28) that I am writing some code for. Currently I am trying to provide an asynchronous view of the I2C interface to my code (the chip has a built-in I2C controller). The controller ...
Thomas's user avatar
  • 229
0 votes
1 answer
433 views

How do you implement an Energia interrupt handler?

So, I have an application that needs to be very conservative with the power. I use the suspend() command to go into LPM4 and wait for an interrupt to occur. During the interrupt, I attempt to ...
Curtis's user avatar
  • 341
0 votes
2 answers
3k views

I2C on atmega168/328 using interrupts

I have the following I2C configuration with an ATmega168 (1 MHz) as the master and an Arduino Uno (16 MHz) as the slave. The command for the LED connected to the slave comes from the master and vice ...
Suba Thomas's user avatar
  • 1,399
0 votes
2 answers
2k views

How to correctly wire an interrupt pin, clock pin, PWM pin, SPI pin

I've a question about how to correctly wire some microcontrollers pins. In particular: Interrupt pin on microcontroller (pull up/pull down resistor and with which value) Output clock pin from a ...
Singe's user avatar
  • 617
2 votes
1 answer
453 views

PIC16 I2C interrupt does not occur if serial port enabled

I'm using a PIC16F1825 mid range PIC and I've used it with a UART and SPI for a good while without issues. When I added code to handle I2C (instead of SPI - it's either one or the other on this PIC) I ...
carveone's user avatar
  • 2,588
-1 votes
1 answer
153 views

toggling a pin using the hardware compare feature of timer1 AVR

This link - says: "In CTC mode, you can also trigger interrupts, but it is also possible to not use interrupts and still toggle an output pin. Using it this way, the functionality occurs ...
Shiva C's user avatar
0 votes
1 answer
2k views

AVR TWI/I2C Not Responding [closed]

I use Twi module of AVR Atmega168 to talk to DS1307. <...
Babu James's user avatar
1 vote
1 answer
1k views

Interrupt Service Routines and I2c together

I would like to ask a question that has been on my head for a while I have done coding small ISR's for pic and AVR controllers and i have successfully tested them on board.And i have just learned ...
Rookie91's user avatar
  • 2,148
0 votes
1 answer
1k views

STM32F207 I2C errors

I am learning embedded development on the STM3220G-EVAL board with the STM32F207 microcontroller. I am testing the I2C interface by interfacing the two I2C2 and I2C3 modules on the same chip and ...
hl2gordon's user avatar
2 votes
0 answers
3k views

Msp430 I2C Single Byte Read Write

I have this code I've been working on that connects an ITG-3200 gyroscope slave and MSP430G2553 master via I2C bus. It was working fine yesterday but somehow today it is not working. I tried to debug ...
Barışcan Kayaoğlu's user avatar
4 votes
4 answers
3k views

Implementing an I2C buffer in C

I'm implementing a read-only I2C slave on a PIC18F4620. I have made a -working- ISR handler for the MSSP module: ...
user avatar