Hi, I am using dsPIC30f4011 microcontroller. I have this counter variable that should reach up to 33333 counts. But since the dsPIC is only a 16-bit microcontroller, I am only able to reach until 32768. How can I extend this count such that I can reach up to the maximum value I need? Thank you very much for your help!
You need to create a high word and low word.. when the low word is incremented and over spills check the carry flag and increment the high word (I take it you are using assembler).
@Ian Rogers. Thank you very much! I am using C in mikroC dsPIC environment. If I do the high word/low word in C, how do I detect the carry flag?
@Pommie. Thank you very much! Yes, but I need a signed counter.