//Disclaimer. // THIS PROGRAM IS PROVIDED "AS IS". MICROTREND SYSTEMS INC. MAKES NO // WARRANTIES OR REPRESENTATIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, // INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR // COMPLETENESS OF RESPONSES OR RESULTS . // MICROTREND SYSTEMS INC. DISCLAIMS ANY WARRANTY OF TITLE, // QUIET ENJOYMENT,QUIET POSSESSION,AND NON-INFRINGEMENT OF ANY THIRD PARTY // INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE PROGRAM OR // YOUR USE OF THE PROGRAM.IN NO EVENT SHALL MICROTREND SYS. // BE LIABLE FOR ANY SPECIAL, INCIDENTAL,CONSEQUENTIAL OR INDIRECT // DAMAGES, HOWEVER CAUSED, ON ANY THEORY OF LIABILITY AND WHETHER // OR NOT MICROTREND SYS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH // DAMAGES, ARISING IN ANY WAY OUT OF THIS AGREEMENT, THE PROGRAM, // OR YOUR USE OF THE PROGRAM. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT // LIMITED TO, COST OF REMOVAL OR REINSTALLATION, COMPUTER TIME, LABOR // COSTS, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF // USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL MICROTREND SYS. // AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF // YOUR USE OF THE PROGRAM EXCEED FIVE (U.S.$5). // Unless otherwise stated, the Program written // by Microtrend Sys. is distributed as "freeware". You may, // only under Microtrend Sys. copyright in the Program, use // and modify the program without any charge or restriction. You may // distribute to third parties, provided that you transfer a // copy of this license to the third party and the third party // agrees to these terms by its first use of the Program. You // must reproduce the copyright notice and any other legend of // ownership on each copy or partial copy, of the Program. // You acknowledge and agree that the Program contains // copyrighted material, trade secrets and other Microtrend Sys. // proprietary information and is protected by copyright laws, // international copyright treaties, and trade secret laws, as // well as other intellectual property laws. //****************************************************************************** // Program to demonstrate a" no jitter" high frequency 3Mhz signal out of 32Khz // crystal // | | // | P1.1|--> MCLK = 3Mhz // | | // | P1.5|--> ACLK = 32khz // | | // // // Microtrend Systems Inc. // January 2003 // Built with IAR Embedded Workbench Version: 1.25A //****************************************************************************** #include "msp430x43x.h" void main(void) { WDTCTL = WDTPW + WDTHOLD; // stop watchdog timer FLL_CTL0 =DCOPLUS+ XCAP18PF; // division for DCO+ enable caps _BIS_SR(SCG0); // SCG0 bit set in SR to cancel FLL action SCFQCTL=SCFQ_M; // M bit set to cancel modulation SCFI1 =0x98; // only 5 DCO bits in SCFI1 determine frequency // here 0x98= aprox. 3Mhz SCFI0 =0x0; //set DCO range 0.7 - 6 MHz open loop // here 0x98= aprox. 3Mhz FLL_CTL1=SELM_A; //CPU runs on ACLK P1DIR = 0xb0; // P1.4,P1.7 & P1.5 to output direction P1SEL = 0x30; // P1.4,P1.7 & P1.5 to output SMCLK & ACLK P1OUT=0x80; //P1.7 is enable TPS61130 dc/dc converter while(1); // loop }