ETC IR

TITLE:
How to Implement Infrared function with EM57000 series ?
REVISED DATE
REVISED VERSION
APPLY TO CHIPS
APPLY TO SOFTWARE
:
:
:
:
13, JUNE, 1998
1.0
EM57000 Series Chip (Except EM57001,EM57400)
ALL EM57000 series coding system above version 2.1
SEE ALSO:
1. EM57000 series contain infrared function ( EM57001 and EM57400
don't have infrared function ) which can generate 38K Hz
square wave to ouside world from port 3.2 whenever it needs.
2. To activate infrared function, programmer should control bit 2,
bit3 and bit4 of mode register :
When bit4,3,2 of mode register is "101", infrared function will
be activated.
When bit4,3,2 of mode register is "000", infrared function will
be disabled.
MODE = 101?B => Enable infrared function.
MODE = 000?B => Disable infrared function.
Note that for bit 0 of mode register we mark it as ? means this
bit can be "1" or "0". This bit have no relation with infrared
function.
bit 0 of MODE register can be used to enable/disable flash with
volume.
3. User will need to enable port 3.2 by seting bit 2 of P3S as "0"
so that 38K Hz square wave can send to outside world. But status
of Port 3.2 can be "1" or "0"
4. Following is a simple example, it show you how to implement infrared
function :
MOV
MOV
MOV
MOV
SIGN1:
MOV
MOV
A, #0000B ; Enable port 3.2
P3S A
A, #0100B ; Initial status of port 3.2 is "1"
P3 A
A
#1010B ; Send out 38 K Hz square
MODE A
RSTC
DELAY1:
CJC
JMP
SIGN2
DELAY1
; P3.2 = 38K Hz
; for 8 mS
SIGN2:
MOV
MOV
A
#0000B ; Stop 38 K Hz square
MODE A
DELAY2:
CJC
JMP
SIGN3
DELAY2
; P3.2 = 1
; for 8 mS
SIGN3:
MOV A
#1010B ; Send out 38 K Hz square again
MOV MODE A
RSTC
DELAY3:
CJC
JMP
SIGN4:
...
SIGN4
DELAY3
; P3.2 = 38K Hz
; for 8 mS