您当前的位置:五五电子网电子知识单片机-工控设备STC单片机(STC89C58RD+ 内部EEPROM 放数据 FLASH-ISP-IAP 正文
STC89C58RD+ 内部EEPROM 放数据 FLASH-ISP-IAP

STC89C58RD+ 内部EEPROM 放数据 FLASH-ISP-IAP

点击数:7786 次   录入时间:03-04 11:55:23   整理:http://www.55dianzi.com   STC单片机(
        0x17,        0x16,        0x15,        0x14,        0x13,        0x12,        0x11,        0x10,
        0x0f,        0x0e,        0x0d,        0x0c,        0x0b,        0x0a,        0x09,        0x08,
        0x07,        0x06,        0x05,        0x04,        0x03,        0x02,        0x01,        0x00
};

void display_Begin_LED(void)
{
 Begin_LED = 0;  /* Begin_LED on */
}
void off_Begin_LED(void)
{
 Begin_LED = 1;  /* Begin_LED off */
}
void display_OK_LED(void)
{
 OK_LED  = 0;  /* OK_LED on */
}
void off_OK_LED(void)
{
 OK_LED  = 1;  /* OK_LED off */
}

void display_ERROR_LED(void)
{
 ERROR_LED = 0;  /* ERROR_LED on */
}
void off_ERROR_LED(void)
{
 ERROR_LED = 1;  /* ERROR_LED off */
}

void delay(INT16U counter)
{
 INT16U temp = 0;
 for(temp = counter; temp>0; temp--)
 {
  _nop_();
  _nop_();
  _nop_();
 }
}

void main()
{
//sbit        Begin_LED = P1^0;
//sbit        ERROR_LED = P1^3;
//sbit        OK_LED = P1^7;

 display_Begin_LED();
 delay(DELAY_CONST);

 sector_erase(DEBUG_Data_Memory_Begin_Sector_addr);
 if(byte_program_and_verify(DEBUG_Data_Memory_Begin_Sector_addr,0x55) == OK)
  display_OK_LED();
 else
  display_ERROR_LED();

/*
 if(sequential_write_flash_in_one_sector(DEBUG_Data_Memory_Begin_Sector_addr, USED_BYTE_QTY_IN_ONE_SECTOR, Test_array_total))
  display_OK_LED();
 else
  display_ERROR_LED();
*/
/*
 if(write_flash_with_protect_in_one_sector(DEBUG_Data_Memory_Begin_Sector_addr+0x3, USED_BYTE_QTY_IN_ONE_SECTOR-0x30, Test_array_total))
  display_OK_LED();
 else
  display_ERROR_LED();
*/
 while(1);
}

 



上一页  [1] [2] [3] [4] [5] [6] 


本文关键字:暂无联系方式STC单片机(单片机-工控设备 - STC单片机(