❶ 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文件夾下面。