Курсовая работа: Разработка микропроцессорной системы АОНа на базе микроконтроллера

K4 - подключается к сигналу DATA ЖКИ.

K5 - подключается к сигналу CLK ЖКИ. K6 - подключается к сигналу SEL ЖКИ. K7 - подключается к сигналу KEYCLOCK ЖКИ. K8 - подключается к сигналу KEYSET ЖКИ. K9 - подключается после ключа включающего разговорную часть, но до сглаживающего дросселя. K10 и K11 подключаются непосредственно к двум проводам телефонной линии. K12 - подключается к общему проводу телефона.

Схема принципиальная электрическая АОН разработанная в Accel EDA представлена на рис. 2.

Номера записанные в память телефона для быстрого набора никак не связаны с номерами хранящимися в списке АОН и манипуляции с одними не отражаются на других.


Рис. 2 - Принципиальная схема АОНав AccelEDA

Принципиальная схема АОНаприведена в Приложении Б.

Спецификация элементов приведена в Приложении В.

ЗАКЛЮЧЕНИЕ

В данном курсовом проекте разработано устройство - Автоматический Определитель Номера. Разработана схема электрическая принципиальная этого устройства и программа для микроконтроллера. В результате ассемблирования получена прошивка программы для памяти микроконтроллера. Применение микроконтроллера позволило упростить принципиальную схему и расширить функциональные возможности микроконтроллера, так как для изменения функций устройства достаточно внести изменения в программу микроконтроллера. Существенно сократились размеры устройства, относительно аналогичных, собранных на базе п/п элементов и соответственно сократилось энергопотребление.

СПИСОК ИСПОЛЬЗОВАННЫХ ИСТОЧНИКОВ

1. Техническая документация на микроконтроллеры Z86E0812PSC компании MicrochipTechnologyIncorporated ООО«Микро-Чип», Москва, 2002.-184 с.

2. Проектирование цифровых устройств на однокристальных микроконтроллерах / В.В. Сташин [ и др.]. – М.: Энергоатомиздат, 1990. – 224 с.

3. Евстифеев А.В. Микроконтроллеры Microchip: практическое руководство/А.В.Евстифеев. – М.: Горячая линия – Телеком, 2002. – 296 с.

4. Ульрих В.А. Микроконтроллеры PIC16х\17хx / В.А. Ульрих. Изд. 2-е, перераб. и доп. – СПб.: Наука и техника, 2002. – 320 с.

5. Александр Елисеев (E-mail: [email protected])


ПРИЛОЖЕНИЕ А

Листинг программы и объектный файл

