-
不好意思,由于本人最近工作比较忙,业余时间不充足,放弃本次的测评申请,抱歉,不好意思。
-
SOPC去跑,效果蛮好的,我这儿用现成的IP核,非常好用!
-
钽电容会短路,发烫。
低价设计基于51、AVR、MSP430、SOPC、ARM的项目、课题、毕业论文设计、并做出完成所需功能指标的实物,有意者请QQ:514011021
-
根据需求设置,如果要求系统跑得快些,时钟精准些,就设置成XT2一般是8MHz;如果没什么特别的要求,就用系统DCO提供的1M的频率,如果是要求低功耗或时间相关的时钟源,最好用32768Hz的外部晶振。还有关于其他的就参照楼上说的:
ACLK是辅助时钟,一般是低频的时钟,使用32768Hz的低频振荡或者12KHz的VLO。
MCLK是主时钟,给CPU提供,这个需要根据实际情况来,可以是DCO或者是HF的振荡器。
SMCLK是外设时钟,常用的是从DCO获取时钟源。
低价设计各种51,AVR,MSP430单片机、sopc,ARM嵌入式系统毕业论文而且做出实物原型机,有意者请QQ:514011021
-
得看看MSP430的头文件资源了
以下是定时器A的部分头文件,
一看#define MC0 (0x0010u)便知道MC0代表的值了,呵呵...
/* Alternate register names 2 */
#define CCTL0 TACCTL0 /* Timer A Capture/Compare Control 0 */
#define CCTL1 TACCTL1 /* Timer A Capture/Compare Control 1 */
#define CCTL2 TACCTL2 /* Timer A Capture/Compare Control 2 */
#define CCR0 TACCR0 /* Timer A Capture/Compare 0 */
#define CCR1 TACCR1 /* Timer A Capture/Compare 1 */
#define CCR2 TACCR2 /* Timer A Capture/Compare 2 */
#define CCTL0_ TACCTL0_ /* Timer A Capture/Compare Control 0 */
#define CCTL1_ TACCTL1_ /* Timer A Capture/Compare Control 1 */
#define CCTL2_ TACCTL2_ /* Timer A Capture/Compare Control 2 */
#define CCR0_ TACCR0_ /* Timer A Capture/Compare 0 */
#define CCR1_ TACCR1_ /* Timer A Capture/Compare 1 */
#define CCR2_ TACCR2_ /* Timer A Capture/Compare 2 */
#define TASSEL1 (0x0200u) /* Timer A clock source select 0 */
#define TASSEL0 (0x0100u) /* Timer A clock source select 1 */
#define ID1 (0x0080u) /* Timer A clock input divider 1 */
#define ID0 (0x0040u) /* Timer A clock input divider 0 */
#define MC1 (0x0020u) /* Timer A mode control 1 */
#define MC0 (0x0010u) /* Timer A mode control 0 */
#define TACLR (0x0004u) /* Timer A counter clear */
#define TAIE (0x0002u) /* Timer A counter interrupt enable */
#define TAIFG (0x0001u) /* Timer A counter interrupt flag */
#define MC_0 (0*0x10u) /* Timer A mode control: 0 - Stop */
#define MC_1 (1*0x10u) /* Timer A mode control: 1 - Up to CCR0 */
#define MC_2 (2*0x10u) /* Timer A mode control: 2 - Continous up */
#define MC_3 (3*0x10u) /* Timer A mode control: 3 - Up/Down */
#define ID_0 (0*0x40u) /* Timer A input divider: 0 - /1 */
#define ID_1 (1*0x40u) /* Timer A input divider: 1 - /2 */
#define ID_2 (2*0x40u) /* Timer A input divider: 2 - /4 */
#define ID_3 (3*0x40u) /* Timer A input divider: 3 - /8 */
#define TASSEL_0 (0*0x100u) /* Timer A clock source select: 0 - TACLK */
#define TASSEL_1 (1*0x100u) /* Timer A clock source select: 1 - ACLK */
#define TASSEL_2 (2*0x100u) /* Timer A clock source select: 2 - SMCLK */
#define TASSEL_3 (3*0x100u) /* Timer A clock source select: 3 - INCLK */
#define CM1 (0x8000u) /* Capture mode 1 */
#define CM0 (0x4000u) /* Capture mode 0 */
#define CCIS1 (0x2000u) /* Capture input select 1 */
#define CCIS0 (0x1000u) /* Capture input select 0 */
#define SCS (0x0800u) /* Capture sychronize */
#define SCCI (0x0400u) /* Latched capture signal (read) */
#define CAP (0x0100u) /* Capture mode: 1 /Compare mode : 0 */
#define OUTMOD2 (0x0080u) /* Output mode 2 */
#define OUTMOD1 (0x0040u) /* Output mode 1 */
#define OUTMOD0 (0x0020u) /* Output mode 0 */
#define CCIE (0x0010u) /* Capture/compare interrupt enable */
#define CCI (0x0008u) /* Capture input signal (read) */
#define OUT (0x0004u) /* PWM Output signal if output mode 0 */
#define COV (0x0002u) /* Capture/compare overflow flag */
#define CCIFG (0x0001u) /* Capture/compare interrupt flag */
#define OUTMOD_0 (0*0x20u) /* PWM output mode: 0 - output only */
#define OUTMOD_1 (1*0x20u) /* PWM output mode: 1 - set */
#define OUTMOD_2 (2*0x20u) /* PWM output mode: 2 - PWM toggle/reset */
#define OUTMOD_3 (3*0x20u) /* PWM output mode: 3 - PWM set/reset */
#define OUTMOD_4 (4*0x20u) /* PWM output mode: 4 - toggle */
#define OUTMOD_5 (5*0x20u) /* PWM output mode: 5 - Reset */
#define OUTMOD_6 (6*0x20u) /* PWM output mode: 6 - PWM toggle/set */
#define OUTMOD_7 (7*0x20u) /* PWM output mode: 7 - PWM reset/set */
#define CCIS_0 (0*0x1000u) /* Capture input select: 0 - CCIxA */
#define CCIS_1 (1*0x1000u) /* Capture input select: 1 - CCIxB */
#define CCIS_2 (2*0x1000u) /* Capture input select: 2 - GND */
#define CCIS_3 (3*0x1000u) /* Capture input select: 3 - Vcc */
#define CM_0 (0*0x4000u) /* Capture mode: 0 - disabled */
#define CM_1 (1*0x4000u) /* Capture mode: 1 - pos. edge */
#define CM_2 (2*0x4000u) /* Capture mode: 1 - neg. edge */
#define CM_3 (3*0x4000u) /* Capture mode: 1 - both edges */
低价设计各种51,AVR,MSP430单片机、sopc,ARM嵌入式系统毕业论文而且做出实物原型机,有意者QQ:514011021
-
谢谢1
-
本帖最后由 paulhyde 于 2014-9-15 03:50 编辑 呵呵...这个我暑期培训做过这道题,我们做得每项要求都达标,基本上是满分!
-
程序有问题,根本就不同
-
用DDS产生比较好!
-
:) 测试
-
好好的