sbitDQ=PI^2; unsigned char ROMID[ 16][81; unsigned char TH; unsigned char TL; unsigned char confbReg; unsigned char scratchPad[9]; unsigned char setBuf[3]; void delay(int cat) { int i; for(i=0;i<cnt;i++); } unsigned char bus rcset(vod) { unsigned char presence; DQ=0; delay(29); DQ=1; delay(3); Presence=DQ delay(25); return presence; } unsigned char rena bit(void) { unsigned char i; DQ=0; DQ=1; for(i=0;i<3;i++); return DQ; void write}bit(cliar bitvalue) { DQ=0; if(bitvalue==1) { DQ=1; } delay(5); DQ=1; } unsigned char read byte(void) unsigned char i; unsigned char value=0; for(i=0;i<8;i++) { if(read bit()) { value=value| (0x01 <<i); } } delay(6); return value; } void write-byte(cbar bytevalne) { unsigned chat i; unsigned char temp; for(i=0;i<8;i ++) { temp=bytevalue>>i; temp=temp&0x01; write bit(temp); } delay(5); } unsigned char i; if(bus-resetQ) return false; write byte(0x55);