CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

itg3200 i2c problem
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Aug 18, 2013 7:21 pm     Reply with quote

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

View user's profile Send private message

itg3200 i2c problem
PostPosted: Sun Aug 18, 2013 7:45 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Aug 18, 2013 7:51 pm     Reply with quote

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

View user's profile Send private message

itg3200 i2c problem
PostPosted: Sun Aug 18, 2013 8:33 pm     Reply with quote

The version is : V4.093
Ttelmah



Joined: 11 Mar 2010
Posts: 19540

View user's profile Send private message

PostPosted: Mon Aug 19, 2013 2:48 am     Reply with quote

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

View user's profile Send private message

itg3200 i2c problem
PostPosted: Mon Aug 19, 2013 6:51 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 19, 2013 12:32 pm     Reply with quote

There is no v4.1. Version numbers have 4 digits, such as 4.141.

This post by Ttelmah lists some defective versions with regard to printf
and the PCD compiler (for dsPIC):
http://www.ccsinfo.com/forum/viewtopic.php?t=50919&start=2
Tom1234



Joined: 06 Jan 2013
Posts: 39

View user's profile Send private message

itg3200 i2c problem
PostPosted: Mon Aug 19, 2013 4:06 pm     Reply with quote

When i said v4.1 i mean V4.1xx.

Is anyone who know if v4.140 is ok (if the bugs are fixed)
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group