EmbeddedRelated.com
Forums

Newbie question: TimerA and DCOCLK

Started by pollyp100 October 25, 2005
Greetings,

I am new to both the msp430 and embedded programming in general, and,
as befits my status, I have a newbie question to ask.

I have MCLK set to DCO, and now I want to post a timer interrupt every
n counts. I therefore want to use TimerA in continuous mode. The
problem I have is that there doesn't seem to be any way to select the
MCLK or DCOCLK as the clock source: my choices seem to be ACLK, SMCLK,
two external clock inputs. Am I missing something here? How can I make
TimerA work with DCOCLK?

While I'm at it: I'm having a hard time understanding the system
header file, msp430x11x1.h. For example, I'll see a bunch of #defines
for MC1 and MC0, but a few lines down I'll see #defines for MC_0, ...
MC_3. The users guide lists four possible settings for the relevant
bits in the control register, so what's the purpose of the MC1 and MC0
#defines?

Many Thanks,

-I.






Beginning Microcontrollers with the MSP430

Ok maybe I can answer this one,

 

Yes as you said you can't source ACLK through DCOCLK, ACLK can only be
sourced through external crystal LFXT1CLK.

 

Timer A can be sourced by ACLK and SMCLK, since the source of SMCLK can be
DCOCLK, it indirectly means that DCOCLK can be used as a source for TimerA.

 

Hope you understood it

 

Srikar 

 

  _____  

From: msp430@msp4... [mailto:msp430@msp4...] On Behalf Of
pollyp100
Sent: Tuesday, October 25, 2005 4:06 PM
To: msp430@msp4...
Subject: [msp430] Newbie question: TimerA and DCOCLK

 

Greetings,

I am new to both the msp430 and embedded programming in general, and,
as befits my status, I have a newbie question to ask.

I have MCLK set to DCO, and now I want to post a timer interrupt every
n counts. I therefore want to use TimerA in continuous mode. The
problem I have is that there doesn't seem to be any way to select the
MCLK or DCOCLK as the clock source: my choices seem to be ACLK, SMCLK,
two external clock inputs. Am I missing something here? How can I make
TimerA work with DCOCLK?

While I'm at it: I'm having a hard time understanding the system
header file, msp430x11x1.h. For example, I'll see a bunch of #defines
for MC1 and MC0, but a few lines down I'll see #defines for MC_0, ...
MC_3. The users guide lists four possible settings for the relevant
bits in the control register, so what's the purpose of the MC1 and MC0
#defines?

Many Thanks,

-I.







.






  _____  

>  Terms of Service. 

 

  _____  






Hi,

MC0 and MC1 are the bit definitions of the control register.
MC_0 to MC_3 are the logical states that are possible with two bits 
(MC0, MC1) to encode!

Hope this was helpful


> While I'm at it: I'm having a hard time
understanding the system
> header file, msp430x11x1.h. For example, I'll see a bunch of #defines
> for MC1 and MC0, but a few lines down I'll see #defines for MC_0, ...
> MC_3. The users guide lists four possible settings for the relevant
> bits in the control register, so what's the purpose of the MC1 and 
MC0
> #defines?