Friday, 6 September 2019

clock - How to calculate the time of one single tick on microcontroller


I have been in Embedded system for 8 months. I have worked application part more compare with low level. I have basic questions on systems ticks,



  1. How to calculate the system tick of Timer, if I am starting the Hardware Timer of a controller for generating any delay. If I am having the 16-bit timer for example and I configured the system clock for 8MHz. As per my knowledge the single tick will be T=1/f. Then one single tick will take 0.125 microsecond. Is this correct? or any other dependency to calculate it. Whether this calculation will vary with controller by controller?

  2. Is there any way to configure the clock(eg 1MHz) for only Timer or any other peripheral with out changing the System Clock(eg 8Mhz)

  3. If controller goes to low power mode(typically a changing of power mode). The timer resolution will also change? whether I need to change the setting of Timer for each power Mode.




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...