Hot answers tagged

4

Unless your I2C hardware components have the ability to use an external clock to drive the clock line of the buses (none that I've heard of), you wouldn't be able to do this by hardware. You could do this by manually driving the buses. This is called bit-banging. If you do that, you can carefully craft your software driving GPIO pins that act as I2C buses ...


2

I'm using the L3GD20H MEMS gyroscope with an Arduino ... How is the sensor's interrupt line intended to be used if the microcontroller can't handle the interrupt from an ISR using an interrupt-driven I2C subsystem? I'm assuming you've already looked at the L3GD20H datasheet and the L3GD20H errata sheet, and you understand that the data-ready pin (DRDY)...


2

I think you have a false assumption somewhere. A very quick scan through the atmel datasheet and arduino twi.c does not show any problems. Why do you think the microcontroller can't handle the interrupt from an ISR using an interrupt-driven I2C subsystem?


2

the Slave Address is 0x1D (if my SAO=1, which I believe is referring to the I2C bus being on channel 1 on my raspberrypi v2) SA0 is actually a pin on the chip (pin 7 by the datasheet). Changing it's value allows you to specify the address, helping to avoid address clashes. So it depends on how you've connected that pin in your circuit. From the datasheet: ...


1

So I found a way around the issue by filtering the data. Since there are random dips to 0, I replace a 0 with the previous value which was valid. This works out since it is safe to assume that the actual value when the gyro outputted 0 was close to the previous value which was valid. So its more accurate to keep that previous value instead of using 0. In ...


1

DMA lets peripherals access memory directly. What component is it that is putting the information into your microcontroller's memory? It sounds like, from your post, you're having the microcontroller itself pull data on an interrupt basis. I don't think your sensor is going to push its own data to the microcontroller. If you're having the microcontroller ...


1

You will need to control it vai I2C . There are libraries for pca9685 , if you want to control it vai an Arduino(Micro controller ) https://github.com/Reinbert/pca9685 If you want to use with a RPI , you can directly use python libraries and I2C vai GPIO pins . https://github.com/voidpp/PCA9685-driver I too am trying to build a hexapod/quadpod using tiny ...


1

Firstly, the Arduino IDE already uses the AVR GCC compiler. Put another way, all of your Arduino (.ino) code gets transformed into a C++ (ie .cpp) file and then gets compiled with AVR GCC. The easiest way to move to Atmel/Visual Studio is to use Visual Micro. It is a great product, the documentation is good and the transition is almost seamless. To migrate ...


1

I never worked with Arduino, but there is a lot going on behind the scenes in the Arduino Serial class. The examples below should get you started, its not supposed to be compilable or functional as a whole. The example is for UART0. Serial.begin() performs the low level initialization. If you do this manually it will look something like this: void ...


Only top voted, non community-wiki answers of a minimum length are eligible