❶ freescale如何调试AD
你用那种型号的片子,先AD初始化,设置转换管脚以及AD转换用的寄存器,然后就可写AD数据采集了,给你个小程序:
#include <hidef.h> /* for EnableInterrupts macro */
#include "MC13213.h" /* include peripheral declarations */
#define LED PTAD_PTAD0
unsigned char DataInput;
void main(void)
{
//PTBDD_PTBDD0 = 0x00;
ATD1PE = 0x81;
ATD1C_ATDPU = 1;
ATD1C_DJM = 1;
ATD1C_RES8 = 1;
ATD1C_SGN = 0;
ATD1C_PRS = 3;
ATD1SC_ATDCH = 7;
ATD1SC_ATDCO = 0;
ATD1SC_CCF = 0;
ATD1SC_ATDIE = 0;
PTADD_PTADD0 = 0xFF;
EnableInterrupts; /* enable interrupts */
/* include your code here */
for(;;)
{
(void) ATD1R;
ATD1SC_ATDCH = 7;
ATD1SC_CCF = 0;
while(!ATD1SC_CCF)
{
__RESET_WATCHDOG(); /* feeds the dog */
}
DataInput = ATD1RH;
//t = ATD1RH;
PTAD_PTAD0 = DataInput;
}
/* loop forever */
/* please make sure that you never leave main */
}
❷ Freescale CodeWarrior5.1烧写程序时候找不到指定模块 win7 64位
CodeWarrior for S12(X) V5.0
3.1、如果安装了5.0(4.7)版的,而且驱动选择的是...USBDMV13\LQ-USBDM driver\USB_driver2则将龙丘光盘(或者给你的驱动)\BDM驱动程序\LQ-USBDM\Debug DLLs20090530下的拷回贝tbdml.dll -> "C:\Program Files\Freescale\CodeWarrior for S12(X) V5.0\Prog\gdi"文件夹下面。答
CodeWarrior for Microcontrollers V6.2
2.1、如果安装了6.2版的,则将龙丘光盘(或者给你的驱动)\BDM驱动程序\LQ-USBDM\Debug DLLs20090530下的opensourcebdm.dll拷贝到(当前Codewarrior的安装路径)\Program Files\Freescale\CodeWarrior for Microcontrollers V6.2\prog\gdi文件夹下面。