TITLE ????????? ??? "Panaphone"Z8REGDEFS; ?????????? ????????????? ????TIM_BL_H = 10H; ?????? ??????TIM_BL_L = 11H; ?????? ??????N_RECORD = 12H; ????? ?????? ? ??????BLC_CLOCK = 13H; ??????? ?????????? ?? ??????? ??????? CLOCKCNT_SET = 14H; ?????????????? SETCNT_CLOCK = 15H; ?????????????? CLOCKCNT_TWIX = 16H; ??????? ??????? ????? ??????F_KEYS = 17H; XXXXXXXX ????? ??????CONST_KEY = 10; ????????? ???????????? ?????????? ?????? ????? ?????????CONST_BELL = 1000; ????????? ??????TET1 = 18H; 1-? ?????? ???????TET2 = 19H; 2-? ?????? ???????TET3 = 1AH; 3-? ?????? ???????TET4 = 1BH; 4-? ?????? ???????TET1_ = R8; 1-? ?????? ???????TET2_ = R9; 2-? ?????? ???????TET3_ = R10; 3-? ?????? ???????TET4_ = R11; 4-? ?????? ???????CNT_ONL = 18H; ??????? ?????? ?????PRE_N = 1CH; ?????????? ?????CNT_REP = 1DH; ??????? ???????? ?????COND = 1EH; ????????? ?????MASK1 = 1FH; ????? ?????? ????? ??????BUF_NUM = 20H; ?????? ?????? ??????BEG_ST = 40H; ?????? ?????BEG_COD = 40H; ?????? ??????? ?????? ????????? ????BEG_LST = 59H; ?????? ??????END_LST = 7CH; ????? ??????BFLAG = 7FH; XXXXXXXX; ????????; ???????+------; ??????+-------; ?????+-------- ???? ????????????????? ??????; ????+--------- ???? ?????????? ??????; ???+---------- ???? ????????? ?????????; ??+----------- ???? ?????????? ?????? ????????; ?+------------ ???? 1-? ?????; +------------- ???? ??????TESTB = 7EH; ????-???? ??????????? ??????????CNT_B = 7DH; ??????? ???????????? ??????? ??????;+------------------------------------------------------------------+;? ?????? ???????????? ????? ?;+------------------------------------------------------------------+CODEGLOBALABSORG 0??????? ???????? ???????? ??????????WORDINT_P3_2L;P3.2 F-edgeWORD INT_P3_3L;P3.3 F-edgeWORD INT_P3_1L;P3.1 F-edgeWORD INT_P3_2H;P3.2 R-edgeWORD INT_T0;T0WORD Sample;T1; ????? ??????: ???????? ?????????; ?????????? ?????????; ?????????? ?? ??????????; ????????? ????? ?? ?????????; ??????????? ????????? = 0; ???? 2 ???????? ????,??? ?????; ???? 3 ????????; ???? 0 ????INT_P3_2L:INT_P3_3L:INT_P3_1L:INT_P3_2H:START:; LD RP,#0FH; ??????????? ?????????? ?? P2.7; LD 0BH,#00010100B; ??? ?????????LD RP,#00LD P01M,#00000100B; ???? P0 - ?????LD P3M,#00000011B; P2 - Pull-Ups Activ; P3 - AnalogLD P2, #11111111B; ????? ? ???? 2; ????????; ???????+------ ???? ??????? SET; ??????+------- ???? ??????? CLOCK; ?????+-------- -; ????+--------- -; ???+---------- ?????? ?????????? ????????; ??+----------- ?????????? ??????; ?+------------ ?????? ?????; +------------- ???? ??????????;LD P2M,#11001111B; ??????????? ??????????? ??????? ????? P2LD P0,#00000111B;LD PRE0,#11001001B; ?????????? ??????? 50LD TMR,#00001011B; ?????????? ????? ???????? T0 ? ?????????LD T0,#150; ???????????? ??????? ?????? 5 ??LD IMR,#10010000B; ?????????? T0 ? ?????????? T1BEGIN:LD SPL,#BEG_STEICP TESTB,#55H; ???????? ??????????? ??????????JR Z,NOT_CLEAR_RAM;LD R4,#5CLEAR_RAM:; ??????? ??? ???????????LD @R4,#0INC R4CP R4,#127JR C,CLEAR_RAMLD TESTB,#55HLD MASK1,#2; ????????? ????? ?????? ????? ??????LD CNT_B,#0NOT_CLEAR_RAM:AND BFLAG,#00000111B; ????? ????? ??????,???????????; ?????????? ??????,????????? ????? ?; ??????? ??????CALL GO_HALT;;------------------------------------------------------------------------; ????????????;------------------------------------------------------------------------MAIN:TCM P2,#00000011BJP NZ,M1M2_2:TM P2,#01000000BJR Z,M2TM P3,#00000100BJR NZ,M2LD P2M,#11001111BNOPSTOPM2:LD R4,#10LD CNT_ONL,#0M2_0: CALL GO_HALTINC CNT_ONL; ??????????????????TM P2,#01000000BJR Z,M2_1LD CNT_ONL,#0M2_1:DJNZ R4,M2_0CP CNT_ONL,#8JR UGE,M3; ??????? ???? ?????? ?????TM BFLAG,#10000000BJR NZ,M2JR M2_2M3:AND BFLAG,#10110011BTM BFLAG,#10000000BJR Z,M4AND P0,#11111110B; ?????? LCDPUSH IMRCALL ID_NUMOR P2,#00100000BPOP IMRLD R7,#BUF_NUM; ????????????? LCDLD R6,#0LD R8,#8CALL SEND_BYTECALL SEND_BYTEM3_1: LD R6,@R7CALL SEND_BYTEINC R7DJNZR8,M3_1TM BFLAG,#00000100B; ?? ????????? ????? ???? ?? ?? ???????????JR NZ,M4LD R7,#END_LST; ????? ?????? ?? ???? ??????LD R8,#END_LST-4M3_2: LD R4,@R8LD @R7,R4DEC R7DEC R8CP R8,#BEG_LSTJR UGE,M3_2LD R7,#BEG_LST; ???????? ?????? ? ??????LD R8,#BUF_NUMLD R9,#4M3_3: LD R4,@R8SWAP R4AND R4,#0F0HINC R8AND @R8,#0FHOR R4,@R8LD @R7,R4INC R8INC R7DJNZ R9,M3_3OR P0,#00000001B; ????? ?????? LCDM4: AND BFLAG,#00110011BLD BLC_CLOCK,#0TM P2,#00000100BJR NZ,M4_1AND P0,#11111110B; ?????? LCDM4_1:CALL GO_HALTTM P2,#01000000B; ???????? ???? ? ?????JR Z,M5; ??????? ???? ??? ???????? ? ?????LD R9,#0; ??????? ?????MN4_1: LD R4,#20; ??????? ????????MN4_2: CALL GO_HALTTM P2,#01000000B; ???????? ???? ? ?????JR Z,MN4_3; ??????? ???? ????????? ???????DJNZ R4,MN4_2; ????? ???? ??????? ??????? ???????OR P0,#00000001B; ????? ?????? LCDLD P2M,#11001111BNOPSTOPMN4_3:LD R4,#12; ????????????INC R9MN4_4: CALL GO_HALTTMP2,#01000000B; ???????? ???? ? ?????JRNZ,MN4_1; ??????? ???? ?????????? ?????DJNZ R4,MN4_4TM P2,#00000100BJR NZ,M5MN4_6: TM BFLAG,#01000000B; ????????? ???? ?????? ?????JR NZ,MN4_7LD R6,#00LD R8,#10MN4_8:CALL SEND_BYTEDJNZ R8,MN4_8OR BFLAG,#01000000B; ????????? ???? ?????? ?????MN4_7: LD R6,R9CALL SEND_BYTEM5:TM F_KEYS,#00001000B; ???????? ??????? SETJR Z,M4_1AND F_KEYS,#11110111B;CALL LISTJR M4M1:TM F_KEYS,#00010000B; ??????????????? CLOCKJR Z,M1_1AND F_KEYS,#11101111B; ????????????????? CLOCKCP BLC_CLOCK,#00; ???? ?? ??????? ??????? ??????? CLOCKJR NZ,M1_0LD BLC_CLOCK,#2JR M1_1M1_0: DEC BLC_CLOCKM1_1: TM F_KEYS,#00001000B; ???????? ??????? SETJP Z,MAIN;; ????? ????????? ??????;AND F_KEYS,#11110111BCALL LISTJP MAIN;+----------------------------------------------------------------------+;? ????? ????????? ?????? ?;+----------------------------------------------------------------------+LIST:AND F_KEYS,#11110111BCP BLC_CLOCK,#00JP Z,LIST1RETLIST1: AND P0,#11111110B; ?????? LCDLD R4,#10LIST2: CALL GO_HALTDJNZ R4,LIST2LIST3: LD N_RECORD,#1LIST4: LD R6,N_RECORDCALL SEND_BYTE; ??????? LCD ????????????LD R6,#0FH; '-'CALL SEND_BYTELD R7,N_RECORD; ?????????? ?????? ??????DEC R7RL R7; ???????? ?? 4 (????? ??????)RL R7ADD R7,#BEG_LST; ???????? ????? ?????? ??????LD R8,#2;; ????? ??????;LIST5:LD R6,@R7; ????? 8-? ?????? ??????SWAP R6AND R6,#0FH;TM BFLAG,#00010000B; ????????? ???? ????????? ?????????JP NZ,LIST6LD R6,#0; ?? ?????????? ????????? ???? ?? ?????????LIST6:; ????CALL SEND_BYTELD R6,@R7; ????? ?????? ????? ??????AND R6,#0FHCP R6,MASK1JP NZ,LIST7LD R6,#0LIST7:CALLSEND_BYTEINCR7; ????? ?????? ????? ??????LD R6,@R7SWAP R6CALL SEND_BYTESWAP R6; ????? ??????? ????? ??????CALL SEND_BYTELIST8:INC R7; ????????????????????????LD R6,@R7SWAP R6CALL SEND_BYTESWAP R6CALL SEND_BYTEDJNZ R8,LIST8LIST9: TM F_KEYS,#00100000B; ????????????????????????????? CLOCK,SETJR Z,LIST10AND F_KEYS,#11000111B;JR LIST12LIST10: TM F_KEYS,#00010000B; ??????????????? CLOCKJR Z,LIST11AND F_KEYS,#11101111B;INC N_RECORDCP N_RECORD,#9JR UGT,LIST3JR LIST4LIST11: TM F_KEYS,#00001000B; ??????????????? SETJP Z,LIST23AND F_KEYS,#11110111B;OR P0,#00000001BCALL GO_HALTCALL SEND_BYTERET;; ??????????????;LIST12:; ????????? ????? ?????? ?????????LD R6,#0CHCALL SEND_BYTETM BFLAG,#00010000B; ????????? ???? ????????? ?????????LD R6,#0AHJP Z,LIST13; ???????? ???? ????????? ?????????LD R6,#01HLIST13:CALL SEND_BYTELD R6,#0DHCALL SEND_BYTELD R6,#0CALL SEND_BYTECALL SEND_BYTELD R6,MASK1CALL SEND_BYTELD R6,#0CALL SEND_BYTECALL SEND_BYTECALL SEND_BYTECALL SEND_BYTELIST14:TMF_KEYS,#00001000B; ???????? ??????? SETJR Z,LIST15AND F_KEYS,#11110111B;JP LIST17LIST15:TM F_KEYS,#00010000B; ??????????????? CLOCKJR Z,LIST16AND F_KEYS,#11101111B;XOR BFLAG,#00010000B;JP LIST12LIST16: CALL GO_HALTJP NZ,BEGINJR LIST14LIST17:; ????????? ????? ?????? ?????LD R6,#00HCALL SEND_BYTETM BFLAG,#00010000B; ????????? ???? ????????? ?????????LD R6,#0AHJP Z,LIST18; ???????? ???? ????????? ?????????LD R6,#01HLIST18:CALL SEND_BYTELD R6,#00HCALL SEND_BYTECALL SEND_BYTELD R6,#0CHCALL SEND_BYTELD R6,MASK1CALL SEND_BYTELD R6,#0DHCALL SEND_BYTELD R6,#00HCALL SEND_BYTECALL SEND_BYTECALL SEND_BYTELIST19:TMF_KEYS,#00001000B; ???????? ??????? SETJR Z,LIST20AND F_KEYS,#11110111B;JP LIST4LIST20:TM F_KEYS,#00010000B; ??????????????? CLOCKJR Z,LIST22AND F_KEYS,#11101111B;INC MASK1CP MASK1,#0AHJR ULE,LIST21LD MASK1,#00LIST21:JP LIST17LIST22: CALL GO_HALTJP NZ,BEGINJR LIST19;;;LIST23: CALL GO_HALTJP NZ,BEGINJP LIST9;;----------------------------------------------------------------------; END LIST;+--------------------------------------------+;? ???????????? HALT ???????;+--------------------------------------------+GO_HALT:PUSH R4NOPHALTEXIT_STOP:;; ???????????????? SET;TM P2,#00000001B;JR NZ,K1;TM F_KEYS,#00000001B;JR NZ,K3;OR F_KEYS,#00001001B;JR K3;K1: AND F_KEYS,#11110110B;;; ???????????????? CLOCK;K3:;TM P2,#00000010B;JR NZ,K4;TM F_KEYS,#00000010B;JR NZ,K5;OR F_KEYS,#00010010B;JR K5;K4: AND F_KEYS,#11101101B;;; ????????? ?????? CLOCK+SET;K5:;TCM F_KEYS,#00000011B;JR NZ,K6;TM F_KEYS,#00000100B;JR NZ,K7;OR F_KEYS,#00100100B;JR K7;K6: AND F_KEYS,#11011011B;K7:;;; ???????????? ??????;TM BFLAG,#00001000B; ????????? ?????????? ??????JR NZ,K12TM P3,#00000100BJR Z,K10INC CNT_BCP CNT_B,#60; 0.3 ????????????JP ULT,K12OR BFLAG,#10000000BLD TIM_BL_H,#^hb(CONST_BELL)LD TIM_BL_L,#^lb(CONST_BELL)JR K12K10:CLR CNT_BLD R4,TIM_BL_HOR R4,TIM_BL_LJR NZ,K11AND BFLAG,#01111111BJR K12K11: DECW TIM_BL_HK12:LD R4,COND; ???????? ?????????? ? ????????? ?????????LD COND,P2; ?????XOR R4,COND; Z - ???? ????????? ?????????AND R4,#01000000B; NZ - ???? ????????? ??????POP R4RET;+----------------------------------------------------------------------+;? ??????????? ?????? ????????? ???????? ?;+----------------------------------------------------------------------?;? ?????: ???? C = 0 - ??????????? ??????????? ?;? C = 1 - ???? ??????????? ?;? ?;+----------------------------------------------------------------------+ID_NUM:LD TET1,0FFH; ?????????? ???????LD TET2,0FFH; ????? ????????????????LD TET3,0FFHLD TET4,0FFHCALL INIT_T1_500LD IMR,#10100000B; ?????????? T1 ? ?????????? T0LD R5,#4; ????? ???????? 3AND BFLAG,#01111111B; ????? ??????LD TIM_BL_H,#0; ???????? ?????? ??????LD TIM_BL_L,#0; ???????? ?????? ??????AND P2,#11011111B; ?????? ?????;---------------------------------------------------------------------------; ?????? 500 ??;REQ0:CALL INIT_T1_44117EILD IMR,#10100000B; ?????????? T1 ? ?????????? T0LOOP1:LD R9,#0; 6LD R11,#BEG_CODLOOP1_0:LD R12,#^hb(BIT_MAP); 6LD R13,#^lb(BIT_MAP); 6ADD R13,R9; 6ADC R12,#0; 10LDC R10,@RR12; 12LD @R11,R10INC R11INC R9; 6CP R9,#11; 10JP ULT,LOOP1_0; 12/10 MAX = 131LD R10,#100LOOP4:LD R11,#BEG_COD; 6LOOP4_0:LD R8,#8; 6LOOP3:LD R12,@R11; 10AND R12,#11011111BLD R2,R12RL @R11; 10NOP; 6HALT; 7LOOP2: DJNZ R8,LOOP3; 12/10INC R11; 6CP R11,#BEG_COD+11; 10JP ULT,LOOP4_0; 12/10 MAX = 131; JP LOOP4DJNZ R10,LOOP4; 12;----------------------------------------------------------------------------TM P2,#00000100B; ????? ?????? ????? ???? ??????? ???? ???????JR Z,ID_NUM0;OR P2,#00100000B;ID_NUM0:LD R4,#20ID_NUM1:PUSH R4; ??????? ?????? 0.2 ???PUSH R5CALL AON_processorPOP R5POP R4CP R8,#30JP NC,ID_NUM2DJNZ R4,ID_NUM1DJNZ R5,REQ0ID_NUM2:LD CNT_REP,#0; ???????? ??????? ????????LD PRE_N,#0FFH; ?????????? ????? ?? ??????????LD R4,#25; ?????????? ??????????? ?????LD R5,#BEG_COD; ????? ?????? ??????????? ????LD TET1,R9; ?????? ? ??????? ??????? ????ID_NUM3:PUSH R4PUSH R5CALL AON_processorPOP R5POP R4;; ??????? ????? ? ???????;LD RP,#10H; ??????? ???? ?????????LD TET4_,TET3_; ???????? ????? ? ???????LD TET3_,TET2_;LD TET2_,TET1_;LD TET1_,9; ???????? ??????? ?????;; ????????? ???????;LD 9,TET1_CP 9,TET2_JP Z,ID_NUM4LD 9,TET2_CP 9,TET3_JP Z,ID_NUM4LD 9,TET3_CP 9,TET4_JP Z,ID_NUM4LD 9,#0FFHID_NUM4:LD RP,#00CP PRE_N,R9; ????? ????? ?????????? ?JP Z,ID_NUM6CP CNT_REP,#00; ?????????? ????? ?????? ????? ???????JP Z,ID_NUM6; ???????ID_NUM5:LD @R5,R9LD PRE_N,R9; ????????? ??????? ?????INC R5LD CNT_REP,#00; ???????? ??????? ????????DJNZ R4,ID_NUM3; ?????????? ???? ???? ?? ????? ????????JR ID_NUM8_; 25 ????ID_NUM6:INC CNT_REP;; CP R9,#0FFH; ?? ????????? ?????? ???? ???????? ?? 0FFH; JR NZ,ID_NUM3;CP CNT_REP,#7;JP UGT,ID_NUM5;JR ID_NUM3;; ????????????;ID_NUM8_:LDR4,#BEG_CODLD R5,#6; ????? ???? ????? 0AH ? ??????? ????????ID_NUM9:; ?????CP @R4,#0AH; ????? ??????? ???????? ? ???. R6JR NZ,ID_NUM7; ??????? ? ???. R7LD @R5,R4;INC R5;CP R5,#8;JR UGE,ID_NUM8;ID_NUM7:;INC R4;CP R4,#BEG_COD+25JR ULT,ID_NUM9ID_NUM8:CP R5,#8JR Z,ID_NUM10CP R5,#7JR Z,ID_NUM11;; ?????????? ?????? ????? ???????????????? ???? ?? ??????? ?? ??????; ???? 0AH;LDR4,#BUF_NUMLDR5,#8ID_NUM12:LD @R4,#0FHINC R4DJNZ R5,ID_NUM12JP ID_NUM_ERRID_NUM10:LDR8,R6LD R9,R7JR ID_NUM13ID_NUM11:LD R8,R6LD R9,R8; ADD R9,#9ID_NUM13:LDR4,#8LD R10,#BUF_NUMDEC R8DEC R9ID_NUM20:CP R8,#BEG_CODJR ULT,ID_NUM14CP R8,#BEG_COD+24JR UGE,ID_NUM14LDR6,@R8JR ID_NUM15ID_NUM14:LD R6,#0FFHID_NUM15:CP R9,#BEG_CODJR ULT,ID_NUM16CP R9,#BEG_COD+24JR UGE,ID_NUM16LDR7,@R9JR ID_NUM17ID_NUM16:LD R7,#0FFHID_NUM17:CP R7,#0FFHJR Z,ID_NUM18LD @R10,R7JR ID_NUM19ID_NUM18:LD @R10,R6ID_NUM19:DEC R8DEC R9INC R10DJNZ R4,ID_NUM20;; ???????? ???????? ? ?????LD R4,#BUF_NUMLD R5,@R4LD R6,#8ID_NUM22:CP @R4,#0BHJR NZ,ID_NUM21LD @R4,R5ID_NUM21:CP @R4,#0JR NZ,ID_NUM23LD @R4,#10ID_NUM23:LDR5,@R4INC R4DJNZ R6,ID_NUM22; ??????????? ????? ?? ???? ??????? ??????LD R4,#BUF_NUM+7LD R5,#BUF_NUM+6LD R8,@R4LD R7,#7ID_NUM24:LD R6,@R5LD @R4,R6DEC R4DEC R5DJNZ R7,ID_NUM24LD @R4,R8RCFRETID_NUM_ERR:OR BFLAG,#00000100B; ???? ?????????????RET;+-------------------------------------------------+;? ???????????? ????????????? T1 ?? 500 ?;+-------------------------------------------------+INIT_T1_500:LD PRE1,#11110011B; ?????????? ??????? 60LD TMR,#00001110B; ?????????? ????? ???????? T1 ? ?????????LD T1,#50; ???????????? ??????? ?????? 2 ??RET;+-------------------------------------------------+;? ???????????? ????????????? T1 ?? 44117 ?? ?;+-------------------------------------------------+INIT_T1_44117:LD PRE1,#01000111B; ?????????? ??????? 17LD TMR,#00001110B; ?????????? ????? ???????? T1 ? ?????????LD T1,#2; ???????????? ??????? ??????RET;+-------------------------------------------------+;? ???????????? ?????? ????? ?? ??? 'Panasoanic' ?;? ????: R6 - ????????? ???? ?;? ?;? ?????????? R4,R5 ?;+-------------------------------------------------+SEND_BYTE:SWAP R6LD R5,#4SB1: RL R6JPC,SB2; ???????? 1ANDP0,#11111011B; ???????? 0JR SB3SB2: OR P0,#00000100BSB3:LD R4,#15DJNZ R4,$AND P0,#11111101B; ??????????????LD R4,#15DJNZ R4,$OR P0,#00000010BLD R4,#15DJNZ R4,$OR P0,#00000100B; ?????????????LD R4,#15DJNZ R4,$DJNZ R5,SB1RET;+-------------------------------------------------------------------------+;? ???????????? ????? ?????????? ??? ?;+-------------------------------------------------------------------------+Fr1_1 = 20HFr1_2 = 21HFr2_1 = 22HFr2_2 = 23HFr3_1 = 24HFr3_2 = 25HFr4_1 = 26HFr4_2 = 27HFr5_1 = 28HFr5_2 = 29HFr6_1 = 2AHFr6_2 = 2BHAON_processor:LD PRE1,#00010111B; ?????. ???. =5LD TMR,#00001110BLD T1,#15; ?????. ???. =15; ??? ??????? 12 ??? ?????? ???????? 50 ???LD IMR,#10100000B; ?????????? T1 ?????????? T0; ???????????? 200 ????????; ?? ?????? ????? ????????? ? ??????? 25 ????LD R4,#Fr1_1LD R6,#0LD R7,#6LD R8,#8LD R14,#^hb(TABLE); @RR14 - ????????????????LD R15,#^lb(TABLE);LD R12,#^hb(NUM_TABLE); @RR12 - ????????????????; ???????????? ??????? ????? ????????AONp2: NOPHALT;7 ???????? ??????? ???????SCF;6TM P3,#00000010B;10JR NZ,AONp0;10CCF;6AONp0: RLC R6;6 ???????????? ????? ????????CP R7,#0;10JR Z,AONp1;10LD @R4,#0;10INC R4;6LD @R4,#0;10INC R4;6DEC R7;6AONp1:DJNZR8,AONp2;12 -> 103 T. 17.17 ???; ????? ? ????????? ????????? ?????? ????????LD R11,#25;10AONp5:LD R4,#Fr1_1;10 ????? ?????? ???????????????LD R7,#6;10 ??????? ??????????? ???LD R8,#8;10 ??????? ?????? ?????LD R9,R6;6 ????????? ?????????? ???? ????????LD R6,#0;10 ???? ????????AONp4: NOPHALT;7SCF;6TM P3,#00000010B;10JRNZ,AONp6;10CCF;6ONp6: RLCR6;6 ???????????? ????? ????????CP R7,#00;10JR Z,AONp3;10LDC R13,@RR14;12XOR R13,R9;6LDC R10,@RR12;12ADD R10,@R4;6LD @R4,R10;10INCW RR14;10INC R4;6LDC R13,@RR14;12XOR R13,R9;6LDC R10,@RR12;12ADD R10,@R4;6LD @R4,R10;10INCW RR14;10INC R4;6DEC R7;6AONp3:DJNZ R8,AONp4;12 ->207 ??????????? ????? ????? ?????; ????????DJNZ R11,AONp5;12 ->275 ??????????? ????? ?????? ????????; ?????????? ??????? ??????????????? ? ?????????? ?????LD R13,#01LD R14,#00LD R15,#00LD R4,#Fr1_1;10 ????? ?????? ???????????????LD R6,#6;10 ??????? ?????????? ???????????????LD R7,#00AONp11:SUB @R4,#101JR NC,AONp7COM @R4AONp7: LD R5,@R4INC R4SUB @R4,#101JR NC,AONp8COM @R4AONp8: ADD R5,@R4; ????????? ??????????? ??????????????INC R4; ??????????? ???? ???????????? ???????????????CP R8,R5JR NC,AONp9LD R7,R8LD R8,R5LD R14,R15LD R15,R13JR AONp10AONp9: CP R7,R5JR NC,AONp10LD R7,R5LD R14,R13AONp10: RL R13DJNZ R6,AONp11; ???????????????OR R14,R15LD R9,#12AONp13:LD R12,#^hb(TABLE_NUM_AON-1)LD R13,#^lb(TABLE_NUM_AON-1)ADD R13,R9ADC R12,#0LDC R10,@RR12CP R14,R10JR Z,AONp12DJNZ R9,AONp13AONp12: DEC R9DIRET;????? *****************************; R8 - ???????? ??????? ??????????????; R7 - ???????? ??????? ??????????????; R9 - ???????? ????? {0..Bh}, ???? R9=FFh ?? ????? ?? ??????????;***********************************;; ?????????????????? ???? ? ???????:; 1. ????????? ????????; 2. ??????? ??????; 3. ??????? ??????; 4. ????? ??????; 5. ?????? ??????; 6. 3-? ????? ??????? ???????; 7. 2-? ????? ??????? ???????; 8. 1-? ????? ??????? ???????; 9. ??????/????? ????????; 10. ????????? ????????;----------------------------; ???????????? ????? ???????;----------------------------Sample:IRETINT_T0:IRET;----------------------------TABLE_NUM_AON:;???.??????????.BYTE 18H; 0.BYTE 03H; 1.BYTE 05H; 2.BYTE 06H; 3.BYTE 09H; 4.BYTE 0AH; 5.BYTE 0CH; 6.BYTE 11H; 7.BYTE 12H; 8.BYTE 14H; 9.BYTE 24H; 0AH - ??? ??????/?????.BYTE 28H; 0BH - ??? ???????BIT_MAP:.BYTE 11111111B.BYTE 01111111B.BYTE 01111101B.BYTE 00101010B.BYTE 00001000B.BYTE 00000000B.BYTE 00000000B.BYTE 00000010B.BYTE 01110100B.BYTE 11110110B.BYTE 11111110B.ORG 05D4H;----------------------------; ??????????TABLE:.BYTE 0FFH,0FFH,0FFH,0FCH,0FFH,0F8H,0FFH,0F0H,0FEH,0F0H,0FCH,0E0H.BYTE 0FEH,000H,0F0H,000H,0C0H,003H,000H,00FH,003H,01FH,00FH,07EH.BYTE 000H,003H,001H,07FH,01FH,0FEH,0FFH,0F0H,0F8H,080H,0C0H,007H.BYTE 007H,0FFH,0FFH,0F0H,0F0H,000H,001H,01FH,01FH,0FEH,0FCH,0E0H.BYTE 0FFH,0F0H,0C0H,001H,007H,0FFH,0FEH,0E0H,0C0H,007H,00FH,07EH.BYTE 0E0H,000H,007H,0FFH,0FCH,080H,001H,01FH,07EH,0F0H,0C0H,007H.BYTE 000H,01FH,0FFH,0E0H,001H,01FH,0FCH,0E0H,003H,01FH,0F8H,0E0H.BYTE 03FH,0FFH,000H,003H,0FFH,0F0H,003H,03FH,0F8H,080H,01FH,0FCH.BYTE 0FFH,080H,01FH,0FFH,000H,007H,0FCH,0C0H,01FH,0FEH,081H,00FH.BYTE 000H,001H,0FCH,080H,07FH,0FCH,007H,03FH,0C0H,007H,0F8H,0C0H.BYTE 003H,0FFH,000H,00FH,0C0H,001H,0F8H,080H,07EH,0F0H,01FH,0FCH.BYTE 0FFH,0F8H,07FH,0FEH,01FH,0FFH,007H,07FH,003H,01FH,081H,00FH.BYTE 0F8H,000H,0F8H,000H,0F8H,000H,0F8H,080H,0F8H,080H,0F8H,0C1H.BYTE 000H,00FH,000H,03FH,003H,07FH,00FH,0FFH,01FH,0FEH,03FH,0F8H.BYTE 01FH,0FFH,0FFH,0F8H,0FEH,0C0H,0F0H,000H,0C0H,007H,003H,01FH.BYTE 0FFH,0C0H,0E0H,000H,000H,01FH,00FH,0FEH,07EH,0F0H,0F0H,081H.BYTE 080H,000H,003H,0FFH,0FFH,0F0H,0E0H,001H,003H,01FH,03FH,0F8H.BYTE 001H,0FFH,0FFH,0E0H,080H,007H,01FH,0FEH,0F8H,080H,003H,01FH.BYTE 0FFH,0FEH,080H,001H,03FH,0FEH,0E0H,001H,01FH,0FEH,0F0H,081H.BYTE 0FCH,000H,00FH,0FFH,0E0H,000H,03FH,0FCH,0C0H,007H,03EH,0F0H.BYTE 000H,007H,0FEH,0C0H,00FH,0FFH,0C0H,003H,07EH,0F0H,007H,03FH.BYTE 00FH,0FFH,000H,007H,0F8H,080H,03FH,0FCH,003H,01FH,0E0H,003H.BYTE 0FFH,0E0H,03FH,0FFH,003H,03FH,0C0H,007H,0F8H,080H,07EH,0F0H.BYTE 0C0H,000H,0F8H,000H,0FFH,0E0H,07FH,0F8H,01FH,0FEH,007H,03FH.BYTE 000H,07FH,000H,01FH,000H,00FH,080H,007H,0C0H,007H,0E0H,003H.ORG 700H;; ??????? ???????????? ????? ? ??????????; ?????? ? ???NUM_TABLE:.BYTE 00H,01H,01H,02H,01H,02H,02H,03H,01H,02H,02H,03H,02H,03H,03H,04H.BYTE 01H,02H,02H,03H,02H,03H,03H,04H,02H,03H,03H,04H,03H,04H,04H,05H.BYTE 01H,02H,02H,03H,02H,03H,03H,04H,02H,03H,03H,04H,03H,04H,04H,05H.BYTE 02H,03H,03H,04H,03H,04H,04H,05H,03H,04H,04H,05H,04H,05H,05H,06H.BYTE 01H,02H,02H,03H,02H,03H,03H,04H,02H,03H,03H,04H,03H,04H,04H,05H.BYTE 02H,03H,03H,04H,03H,04H,04H,05H,03H,04H,04H,05H,04H,05H,05H,06H.BYTE 02H,03H,03H,04H,03H,04H,04H,05H,03H,04H,04H,05H,04H,05H,05H,06H.BYTE 03H,04H,04H,05H,04H,05H,05H,06H,04H,05H,05H,06H,05H,06H,06H,07H.BYTE 01H,02H,02H,03H,02H,03H,03H,04H,02H,03H,03H,04H,03H,04H,04H,05H.BYTE 02H,03H,03H,04H,03H,04H,04H,05H,03H,04H,04H,05H,04H,05H,05H,06H.BYTE 02H,03H,03H,04H,03H,04H,04H,05H,03H,04H,04H,05H,04H,05H,05H,06H.BYTE 03H,04H,04H,05H,04H,05H,05H,06H,04H,05H,05H,06H,05H,06H,06H,07H.BYTE 02H,03H,03H,04H,03H,04H,04H,05H,03H,04H,04H,05H,04H,05H,05H,06H.BYTE 03H,04H,04H,05H,04H,05H,05H,06H,04H,05H,05H,06H,05H,06H,06H,07H.BYTE 03H,04H,04H,05H,04H,05H,05H,06H,04H,05H,05H,06H,05H,06H,06H,07H.BYTE 04H,05H,05H,06H,05H,06H,06H,07H,05H,06H,06H,07H,06H,07H,07H,08H.END

Приложение Б

Схема принципиальная электрическая АОН

К-во Просмотров: 267
Бесплатно скачать Курсовая работа: Разработка микропроцессорной системы АОНа на базе микроконтроллера