This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Data content of CC1 register

I am require to calculate the distance of the object that the range finder detects. The microcontroller I am using is C167CR-LM. I am using T1 to detect the time lag between transmitting and receive of the pulse.

When the the content of the timer is latch into the CC1 register, what is saved inside there? The timer's location? In what format(decimal, hexadecimal)? Without knowing, I couldn't continue my program.

Awaiting ur reply,
Frank

Parents
  • U mean that if the timer is counting upwards or downwards and when there is an external signal, the content of the timer's register will be copied to the CC1.

    If at that moment, the timer's value is at 0x5555, then can I assumed that when I type the command
    printf("%g/n",CC1);
    I will get the message 0x5555?

    Apparantly when I test my code, what i get is 0/ when timer 1 value = 0x2A3F

    Any possible explanation?

Reply
  • U mean that if the timer is counting upwards or downwards and when there is an external signal, the content of the timer's register will be copied to the CC1.

    If at that moment, the timer's value is at 0x5555, then can I assumed that when I type the command
    printf("%g/n",CC1);
    I will get the message 0x5555?

    Apparantly when I test my code, what i get is 0/ when timer 1 value = 0x2A3F

    Any possible explanation?

Children