Other Parts Discussed in Thread: CC3200
I am currently attempting to generate a square wave to through the specified speaker above using the msp430. We're currently able to generate a flat wave using the following code below. We're unsure whether we need another micro controller, or if there's a flaw in the code. Any modification to the posted code, or advice, will be much appreciated.
#include "msp430.h" ; #define controlled include file
NAME main ; module name
PUBLIC main ; make the main label vissible
; outside this module
ORG 0FFFEh
DC16 init ; set reset vector to 'init' label
RSEG CSTACK ; pre-declaration of segment
RSEG CODE ; place program in 'CODE' segment
init: MOV #SFE(CSTACK), SP ; set up stack
main: NOP ; main program
MOV.W #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
BIS.B #BIT1, &P2DIR ;
BIS.B #BIT1, &P2SEL ;
MOV.W #3822, &TA1CCR0 ;
MOV.W #1911, &TA1CCR1 ;
BIS.W #OUTMOD_7, &TA1CCTL1 ;
BIS.W #TASSEL_2 + MC_1, &TA1CTL;
BIS.W #LPM0 + GIE, SR ;
MOV.W #1000, R7 ;
JMP $ ; jump to current location '$'
; (endless loop)
END
NOTE: THIS NEEDS TO BE IN ASSEMBLY LANGUAGE CODE. NOT C++.

