Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

10ms Interrupts using TA1 with SMCLK (DC0 = 8MHz)

$
0
0

Hi all,

 

I am trying to create a 10ms interrupt in my program code to continually check to see if a tactiile switch has been pressed.

Right now I am just trying to toggle a bit on my launchpad (P1.5 msp430g2553) and I have been having issues. 

 

I am running a 8Mhz clock from the DCO, and am trying to use SMCLK (sub main clock = DCO?) for the Timer A1 clock source and am dividing that by 8.

 

I am looking at the output of P1.5 on the scope and it is trying to toggle the bits but the "toggling" is extremlely short and just appears as little blips in the waveform.  If you zoom in on them they are periodic and there is the fall time is ~87us (decayed), the rise time is virtually 0us.

 

Why isn't there a longer delay between toggling bits, and why is there a large decay time fall?  Thanks guys I really appreciate it.

Here is my code:

 

 

 

 

Attached Files

  • Attached File  blink.c   2.36KB   5 downloads

Viewing all articles
Browse latest Browse all 2077

Trending Articles