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

Timer 3 data register

I do not understand T3 data register.I went through the data sheet.I understood al other registers.
Say, for example:
T3=0x5D00, then what does it mean? Does it mean that every such time interval the timer will tick?

Thanks in advance.
Denis

Parents
  • Hi Denis,

    would you please help me out?

    I guess I could. I'm not quite sure what exactly you are trying to do. Maybe just to set up a timer to generate periodic interrupts? Besides, maybe you are reading the wrong manual? The datasheet for a microcontroller doesn't provide detailed information about on-chip peripherals and their registers. The manual does. You could use the C167CS manual (it's big, 5.4 M bytes):
    http://www.infineon.com/cmc_upload/0/000/012/805/c167cs_um_v2.0_2000_07.pdf
    It's section 10.1.1 'GPT1 Core Timer T3'.
    Here is an example of configuration of timer 3:
    T3CON = 0x0040
    Basically all bits set to '0' except the 'run' bit. The timer will count up generating an interrupt each time it overflows, which would be once in every 21 ms (assuming 25 MHz CPU clock.)
    You can easily multiply this period by 2, 4, 8, ..., 128 by modifying the 3 least significant bits of T3CON (see formula & table in the manual.) If you need finer control of the period, you will have to use the reload feature of the timer which involves either timer 2 or timer 4.
    I hope this makes things clearer.

    Regards,
    - mike

Reply
  • Hi Denis,

    would you please help me out?

    I guess I could. I'm not quite sure what exactly you are trying to do. Maybe just to set up a timer to generate periodic interrupts? Besides, maybe you are reading the wrong manual? The datasheet for a microcontroller doesn't provide detailed information about on-chip peripherals and their registers. The manual does. You could use the C167CS manual (it's big, 5.4 M bytes):
    http://www.infineon.com/cmc_upload/0/000/012/805/c167cs_um_v2.0_2000_07.pdf
    It's section 10.1.1 'GPT1 Core Timer T3'.
    Here is an example of configuration of timer 3:
    T3CON = 0x0040
    Basically all bits set to '0' except the 'run' bit. The timer will count up generating an interrupt each time it overflows, which would be once in every 21 ms (assuming 25 MHz CPU clock.)
    You can easily multiply this period by 2, 4, 8, ..., 128 by modifying the 3 least significant bits of T3CON (see formula & table in the manual.) If you need finer control of the period, you will have to use the reload feature of the timer which involves either timer 2 or timer 4.
    I hope this makes things clearer.

    Regards,
    - mike

Children
No data