View previous topic :: View next topic |
Author |
Message |
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sun Aug 18, 2013 7:21 pm |
|
|
In the statement:
Quote: | printf("ACK addr: %X\n\r", i); |
The %X is a format specifier. You might look in the CCS manual
and try a different specifier like %u or %d or even lowercase %x
in case it's a bug with %X. _________________ Google and Forum Search are some of your best tools!!!! |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Sun Aug 18, 2013 7:45 pm |
|
|
I tried it but is not working.
Is it possible the sensor to be faulty? |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Sun Aug 18, 2013 7:51 pm |
|
|
I am concerned about the same thing PCM is, the scanner routine is not
working correctly. This is the keystone being used to determine if the
sensor hardware is working. In my opinion, I wouldn't look at anything
else until the scanner works properly <and> the sensor hardware responds
properly. What PCD version are you using? _________________ Google and Forum Search are some of your best tools!!!! |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Sun Aug 18, 2013 8:33 pm |
|
|
The version is : V4.093 |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Mon Aug 19, 2013 2:48 am |
|
|
It is a fairly 'borderline' compiler for the chip. I think support was only added about the later 4.08x area. Have two versions later, and this give correct output with %X. However there were a lot of printf format problems around this time on the DsPIC's.
Key point (the reason we are all getting interested in the printf), is to understand that the scanning 'loop', only runs from address 0x10 to 0xEE. The reason for this is that addresses outside this range, are reserved in the I2C spec. The print can't get called with a value outside this range, so to display '0', something is radically wrong....
I'd also wonder if possibly the I2C library itself might be faulty.....
Best Wishes |
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Mon Aug 19, 2013 6:51 am |
|
|
ok i will look for any update. (or trial or something like this).
which one version is compatible? if i would look for V4.1 and above it will be ok ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Tom1234
Joined: 06 Jan 2013 Posts: 39
|
itg3200 i2c problem |
Posted: Mon Aug 19, 2013 4:06 pm |
|
|
When i said v4.1 i mean V4.1xx.
Is anyone who know if v4.140 is ok (if the bugs are fixed) |
|
|
|