I'd like to get some help with the decoding of an I2C sensor. The MPRLS sensor is connected to an 18F4685 and with my (rigol) scope I can see the signals just fine and the scope is decoding the correct values.
Attached is the code which used to work, however for some reason after a compile, the "rdata" values return as "0". As I have installed FC on a new PC I'm wondering if there is an issue with the "Project Options" or "compile Options".
The other reason why I suspect an issue with the compiler is that I need to set the length of the string variable to 30 in order to output string that is only 9 characters long; "version 1". If the string variable is anything less than 30, it output weird characters...
Thanks for the help
Henk
I2C no longer decoding
- Bachman
- Posts: 116
- Joined: Sun Sep 07, 2014 11:37 am
- Location: Hungary
- Has thanked: 9 times
- Been thanked: 53 times
- Contact:
Re: I2C no longer decoding
Build menu -> Project options: set the CPU clock speed (Hz) to the correct value.
In the CPU configuration menu, change some values:
In the CPU configuration menu, change some values:
-
- Posts: 45
- Joined: Mon Dec 22, 2008 11:22 pm
- Location: Prospect, NS, Canada
- Has thanked: 7 times
- Been thanked: 2 times
- Contact:
Re: I2C no longer decoding
Thanks for the information. Not sure which setting did the trick but it seems to be working!