Read Microsoft Word - ha0040s.doc text version

HT6221

HT6221

HA0040s

HT6221

V

D D

1 .8 V ~ 3 .5 V 4 7 m F /1 6 V In fra re d 4 7 W 1 k W 1 1 8 X 2 6 V D D D O U T V S S C 8 1 3 1 2 R 1 1 R 2 2 R 3 3 R 4 4 A IN 2 0 1 0 L E D 5 8 0 5 0

3 3 0 W 1 0 0 p F 1 0 0 p F L E D 4 5 5 k H z c e r a m ic r e s o n a to r 9 X 1 7 D 7 C 1 5 1 k W ´ 8 1 9 C 2 1 8 C 3 1 7 C 4 1 6 C 5 1 5

0 6 $

C 6 1 4 C 7

K 1 K 2 K 3 K 4

K 5 K 6 K 7 K 8

K 9 K 1 0 K 1 1 K 1 2

K 1 3 K 1 4 K 1 5 K 1 6

K 1 7 K 1 8 K 1 9 K 2 0

K 2 1 K 2 2 K 2 3 K 2 4

K 2 5 K 2 6 K 2 7 K 2 8

K 2 9 K 3 0 K 3 1 K 3 2 1 N 4 1 4 8 ´ 8

HT6221

HT6221 Holtek PPM Pulse Position Modulation 1.12ms 02.24ms 1

3 8 k H z c a r r ie r d a ta p e r io d ( 1 .1 2 m s ) "O n e " d a ta p e r io d ( 2 .2 4 m s ) 3 8 k H z c a r r ie r

"Z e ro " 0 .5 6 m s

HT6221 9ms 4.5ms 16 18ms~36ms 9ms~18ms 8 8

4 .5 m s D O U T 9 m s 4 5 m s ~ 6 3 m s (A 0 ~ A 1 5 + D 0 ~ D 7 + D 0 ~ D 7 ) 1 0 8 m s 9 m s 0 .5 6 m s 0 .5 6 m s

3 8 k H z , 3 3 % d u ty c a r r ie r 2 .5 m s 1 0 8 m s

9 m s

2 .5 m s

HT48R30A-1 HT6221 HT48R30A-1 ;File name:6221receiver.asm ;: KELVEN ;: RAM ; ; 4000kHz include ht48r30a-1.inc ; *********************************************** ; * Filename : 6221RECEIVER.asm * ; * Function : DECODER HT6221 * ; * Microprocessor : HT48R30A-1 * ; * Crystal : 4MHz * ; *********************************************** data.section 'data' card_no0 card_no1 card_no2 card_no3 temp cint equ equ equ equ equ db ? [060h] [061h] [062h] [063h] [07eh] ; bit ;

;

HT6221

count db ? count_buf db ? int_acc db ? ; right_tou dbit y_bit dbit ;----------------------------------------code.section at 0000 'code' org 00h jmp org jmp org jmp start 04h do_wai 08h do_tmr

;

; time

org 20h start: set pgc ; call init mov a, 81h ;fsys/4 1M mov tmrc, a mov a, 56 mov tmr, a ;200µs mov a, 6 mov intc, a set tmrc.4 ;-----------------------------------------------------sleep: set intc.0 snz y_bit ; jmp sleep ; call decode_1 ; snz right_tou ; jmp start mov a, cint sub a, 32 ; bit snz c ; jmp sleep clr clr cpla xor tmrc intc card_no2 a, card_no3 ;

;

HT6221

snz z jmp error1 jmp start ; error1: jmp start ; ;--------------------------------do_wai : clr tmrc.4 clr intc.0 mov int_acc, a ;push acc mov a, count mov count_buf, a clr count set y_bit over_int: mov a, 56 mov tmr, a mov a, int_acc ;pop acc set tmrc.4 set intc.0 reti ;---------------------do_tmr: inc count reti ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ decode_1 proc clr intc.0 clr y_bit snz right_tou jmp judge_touma mov a, count_buf sub a, 4 snz c jmp error ;data 200µs*4=800µs mov a, count_buf sub a, 13 sz c jmp error ;data 200µs*13=2.6ms mov a, count_buf ;data 200µs*8=1.6ms sub a, 8 ;c=1, data=1 ;data 200µs*8=1.6ms c=0, data=0 rrc card_no3

HT6221

rrc card_no2 rrc card_no1 rrc card_no0 inc cint ; BIT ret error: clr count clr right_tou ret judge_touma: clr right_tou ; 13.50ms mov a, count_buf sub a, 70 ;200*70=14ms sz c ret ; 14ms mov a, count_buf sub a, 63 ;63*200=12.6ms snz c ret ; 12.6ms set right_tou ret decode_1 endp ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;Function : init ;Purpose : clear ram value ;Parameter: ;Return : ;Modified : acc, status ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ init proc clr intc ; mov a, 20h mov mp0, a mov a, 5fh mov temp, a ram_clr: ; RAM clr r0 inc mp0 sdz temp jmp ram_clr ret init endp

Information

Microsoft Word - ha0040s.doc

5 pages

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

314105