View Single Post
  #10   Spotlight this post!  
Unread 09-05-2005, 15:10
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: internal demons?

Quote:
Originally Posted by kc8nod
Code:
printf ( "pwm01 = %d/n", pwm01 );
printf ( "rc_dig_01 =  %d/n", rc_dig_01 );
Don't forget to cast the "byte sized" arguments to printf,
intended to be formatted with %d, to an int. Byte sized
things get pushed on the stack as bytes, while printf
is expecting an int. This is a vagary of the C18 compiler
environment for the robot controller, and is non-standard.

This addresses bad values printed by printf, but probably
not the trouble you are trying to debug...