Generating a 1 Pulse Per Second using MSP430

OP (Company: OrnetPower) #4800615
Hello ,
I'm new in Micro Controller field and i have been doing some readings 
(along with some relevant DataSheets) , although i still didn't 
understand few things .
I'm using MSP430F5131 and attached an external crystal of 12.8MHz to 
pins PJ.4 and PJ.5 .
I would like to generate a 1 pulse per second using this external clock 
while the output of the 1pps should be P2.4 , im also using Timer D 
(TD0.0) .

Could you help me writing the code (I'm using Code Composer Studio) 
about how to generate that 1 pps using the external crystal and Timer D 
(TD0.0) and how to define the timer d and external crystal.

thanks in advance.
Guest #4801181
Start with studying and understanding the Device Clock Tree (which is 
not trivial in MSP430). Then, get TI´s samples and try to generate at 
least some output on P2.4. Once you have some output, you can start 
modifying its frequency. Do you have an oscilloscope or a logic 
analyzer?
OP (Company: OrnetPower) #4801921
yes i do have one .

I tried to figure out the code syntax.
they use #pragma function in order to use the clock register vector, 
although i havn't seen any information about that.

where can i find information about these kind of syntax? and where can i 
find a CCS example code that could help me doing that?

could you recommend on a datasheet that can help me figure out the basic 
of the msp430 along with code syntax?

thanks.

Reply

A question of your own? This thread is over 9 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.