參數(shù)資料
型號(hào): MC68HC05K3
廠商: Motorola, Inc.
英文描述: 8-Bit Microcontroller Units (MCU).(8位微控制器)
中文描述: 8位微控制器單元(MCU)。(8位微控制器)
文件頁(yè)數(shù): 33/56頁(yè)
文件大?。?/td> 311K
代理商: MC68HC05K3
Application Note
Source Code
AN1288
MOTOROLA
33
/* evaluate_results_program function
*
* Function input variables: None.
*
* Function outputs: an integer;
* -1: If the emulator log file failed to open.
* 0: If the K3's personality EEPROM was successfully
* programmed.
* 1: If the K3's personality EEPROM failed to program.
*
* This function reads the log file made by the emulator and from the address
* of the PC register, determines if the EEPROM was successfully programmed or
* not. The addresses are as follows: $013D-EEPROM was correctly programmed,
* $013F-EEPROM failed to be programmed.
*
*/
int evaluate_program_results(void)
{
FILE *k3eeprog_log_file; // file pointer to emulator log file.
char linestring[80]; // generic character string.
// Open emulator log file. If it fails to open, return a negative one.
if((k3eeprog_log_file = fopen("k3eeprog.log","r")) == NULL)
return(-1);
// Find the line in the log file that contain the register contents.
// When it is found, determine the location of the PC register.
while(fgets(linestring,80,k3eeprog_log_file) != NULL)
{
if(strstr(linestring,"PC") != NULL)
{
// If the PC address is $13D return a zero.
if(strstr(linestring,"13D") != NULL)
return(0);
// If the PC address is $13F return a one.
else if(strstr(linestring,"13F") != NULL)
return(1);
// If neither address is found, return a negative one.
else
return(-1);
}
}
return(-1);
}
相關(guān)PDF資料
PDF描述
MC68HC805K3 8-Bit Microcontroller Units (MCU).(8位微控制器)
MC68HC05L16 80-Pin Microcontroller Unit (MCU) With Highly Sophisticated On-Chip Peripheral Functions(80腳、8位帶高級(jí)外圍電路功能的微控制器單元)
MC68HC05P18A Low Cost HCMOS Microcontroller(低成本、8位HCMOS微控制器)
MC68HC05P4A 28-pin MCU (microcontroller unit) based on the MC68HC05P4(28引腳、基于MC68HC05P4升級(jí)的8位微控制器單元)
MC68HC05PV8A Low Cost HCMOS Microcontroller(低成本、8位HCMOS微控制器)
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MC68HC05K3CDW 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS Microcontroller Unit
MC68HC05K3CP 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS Microcontroller Unit
MC68HC05K3CSD 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS Microcontroller Unit
MC68HC05K3DW 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS Microcontroller Unit
MC68HC05K3P 制造商:FREESCALE 制造商全稱:Freescale Semiconductor, Inc 功能描述:HCMOS Microcontroller Unit