This potentially to be one of the stupid question, but please help me out there. I'm using Xplain-A1. And I'm just trying to get familiarize with accessing stuff in the Xmega chip. So I use the following code to get the lower 8 bit of the 16bit Timer counter C1 register.
It works and can get the value to output to the LEDs. But when I do the same to access the upper 8 bit, it no longer can get a reading:
In the IO view, it shows that the upper 8 bits has certain value other than 0, but it's not showing it in the LEDs.
I then tried to read it directly into a variable:
The "variable" gets 0 all the time when in the IO view, the CNT register shows something other than a 0. I can get the 16bit value by doing:
But How can i just get the upper 8 bits?