Download CodeVisionAVR User Manual

Transcript
CodeVisionAVR
for (i=0;i<devices;i++)
// make sure to select only the DS2433 types
// 0x23 is the DS2433 family code
if (rom_code[i][0]==DS2433_FAMILY_CODE)
{
printf("\n\r");
// write text in each DS2433 at START_ADDR
if (ds2433_write_block(&rom_code[i][0],
text,START_ADDR,sizeof(text)))
{
printf("Data written OK in DS2433 #%-u!\n\r",i+1);
// display the text written in each DS2433
if (ds2433_read_block(&rom_code[i][0],buffer,START_ADDR,
sizeof(text)))
printf("Data read OK!\n\rDS2433 #%-u text: %s\n\r",
i+1,buffer);
else printf("Error reading data from DS2433 #%-u!\n\r",i+1);
}
else printf("Error writing data to DS2433 #%-u!\n\r",i+1);
};
// stop
while (1);
}
Refer to the DS2433 data sheet for more information.
© 1998-2007 HP InfoTech S.R.L.
Page 169