Library provided by Embedded Systems Academy, Copyright 2003 Visit www.esacademy.com/faq/progs for examples and libraries. This library: 669IAPLIB - name of application: 669IAPLIBExample ==================================================== C compatible In-Application Programming Library for the Philips P89C669 Hardware requirements ===================== P89C669 with development board Software requirements ===================== Keil 8051 Compiler System www.keil.com Optional: Development Assistant-C by RistanCASE www.ristancase.ch Tested using ============ Keil C51 Toolset version 7.01, optimization level 7, ROM size HUGE Application description ============================================= Keil specific files have their names prefixed with 'k'. The 669IAPLIB is an In-Application Programming library for the P89C669 which may be used with a C project. The library is implemented in assembler, but has a C interface hiding the assembler from the C programmer. The package includes the library, a C header file, a manual in PDF format and an example project for both the Keil 8051 Compiler. The following functions are implemented in the library, giving access to all the features of IAP: unsigned char iap_read_manufacturer_id(void); unsigned char iap_read_device_id(unsigned char id_number); unsigned char iap_read_security_bits(void); void iap_program_security_bits(unsigned char bits); unsigned char iap_program_data_byte(unsigned char val, unsigned int addr, unsigned char seg); unsigned char iap_read_data_byte(unsigned int addr, unsigned char seg); unsigned char iap_erase_block(unsigned int block); unsigned int iap_read_boot_vector(void); unsigned char iap_read_status_byte(void); unsigned char iap_erase_bv_sb(void); unsigned char iap_program_status_byte(unsigned char status_byte); unsigned char iap_program_boot_vector(unsigned int boot_vector);