![]() When using Capture Inputs we use Timer Block in Normal ‘ Timer Mode‘ or ‘ Counter Mode‘. ![]() This mapping of Capture Channel to pins is as given below: Timer0 These channels are mapped to device pins. capture) of the current value of TC when a signal edge is detected. Using these Capture channels we can take a snapshot(i.e. Capture Channels and Input pinsĮach timer block has 4 Capture Channels (CAPn.0 to CAPn.3, n=Timer number) associated with it. When the timer is used in ‘Counter’ mode, and external signal is used to increment the value of TC. When it reaches its maximum value it gets reset to 0 and hence restarts counting. When Timer is Reset and Enabled, TC is set to 0 and incremented by 1 every ‘PR+1’ clock cycles. TC stores the current value of the count and PR stores a prescalar value. A timer has a Timer Counter(TC) and Prescale Register(PR) associated with it. Each Timer block can be used as a ‘Timer’ or as a ‘Counter’. A quick recap:ĪRM LPC214x MCUs have two 32-bit-Timer blocks. In my previous LPC2148 Timer tutorial we saw how to setup and program the timer module. ![]() Following the request of some of our readers, in this tutorial we will cover how to program capture mode for timer module of ARM7 LPC2148 microcontroller along with a frequency counter example using capture input.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |