.1 Текст программы
#DEFINE CONFIG_REQ 1
LIST P = 16F676, F = INHX8M, W = 2, X = ON, R = DEC, MM = ON, N = 0, C = 255EQU 0X0000EQU 0X0001EQU 0X0002EQU 0X0003EQU 0X0004EQU 0X0005EQU 0X0006EQU 0X0007EQU 0X000AEQU 0X000BEQU 0X000CL EQU 0X000ELH EQU 0X000FH EQU 0X000FCON EQU 0X0010EQU 0X0019EQU 0X001EEQU 0X001EEQU 0X001F_REG EQU 0X0081EQU 0X0085EQU 0X0086EQU 0X0087EQU 0X008CEQU 0X008EEQU 0X0090EQU 0X0091EQU 0X0095EQU 0X0095EQU 0X0096EQU 0X0096EQU 0X0099EQU 0X009AEQU 0X009AEQU 0X009AEQU 0X009BEQU 0X009CEQU 0X009DEQU 0X009EEQU 0X009F=7=6=5_TO=4_PD=3=2=1=0=7=6IE=5=4=3IF=2=1=0=7=6=3IF=0IF=0GE=6CKPS1=5CKPS0=4OSCEN=3_T1SYNC=2CS=1ON=0=6=4=3=2=1=0=7=6=4=3=2=1_DONE=1_DONE=1_GO_DONE=1=0_GPPU=7_RAPU=7=6CS=5SE=4=3=2=1=0=7=6=3IE=0IE=0_POR=1_BOD=0=7=6=5=4=3=2=7=6=5=4=3=2=1=0=7=5=3=2=1=0=3=2_WREN=2=1_WR=1=0_RD=0=6=5=4
MAXRAM 0XFF
BADRAM 0X06, 0X08-0X09, 0X0D, 0X11-0X18, 0X1A-0X1D, 0X60-0X7F
BADRAM 0X86, 0X88-0X89, 0X8D, 0X8F, 0X92-0X94, 0X97-0X98, 0XE0-0XFFEQU 0X3EFF_OFF EQU 0X3FFFEQU 0X3F7F_OFF EQU 0X3FFFEQU 0X3FFF_OFF EQU 0X3FBF_ON EQU 0X3FFF_OFF EQU 0X3FDF_OFF EQU 0X3FFF_ON EQU 0X3FEF_ON EQU 0X3FFF_OFF EQU 0X3FF7_OSC EQU 0X3FF8_OSC EQU 0X3FF9_OSC EQU 0X3FFA_OSC EQU 0X3FFB_OSC_NOCLKOUT EQU 0X3FFC_OSC_CLKOUT EQU 0X3FFD_OSC_NOCLKOUT EQU 0X3FFE_OSC_CLKOUT EQU 0X3FFF
#DEFINE 16F676 1
#DEFINE XTAL 4
#DEFINE _CORE 14
#DEFINE _MAXRAM 64
#DEFINE _RAM_END 64
#DEFINE _MAXMEM 1024
#DEFINE _ADC 8
#DEFINE _ADC_RES 10
#DEFINE _EEPROM 128
#DEFINE _PAGES 1
#DEFINE _BANKS 2
#DEFINE RAM_BANKS 1
#DEFINE _USART 0
#DEFINE _USB 0
#DEFINE _FLASH 0
#DEFINE _CWRITE_BLOCK 0
#DEFINE BANK0_START 32
#DEFINE BANK0_END 95
#DEFINE _SYSTEM_VARIABLE_COUNT 14_BANK = 0@PAGE = 0@PAGE = 0
#DEFINE LCD#TYPE 0@CALL MACRO DEST(DEST < 1)(DEST > $)DEST@JUMP MACRO DEST(DEST < 1)(DEST > $)DEST@PAGE MACRO DEST@B MACRO VARIN((VARIN & 384) == 0)(RAM_BANK == 1)3,5(RAM_BANK == 2)3,6(RAM_BANK == 3)3,53,6_BANK = 0((VARIN & 384) == 128)(RAM_BANK == 0)3,5(RAM_BANK == 2)3,53,6(RAM_BANK == 3)3,6_BANK = 1((VARIN & 384) == 256)(RAM_BANK == 0)3,6(RAM_BANK == 1)3,53,6(RAM_BANK == 3)3,5_BANK = 2@B MACRO((RAM_BANK & 1) != 0)3,5((RAM_BANK & 2) != 0)3,6_BANK = 0MACRO PLABELPLABEL_BYTE MACRO PBYTEOUT@B PBYTEOUTPBYTEOUT@B_BIT MACRO PVAROUT,PBITOUT@B PVAROUT1STATUS,2PVAROUT,PBITOUTSTATUS,2PVAROUT,PBITOUT@B_WORD MACRO PWORDOUT@B PWORDOUTPWORDOUT@B PWORDOUT+1PWORDOUT+1@B_DWORD MACRO PDWORDOUT@B PDWORDOUT+3PDWORDOUT+3@B PDWORDOUT+2PDWORDOUT+2@B PDWORDOUT+1PDWORDOUT+1@B PDWORDOUTPDWORDOUT@B_WREG MACRO PBYTEIN@B PBYTEINPBYTEIN,W@B_WREG MACRO PNUMIN(PNUMIN & 255)_BYTE MACRO PNUMIN,PBYTEOUT@B PBYTEOUT(PNUMIN == 0)PBYTEOUT(PNUMIN & 255)PBYTEOUT@B_BIT MACRO PNUMIN,PVAROUT,PBITOUT@B PVAROUT((PNUMIN & 1) == 1)PVAROUT,PBITOUTPVAROUT,PBITOUT@B_WORD MACRO PNUMIN,PWORDOUT((PNUMIN & 255) == 0)@B PWORDOUTPWORDOUT@B PWORDOUTLOW (PNUMIN)PWORDOUT(((PNUMIN >> 8) & 255) == 0)@B PWORDOUT+1PWORDOUT+1@B PWORDOUT+1HIGH (PNUMIN)PWORDOUT+1@B_DWORD MACRO PNUMIN,PDWORDOUT((PNUMIN >> 24 & 255) == 0)@B PDWORDOUT+3PDWORDOUT+3@B PDWORDOUT+3((PNUMIN >> 24) & 255)PDWORDOUT+3( ((PNUMIN >> 16) & 255) == 0)@B PDWORDOUT+2PDWORDOUT+2@B PDWORDOUT+2((PNUMIN >> 16) & 255)PDWORDOUT+2( ((PNUMIN >> 8) & 255) == 0)@B PDWORDOUT+1PDWORDOUT+1@B PDWORDOUT+1HIGH (PNUMIN)PDWORDOUT+1((PNUMIN & 255) == 0)@B PDWORDOUTPDWORDOUT@B PDWORDOUTLOW (PNUMIN)PDWORDOUT@B_WREG MACRO PVARIN,PBITIN@B PVARINPVARIN,PBITIN1@B_BYTE MACRO PVARIN,PBITIN,PBYTEOUT@B PVARINPVARIN,PBITIN1@B PBYTEOUTPBYTEOUT@B_BIT MACRO PVARIN,PBITIN,PVAROUT,PBITOUT((PVARIN & 65408) == (PVAROUT & 65408))@B PVAROUTPVARIN,PBITINPVAROUT,PBITOUTPVARIN,PBITINPVAROUT,PBITOUT@B PVARINPVARIN,PBITIN@B PVAROUTPVAROUT,PBITOUTPVAROUT,PBITOUT_WORD MACRO PVARIN,PBITIN,PWORDOUT@B PWORDOUT+1PWORDOUT+1_BYTE PVARIN,PBITIN,PWORDOUT_DWORD MACRO PVARIN,PBITIN,PDWORDOUT@B PDWORDOUT+3PDWORDOUT+3@B PDWORDOUT+2PDWORDOUT+2@B PDWORDOUT+1PDWORDOUT+1_BYTE PVARIN,PBITIN,PDWORDOUT_WREG MACRO PWORDIN_WREG PWORDIN_BYTE MACRO PWORDIN,PBYTEOUT_BYTE PWORDIN,PBYTEOUT_BIT MACRO PWORDIN,PVAROUT,PBITOUT_BIT PWORDIN, PVAROUT, PBITOUT_WORD MACRO PWORDIN,PWORDOUT@B PWORDIN+1PWORDIN+1,W@B PWORDOUT+1PWORDOUT+1_BYTE PWORDIN,PWORDOUT_DWORD MACRO PWORDIN,PDWORDOUT@B PDWORDOUT+3PDWORDOUT+3@B PDWORDOUT+2PDWORDOUT+2_BYTE PWORDIN+1,PDWORDOUT+1_BYTE PWORDIN,PDWORDOUT_BYTE MACRO PBYTEIN,PBYTEOUT@B PBYTEINPBYTEIN,W@B PBYTEOUTPBYTEOUT@B_WORD MACRO PBYTEIN,PWORDOUT@B PWORDOUT+1PWORDOUT+1_BYTE PBYTEIN,PWORDOUT_DWORD MACRO PBYTEIN,PDWORDOUT@B PDWORDOUT+3PDWORDOUT+3@B PDWORDOUT+2PDWORDOUT+2@B PDWORDOUT+1PDWORDOUT+1_BYTE PBYTEIN,PDWORDOUT_BIT MACRO PBYTEIN,PVAROUT,PBITOUT((PBYTEIN & 65408) == (PVAROUT & 65408))@B PBYTEINPBYTEIN,0PVAROUT,PBITOUTPBYTEIN,0PVAROUT,PBITOUT@B PBYTEINPBYTEIN,W@B PVAROUTPVAROUT,PBITOUTPVAROUT,PBITOUT@B_WREG MACRO PDWORDIN_WREG PDWORDIN_BYTE MACRO PDWORDIN,PBYTEOUT_BYTE PDWORDIN,PBYTEOUT_WORD MACRO PDWORDIN,PWORDOUT@B PDWORDIN+1PDWORDIN+1,W@B PWORDOUT+1PWORDOUT+1_BYTE PDWORDIN,PWORDOUT_DWORD MACRO PDWORDIN,PDWORDOUT_BYTE PDWORDIN+3,PDWORDOUT+3_BYTE PDWORDIN+2,PDWORDOUT+2_BYTE PDWORDIN+1,PDWORDOUT+1_BYTE PDWORDIN,PDWORDOUT_BIT MACRO PDWORDIN,PVAROUT,PBITOUT_BIT PDWORDIN,PVAROUT,PBITOUTCURRENT@PAGE = 0PDESTINATION@PAGE = 0@PAGE MACRO PLABELINCURRENT_ADDR = $DEST_ADDR = PLABELIN((CURRENT_ADDR >= 0X1800) && (CURRENT_ADDR <= 0X2000))@PAGE = 3((CURRENT_ADDR >= 0X1000) && (CURRENT_ADDR <= 0X1800))@PAGE = 2((CURRENT_ADDR >= 0X0800) && (CURRENT_ADDR <= 0X1000))@PAGE = 1((CURRENT_ADDR >= 0) && (CURRENT_ADDR <= 0X0800))@PAGE = 0((DEST_ADDR >= 0X1800) && (DEST_ADDR <= 0X2000))@PAGE = 3((DEST_ADDR >= 0X1000) && (DEST_ADDR <= 0X1800))@PAGE = 2((DEST_ADDR >= 0X0800) && (DEST_ADDR <= 0X1000))@PAGE = 1((DEST_ADDR >= 0) && (DEST_ADDR <= 0X0800))@PAGE = 0_FSR MACRO PNUMIN_BYTE PNUMIN, FSR(((PNUMIN >> 8) & 255) == 1)STATUS,7STATUS,7_WORD MACRO PLABELIN,PWORDOUTLOW (PLABELIN)@B PWORDOUTPWORDOUTHIGH (PLABELIN)@B PWORDOUTPWORDOUT+1@BH = 32= 33H = 34= 35#VAR0 = 36= 37H = 38= 39H = 40= 41H = 42= 43H = 44#P9 = 45= 46KEYPASS#0=46,KEYPASS#1=47,KEYPASS#2=48= 49MKEY#0=49,MKEY#1=50,MKEY#2=51
Самое читаемое:
Контроллер опорно-поворотного устройства антенны
Микроконтроллеры уверенно и, по-видимому, навсегда
завоевали место в нашей жизни. Найти хоть одно электронное изделие, не имеющее
микроконтроллеров, практически невозможно. Разнообразные элементы схем в
видеомагнитофонах, DVD -
плеерах, телевизорах и микроволновых печах, автоматических дверях, системах
управления лифтами, промышлен ...