Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62408

Forum Post: RE: Signal measurement

$
0
0
yes here is the code mov.w #SFE(CSTACK),SP ; Initialize stackpointer StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer SetupADC12 mov.w #REFON+REF2_5V,&ADC12CTL0 ; Internal reference mov.b #060h,&DCOCTL ; mov.b #0Fh, &BCSCTL1 SetupDMA0 movx.w #Sin_tab,&DMA0SA ; Source block address movx.w #DAC12_0DAT,&DMA0DA ; Destination single address mov.w #48h,&DMA0SZ ; Block size mov.w #DMA0TSEL_5,&DMACTL0 ; DAC12IFG trigger mov.w #DMADT_4+DMASRCINCR_3+DMAEN,&DMA0CTL; Rpt, inc src, word-word SetupDAC120 mov.w #DAC12SREF_2+DAC12LSEL_2+DAC12IR+DAC12AMP_5+DAC12IFG+DAC12ENC,&DAC12_0CTL SetupC1 mov.w #OUTMOD_3,&TACCTL1 ; TACCR1 set/reset mov.w #01,&TACCR1 ; TACCR1 PWM Duty Cycle SetupC0 mov.w #4140,&TACCR0 SetupTA mov.w #TASSEL_2+MC_1,&TACTL SetupDAC121 mov.w #DAC12AMP_5+DAC12IR+DAC12ENC,&DAC12_1CTL mov.w #0fffh,&DAC12_1DAT Mainloop ; bis.b #CPUOFF,SR Sin_tab DW 2048, 2226, 2403, 2578, 2748, 2913, 3072, 3222 DW 3364, 3495, 3616, 3725, 3821, 3903, 3972, 4025 DW 4064, 4087, 4095, 4087, 4064, 4025, 3972, 3903 DW 3821, 3725, 3616, 3495, 3364, 3222, 3072, 2913 DW 2748, 2578, 2403, 2226, 2048, 1870, 1693, 1518 DW 1348, 1183, 1024, 874, 732, 601, 480, 371 DW 275, 193, 124, 71, 32, 9, 1, 9 DW 32, 71, 124, 193, 275, 371, 480, 601 DW 732, 874, 1024, 1183, 1348, 1518, 1693, 1870

Viewing all articles
Browse latest Browse all 62408

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>