2016-01-01 02:34 AM
I am reading some values from MPU6050 throught I2C and sending data through UART to my pc. sometimes it stops receiving after a while. what might be the reason ??
2016-01-01 05:44 AM
The description is too vague to give any hints.
First, is I2C still alive? An oscilloscope on SDA and SCL would help.
How are the data sent by RS232? Is it a rolling buffer which might get full?
Increase RS232 speed and make sure the plumbing is correct. How long to send an RS232 message vs the frequency of data coming from the MEMs. It's really in the source code that things must be checked.
Good luck!
2016-01-01 07:04 AM
I will check it and update you.
2016-01-01 08:13 AM
Scope the USART TX pin to confirm you are actually still sending. Toggle an LED for every 100 bytes you send to confirm it is alive.
The PC USART could get out of sync, or not be clocked properly (bad USB-to-serial adapter/crystal). Check serial bit timing with a scope, use multiple stop bits, or increase the inter-symbol gap periodically so it can sync. Make sure your receiver software isn't buggy. Seen issues with Prolific VCP drivers before, insure current drivers are in use.
2017-01-01 09:51 PM
i changed my pins and it worked. dont know what caused this problem.