gviaud 0 Posted December 17, 2003 Report Share Posted December 17, 2003 The following code snip generates an odd happening short TargetLight = 10; char trash = 0; if (Target_Light < 11) { PORTA = Flash_Num; delay_us(2); delay_us(2); delay_us(2); for (trash = 0; trash < Target_Light; trash++) { delay_us(1); } PORTA = 0; // quench flash! Send_Val(Target_Light); } The code in the main IF block onlt gets called if Target_Light is less than 10.. odd... Is this a problem with 16bit variables when IFed with literals? Help! Also had some odd timing issues with delay_us but I will save this for when I have more time to see what is going wrong on my scope... Target is SX28 @50MHz Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.