[SOLVED] MSP430-5510STK and ACLK

Started by red-lichtie, August 11, 2015, 07:05:52 PM

Previous topic - Next topic

red-lichtie

How do I output 32 kHz on P1_0/ACLK (or any other pin for that matter) using XT1 ? I need to supply the signal to another device.

I am a complete MSP430 novice and if someone could show me a few lines of code that would be awesome.

I see that BUT1 is also connected to that pin with a 4.7k pull up resistor and a 100nF capacitor, so I hope that they won't interfere with the desired output.


It turns out that the solution is extremely simple:
#include <msp430f5510.h>

void main(void)
{
P1DIR |= BIT0; // P1_0 to output
P1SEL |= BIT0; // P1_0 select ACLK
}