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

USB and I2C Wont work at that same time.
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








PostPosted: Sat Nov 24, 2007 3:56 am     Reply with quote

Yes 'Aargh' is the polite version. Its was a bit more animated than that!

again,Thanks for all your help.

Gary
Dimlow



Joined: 24 Nov 2007
Posts: 9

View user's profile Send private message

PostPosted: Sun Nov 25, 2007 3:24 pm     Reply with quote

Just thought id give a little update and some info for people that may get stuck with this them self's.

In my main code, not the test code i was still having trouble with the usb, where on some compiles the usb would work and on others is would not. all i had to do was to add one line of code and the usb would stop working. this line of code could be completely unrelated to the usb. for example printf. i was really pulling my hair out over this one.

anyway it turns out that all along it was an interrupt handler i had for my keypad that was doing the damage. this code has been used many times before and i have had no reason to suspect that it would give me troubles. I think the various code optimizations that the compiler does, was somtimes making it faster, and somtimes not. On some occasions it was taking to much time, just long enough for it to stop the usb interrupt from working! the pc would then inform me that it found an unknown device and i lost more hair! In the end,i have stopped using interrupt for the keypad and its all working very well now, During the past week i must have gone through every bit of code in the program, found a few unrelated bugs and made things much smoother now.

The i2c problems i was having was not related to my usb problem, they just both poped their heads up at the same time witch just made things worse!

Right time for some real coding seems all i have been doing lately is debug debug debug.

Gary
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
Page 2 of 2

 
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