📄 msp430x21x2_adc10_18.c
字号:
//******************************************************************************
// MSP430F21x2 Demo - ADC10, DTC Sample A1/0 -> TA1/2, 2.5V, HF XTAL
//
// Description: Use DTC to sample both A1 and A0 with reference to internal
// 2.5V Vref continously and directly transfer codes to Timer_A CCR1 and CCR2
// output units. Timer_A has been configured for 10-bit PWM mode. TACCR1 and
// TACCR2 duty cycles are automatically proportional to ADC10 A1 and A0
// respectively. No CPU resources are required and in this example the CPU is
// turned off. ADC10 A1/A0 sampling and transfers to TA1/TA2 done continously
// and automatically by the DTC.
// MCLK = SMCLK = HF XTAL = 8MHz, ACLK = (HF XTAL)/8
// As coded, ADC10CLK = ACLK/8 = 125kHz, and each Ax sample and transfer to
// TAx requires 77 ADC10CLK. With an 8MHz HF XTAL, loop transfer rate is
// 125k/(2*77) = 812/second.
// //* An external 8MHz XTAL on XIN XOUT is required for ACLK *//
// //* Min Vcc required varies with MCLK frequency - refer to datasheet *//
//
// MSP430F21x2
// -----------------
// /|\| XIN|-
// | | | HF XTAL (3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -