- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been looking at the datasheet of the microcontroller and a question arose as to what the "dual counter" of the dual timer would be.
S6E1A12C0AGV20000/Cypress
Solved! Go to Solution.
- Tags:
- down counter
- mcu
- s6e1a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
A down counter is a counter which decreases the count value instead of increasing of "Up Counter."
For a timer, if you assign the length to count,
it will be easier (or cheaper) in terms of speed and number of logic gates required
to check if the count value is 0 or not
instead of comparing with each particular value.
I've seen this approach even in "C" programs, some (or many?) programmers who care about speed tend to write a for loop just like
for(i = max-1 ; i ; --i)
where I would usually write
for (i = 0 ; i < max ; i++)
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
A down counter is a counter which decreases the count value instead of increasing of "Up Counter."
For a timer, if you assign the length to count,
it will be easier (or cheaper) in terms of speed and number of logic gates required
to check if the count value is 0 or not
instead of comparing with each particular value.
I've seen this approach even in "C" programs, some (or many?) programmers who care about speed tend to write a for loop just like
for(i = max-1 ; i ; --i)
where I would usually write
for (i = 0 ; i < max ; i++)
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank's!!!!