Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

10-bit High Speed Timer/Counter4 (64MHz)

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
yantel37

Bascom Member



Joined: 24 May 2009
Posts: 5

spain.gif
PostPosted: Mon Feb 09, 2015 4:06 pm    Post subject: 10-bit High Speed Timer/Counter4 (64MHz) Reply with quote

Dear Colleagues,
I would like to know if anyone knows how to use the Timer / Counter4 of ATMEGA32U4?
BASCOM-AVR does not provide instruction to configure and use this device.
Would appreciate help on this topic.

(BASCOM-AVR version : 2.0.7.8 )
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1801

blank.gif
PostPosted: Mon Feb 09, 2015 8:21 pm    Post subject: Reply with quote

Looks like Timer4 is a quite complex timer, which isn't supported by Bascom's Config ...
You always can configure AVR's periphery by writing directly to the registers. If you need help, better specify exactly, what you want to use the timer for.
Otherwise - the data sheet explains it in detail.
Back to top
View user's profile
yantel37

Bascom Member



Joined: 24 May 2009
Posts: 5

spain.gif
PostPosted: Tue Feb 10, 2015 2:18 pm    Post subject: Reply with quote

The aim is to use the High Speed Asynchronous counter for measuring time and frequency. On the other hand I can not find the input pin and the necessary configuration (may be too complicated ...)
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1801

blank.gif
PostPosted: Tue Feb 10, 2015 6:18 pm    Post subject: Reply with quote

yantel37 wrote:
On the other hand I can not find the input pin and the necessary configuration (may be too complicated ...)

Understandable, as there is no T4 external input pin.
This timer looks suitable with it's dead time generator for motor control, respectively H-bridges.
But neither the T4 has an input capture unit, nor does it allow for external clocking.
You can easily find that out by checking the prescaler bits for T4 in TCCR4B, you'll find also a table with all possible CS43..40 combinations.
Compare that with T1, you won't find a setting that allows for external clock on T4.
Back to top
View user's profile
yantel37

Bascom Member



Joined: 24 May 2009
Posts: 5

spain.gif
PostPosted: Wed Feb 11, 2015 10:32 am    Post subject: Reply with quote

MWS Thanks for your reply. But it is a shame to have such a potent peripheral and not to use it, with the number of applications that could be implemented ...
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum