Hi! Can anybody tell me where i can find some i2c examples for philips 89c669.I have some examples for 89c668.But I still can not run it in my 89c669 system. I change my rtxconf.a51(make a new type 22) as below: . ... ELSEIF (?RTX_CPU_TYPE = 22) ;*********** ;* Type 22 * ;*********** ;------------------------------------------------------------------ ; Define the number and addresses of the interrupt enable registers ; Philips 89c669 -> 2 interrupt enable register ; (Set the not used registers to the same address as ?RTX_IE) INT_EN_MASK_NUMBER EQU 2 ?RTX_IE DATA 0A8H ?RTX_IEN1 DATA 0E8H ?RTX_IEN2 DATA 0A8H ; not used ;------------------------------------------------------------------ ; Generate the interrupt entry points supported by the peripherals ; of the selected CPU type. IF (?RTX_SYSTEM_TIMER = 0) ; Do NOT include the Timer 0 Vector (INT-1) INT_ENTRY 0 INT_ENTRY 2 INT_ENTRY 3 INT_ENTRY 4 INT_ENTRY 5 INT_ENTRY 6 INT_ENTRY 7 INT_ENTRY 8 INT_ENTRY 10 INT_ENTRY 11 ELSEIF (?RTX_SYSTEM_TIMER = 1) ; Do NOT include the Timer 1 Vector (INT-3) INT_ENTRY 0 INT_ENTRY 1 INT_ENTRY 2 INT_ENTRY 4 INT_ENTRY 5 INT_ENTRY 6 INT_ENTRY 7 INT_ENTRY 8 INT_ENTRY 10 INT_ENTRY 11 ELSEIF (?RTX_SYSTEM_TIMER = 2) ; Do NOT include the Timer 2 Vector (INT-5) INT_ENTRY 0 INT_ENTRY 1 INT_ENTRY 2 INT_ENTRY 3 INT_ENTRY 4 INT_ENTRY 6 INT_ENTRY 7 INT_ENTRY 8 INT_ENTRY 10 INT_ENTRY 11 ENDIF ;------------------------------------------------------------------ ; The following table attaches the interrupt numbers (0..31) to the ; corresponding bits in the interrupt enable masks of the specific ; processor. ; All three interrupt enable register contents must be defined ; for every interrupt number (even when the specific processor contains ; only one interrupt mask). ; Syntax: DB IE-content, IE1-content, IE2-content ; ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF SEGMENT CODE RSEG ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF ?RTX_INT_TO_BIT_TABLE_BASE: DB 01H, 00H, 00H ; INT_0 DB 02H, 00H, 00H ; INT_1 DB 04H, 00H, 00H ; INT_2 DB 08H, 00H, 00H ; INT_3 DB 10H, 00H, 00H ; INT_4 DB 20H, 00H, 00H ; INT_5 DB 40H, 00H, 00H ; INT_6 DB 00H, 02H, 00H ; INT_7 DB 00H, 04H, 00H ; INT_8 DB 00H, 00H, 00H ; no used DB 00H, 01H, 00H ; INT_10 (Ser 1) DB 00H, 10H, 00H ; INT_11 (i2c) ; (*) PFI (power fail interrupt): not supported by RTX as task ; interrupt. May be used by C51 interrupt functions only. ;------------------------------------------------------------------ ; Define the greatest supported interrupt number ?RTX_MAX_INT_NBR EQU 11 PCON DATA 87H ENTER_IDLE MACRO ;; ;; Enter Idle Mode ;; --------------- ;; Not supported by all 8051 type processors (see manufacturer's ;; data sheet !) ;; To be used whenever entering idle state. ;; ORL PCON, #01H ; Set idle mode (leave by interrupt) ; (peripherals stay active) ENDM ...