最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

NEC%三菱%索尼%飞利普%东芝等6种红外遥控器编码及程序

IT圈 admin 30浏览 0评论

2024年4月16日发(作者:成飞兰)

HT48CA0 APPLICATION NOTE

. Application Circuit

HOLTEK HT48CA0 (64KEY)

432109876543

222221111111

0

A

C

8

4

1

T

U

H

000

123456789

012

111

K57K49K41K33K25K17K9K1

K58

K50

K42

K34K26

K18

K10

K2

D1D2

K59

K51

K43

K35K27

K19

K11

K3

K60

K52

K44

K36K28

K20

K12

K4

Q1Q2

K61

K53

K45

K37K29

K21

K13

K5

K62

K54

K46

K38K30

K22

K14

K6

K63

K55

K47

K39K31

K23

K15

K7

K64

K56

K48

K40K32

K24

K16

K8

.Working Register Define

;*****************************************************

;@***** Filename : (Remote 64KEY) ******

;@************** OSC:455KHz CARRY:38KHz ***********

;@****************** HT48CA0 ******************

;;*****************************************************

;;***** System memory Map *****

M_INDIRECT1 equ [00h] ;Indirect addressing register

M_MP0 equ [01h] ;Data Memory point

M_ACC equ [05h] ;Accumulator

M_PCL equ [06h] ;Program Counter Lower-order

M_TBLP equ [07h] ;Table Pointer

M_TBLH equ [08h] ;Table Higher-order byte

M_STATUS equ [0ah] ;Micro controll status

PORT_A equ [12h] ;PA I/O register

PORT_B equ [14h] ;PB I/O register

PORT_C equ [16h] ;PC Output register

PORT_AC equ [3Eh] ;PA Temp register

;-----------------------------------

;;--- System FLAG define ---

#define fg_CF M_STATUS.0 ;CARRY Flag

#define fg_ZF M_STATUS.2 ;ZERO Flag

;;--- I/O Pin define ---

#define pn_IR PORT_C.0 ;Carry Output Port

;;--- Address Define ---

#define DATA_RAM 20h ;HT48CA0

;;--- Instruction Define ---

#define NOP2 JMP $+1 ;Long NOP Define

;@------------------------------------------------

SAMPLE .SECTION 'DATA'

;; --- Temp RAM ---

a_SR10 DB ? ;;WORK Temp Register

a_SR11 DB ? ;;

a_SR12 DB ? ;;

a_SR13 DB ? ;;

;;--------- Program RAM --------

a_SCAN_STEP DB ? ;;Scan Key Colummn Step Number

a_PREV_KEY DB ? ;;Save Previous Key Number

a_KEY_NUM DB ? ;;Scan Key Number

a_COL_VALUE DB ? ;;Read on column value to a_COL_VALUE

KD_TEMP DB ? ;;Key Debounce Check Times

NKD_TEMP DB ? ;;Key Release Confirm Times

;;--- User FLAG define ---

fg_SendActive DBIT ;;VALIDITY KEY Flag

fg_PressRec DBIT ;;Check Column Multi_Key Flag

fg_REPEAT DBIT ;;REPEAT KEY Flag

fg_Multi_Key DBIT ;;INVALID KEY Flag

2024年4月16日发(作者:成飞兰)

HT48CA0 APPLICATION NOTE

. Application Circuit

HOLTEK HT48CA0 (64KEY)

432109876543

222221111111

0

A

C

8

4

1

T

U

H

000

123456789

012

111

K57K49K41K33K25K17K9K1

K58

K50

K42

K34K26

K18

K10

K2

D1D2

K59

K51

K43

K35K27

K19

K11

K3

K60

K52

K44

K36K28

K20

K12

K4

Q1Q2

K61

K53

K45

K37K29

K21

K13

K5

K62

K54

K46

K38K30

K22

K14

K6

K63

K55

K47

K39K31

K23

K15

K7

K64

K56

K48

K40K32

K24

K16

K8

.Working Register Define

;*****************************************************

;@***** Filename : (Remote 64KEY) ******

;@************** OSC:455KHz CARRY:38KHz ***********

;@****************** HT48CA0 ******************

;;*****************************************************

;;***** System memory Map *****

M_INDIRECT1 equ [00h] ;Indirect addressing register

M_MP0 equ [01h] ;Data Memory point

M_ACC equ [05h] ;Accumulator

M_PCL equ [06h] ;Program Counter Lower-order

M_TBLP equ [07h] ;Table Pointer

M_TBLH equ [08h] ;Table Higher-order byte

M_STATUS equ [0ah] ;Micro controll status

PORT_A equ [12h] ;PA I/O register

PORT_B equ [14h] ;PB I/O register

PORT_C equ [16h] ;PC Output register

PORT_AC equ [3Eh] ;PA Temp register

;-----------------------------------

;;--- System FLAG define ---

#define fg_CF M_STATUS.0 ;CARRY Flag

#define fg_ZF M_STATUS.2 ;ZERO Flag

;;--- I/O Pin define ---

#define pn_IR PORT_C.0 ;Carry Output Port

;;--- Address Define ---

#define DATA_RAM 20h ;HT48CA0

;;--- Instruction Define ---

#define NOP2 JMP $+1 ;Long NOP Define

;@------------------------------------------------

SAMPLE .SECTION 'DATA'

;; --- Temp RAM ---

a_SR10 DB ? ;;WORK Temp Register

a_SR11 DB ? ;;

a_SR12 DB ? ;;

a_SR13 DB ? ;;

;;--------- Program RAM --------

a_SCAN_STEP DB ? ;;Scan Key Colummn Step Number

a_PREV_KEY DB ? ;;Save Previous Key Number

a_KEY_NUM DB ? ;;Scan Key Number

a_COL_VALUE DB ? ;;Read on column value to a_COL_VALUE

KD_TEMP DB ? ;;Key Debounce Check Times

NKD_TEMP DB ? ;;Key Release Confirm Times

;;--- User FLAG define ---

fg_SendActive DBIT ;;VALIDITY KEY Flag

fg_PressRec DBIT ;;Check Column Multi_Key Flag

fg_REPEAT DBIT ;;REPEAT KEY Flag

fg_Multi_Key DBIT ;;INVALID KEY Flag

发布评论

评论列表 (0)

  1. 暂无评论