我在试验用FLASH模拟EEPROM,进入DEBUG模式已运行就失败了,然后连接就出现如下的问题,换了一片9S08QG8也还是一样,这是怎么回事,是我的“P&E USB Multilink Interface"坏了吗?我的项目还没做完呢?
源程序如下: #include <hidef.h> /* for EnableInterrupts macro */ #include "derivative.h" /* include peripheral declarations */ #include "hcs08_eeprom_api.h" void MCU_init(void); /* Device initialization function declaration */ void HCS08_EE_Init(void); void HCS08_EE_WriteRecord(unsigned char *src); void HCS08_EE_ModifyByte(unsigned int index, unsigned char data); void HCS08_EE_ReadRecord(unsigned char *dest); unsigned char PIDXYZ[EEPROM_DATA_LEN]; unsigned char PIDXYZREAD[EEPROM_DATA_LEN]; void main(void) { MCU_init(); /* call Device Initialization */ /* include your code here */ PIDXYZ[0] = 0; PIDXYZ[1] = 1; PIDXYZ[2] = 2; PIDXYZ[3] = 3; HCS08_EE_Init(); HCS08_EE_WriteRecord(PIDXYZ); HCS08_EE_ReadRecord(PIDXYZREAD); for(;;) { /* __RESET_WATCHDOG(); by default, COP is disabled with device init. When enabling, also reset the watchdog. */ } /* loop forever */ /* please make sure that you never leave main */ }
|