Jump to content

16Bit Variable bug?

Recommended Posts

The following code snip generates an odd happening


short TargetLight = 10;

char trash = 0;


if (Target_Light < 11)


PORTA = Flash_Num;




for (trash = 0; trash < Target_Light; trash++)




PORTA = 0; // quench flash!




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?




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

Link to post
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...