stc driver EEPROM chip AD and C code
//———————————————— ——< br />//# define ENABLE_ISP 0×83 / / <12MHz
return ch;
sfr ISP_CMD = 0xE5;
{
Byte_Program (address, * (ch k));
extern void send_string_com (uchar * str, uchar strlen);
//——————— ——- flash memory starting address
* Project: –
* Compiler: KEIL C51 –
ISP_CONTR = ENABLE_ISP; / / open the IAP function, set the Flash operation wait time
Delay (2); / / 22us .. original 13us
ISP_TRIG = 0xB9;
//——————– Credit card banks are not open annual fee reminders as received ———————————-< br />}
/ / Sector_Erase (address);
while (k
/ / Function: byte programming, writing
uchar data AD_channel_result [2] [5]; / / The channel A / D conversion the results. The former is the channel number; after the conversion value
ADC_CONTR = ADC_CONTR / / 1110,0000 clear ADC_FLAG, ADC_START bits and lower 3
//———— ——————————————< br /> void Byte_Program (uint address, uchar ch);
{
/ *
ADC_CONTR = ADC_CONTR(display_AD_channel_ID [channel] / / set the current channel number
ISP_CONTR = 0;
void Moreyte_Read (uint address)
* Compiler: KEIL C51 –
//————————— – serial port can be converted into the characters
extern void Delay (uint number); / / crystal = 11059200, machine cycle = 1.085069444us, “plus” of the machine cycle = 1
–
}
ISP_TRIG = 0×46; / / starting ISP processor
do {;}
/ / save back to AD conversion result
while ((ADC_CONTR