Enabling and Disabling Counter in Firmware.
Anonymous
Not applicable
Mar 27, 2011
01:43 AM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Mar 27, 2011
01:43 AM
Question: I am looking for at way to enable and disable the counter. I can use the User Module's Enable Parameter to enable and disable the counter (by setting it to High or Low). How do I do this in firmware?
Answer:
The counter is controlled by both the Hardware Enable Input controlled by the DxBxxIN register and the Enable bit in the DxBxxCR0 register. The counter will operate only when the Hardware Enable input is high and the Enable bit in the CR0 register is high. The simplest way to enable and disable the counter is to set the Enable Input of the counter to High in the device editor and use the Counter_Start and Counter_Stop functions from the Counter's API. Alternately, the counter may also be started and stopped by setting the Enable signal to High and Low respectively by writing to the DxBxxIN register (The Enable bit in the CR0 should be set). Same is the case with other basic digital User Modules.
Labels
- Tags:
- psoca 1
Rate this article:
Contributors
-
This widget could not be displayed.Anonymous