Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Quadrature Encoder on SAM3U4E
PostPosted: Tue Oct 18, 2011 12:51 pm 
Offline

Joined: Tue Oct 18, 2011 12:45 pm
Posts: 2
Hi,

Has anyone successfully managed to set up the quadrature decoder logic on the SAM3U4E?

It would appear that the associated register definitions are missing from AT91SAM3U4.h (generated 11/17/2009 (13:04:57)). I've attempted to set the device up as per the data sheet after including my own definitions but have had no success. This has left me questioning why the definitions were omitted in the first place.

Any help anyone could provide regarding this peripheral would be greatly appreciated.

Cheers.


Top
 Profile  
 
 Post subject: Re: Quadrature Encoder on SAM3U4E
PostPosted: Tue Oct 18, 2011 3:36 pm 
Offline

Joined: Tue Oct 18, 2011 12:45 pm
Posts: 2
Solved.

The missing piece of the puzzle was that although the encoder is externally clocked it will not start counting unless the clocks on TC0 and TC1 are enabled and a sync command has been issued.

AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKEN;
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN;
AT91C_BASE_TCB0->TCB_BCR= AT91C_TCB_SYNC; //Start both timer

The position mode of the quad encoder now operates as per the datasheet. The user is still required to update the header file to define the missing registers.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to: