6.TMS320C6678裸机按键实验
时间:10-02
整理:3721RD
点击:
半个月一直在忙毕业答辩的事,今天早上刚刚答辩完,因此更新一下。
建立了基于裸机的按键实验,同时建立include和source文件夹,然后将一下重要的文件复制到该路径下:
在main.c文件下写入main.c文件下:
int main(void)
{
// 驱动库版本
Version();
// 中断驱动库版本
VersionI();
// 取得芯片型号
DSPChipType = DSPTypeGet();
// 外设初始化
PeriphInit();
// 主循环
for(;;)
{
// 亦可以使用查询法查询中断状态
if(Flag)
{
if(DSPChipType == DSP_C6678)
{
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(CoreLED1, LED_ON);
LEDControl(CoreLED2, LED_OFF);
LEDControl(BoardLED1, LED_OFF);
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(CoreLED1, LED_OFF);
LEDControl(CoreLED2, LED_ON);
LEDControl(BoardLED1, LED_OFF);
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(CoreLED1, LED_OFF);
LEDControl(CoreLED2, LED_OFF);
LEDControl(BoardLED1, LED_ON);
}
else if(DSPChipType == DSP_C6654 || DSPChipType == DSP_C6655 || DSPChipType == DSP_C6657)
{
Delay(0x00FFFFFF);
LEDControl(BoardLED_D3, LED_ON);
LEDControl(BoardLED_D5, LED_OFF);
LEDControl(BoardLED_D7, LED_OFF);
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(BoardLED_D3, LED_OFF);
LEDControl(BoardLED_D5, LED_ON);
LEDControl(BoardLED_D7, LED_OFF);
Delay(0x00FFFFFF);
LEDControl(BoardLED_D3, LED_OFF);
LEDControl(BoardLED_D5, LED_OFF);
LEDControl(BoardLED_D7, LED_ON);
}
}
}
}
点击编译的那个小锤子:
由于我编译过了 因此这里没有别的反映。
建立了基于裸机的按键实验,同时建立include和source文件夹,然后将一下重要的文件复制到该路径下:
在main.c文件下写入main.c文件下:
int main(void)
{
// 驱动库版本
Version();
// 中断驱动库版本
VersionI();
// 取得芯片型号
DSPChipType = DSPTypeGet();
// 外设初始化
PeriphInit();
// 主循环
for(;;)
{
// 亦可以使用查询法查询中断状态
if(Flag)
{
if(DSPChipType == DSP_C6678)
{
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(CoreLED1, LED_ON);
LEDControl(CoreLED2, LED_OFF);
LEDControl(BoardLED1, LED_OFF);
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(CoreLED1, LED_OFF);
LEDControl(CoreLED2, LED_ON);
LEDControl(BoardLED1, LED_OFF);
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(CoreLED1, LED_OFF);
LEDControl(CoreLED2, LED_OFF);
LEDControl(BoardLED1, LED_ON);
}
else if(DSPChipType == DSP_C6654 || DSPChipType == DSP_C6655 || DSPChipType == DSP_C6657)
{
Delay(0x00FFFFFF);
LEDControl(BoardLED_D3, LED_ON);
LEDControl(BoardLED_D5, LED_OFF);
LEDControl(BoardLED_D7, LED_OFF);
// 延时(非精确)
Delay(0x00FFFFFF);
LEDControl(BoardLED_D3, LED_OFF);
LEDControl(BoardLED_D5, LED_ON);
LEDControl(BoardLED_D7, LED_OFF);
Delay(0x00FFFFFF);
LEDControl(BoardLED_D3, LED_OFF);
LEDControl(BoardLED_D5, LED_OFF);
LEDControl(BoardLED_D7, LED_ON);
}
}
}
}
点击编译的那个小锤子:
由于我编译过了 因此这里没有别的反映。
帖子感觉不完整啊
你好,我最新也在学6678,请问创龙的这个6678的光盘资料你还有吗,能不给给我发一份,QQ号:1437193069
万分感谢!