Вивчення принципу роботи аналого-цифрового перетворювача на прикладі мікроконтролера PIC16C71, страница 4

0034 0093           00079         movwf an2

0035 0B93           00080 n3      decfsz an2

0036 2838           00081         goto n1

0037 283D           00082         goto n2

0038 1206           00083 n1      bcf PORTB,4             ;сброс RB4

0039 203E           00084         call t_32mc             ;задежка 32 мсек

003A 1606           00085         bsf PORTB,4             ;установка RB4

003B 203E           00086         call t_32mc             ;задежка 32

003C 2835           00087         goto n3

003D 0008           00088 n2      return

                    00089

MPASM 02.20 Released             LAB6.ASM   5-25-2004  19:46:50         PAGE  3

LOC  OBJECT CODE     LINE SOURCE TEXT

  VALUE

003E                00090 t_32mc                  ;подпрграмма формирующая задержку 32 мсек

003E 302D           00091         movlw .45

003F 0092           00092         movwf an1

0040 0B92           00093 k2      decfsz an1

0041 2843           00094         goto m4

0042 2848           00095         goto m5

0043 30F1           00096 m4      movlw .241

0044 008E           00097         movwf del

0045 0B8E           00098 m3      decfsz del       

0046 2845           00099         goto m3            ;переход если нет переполнения

0047 2840           00100         goto k2

0048 0008           00101 m5      return

                    00102        

                    00103         END                     ;конец программы

MPASM 02.20 Released             LAB6.ASM   5-25-2004  19:46:50         PAGE  4

SYMBOL TABLE

  LABEL                             VALUE

ADCON0                            00000008

ADCON1                            00000088

ADCS0                             00000006

ADCS1                             00000007

ADIE                              00000006

ADIF                              00000001

ADON                              00000000

ADRES                             00000009

C                                 00000000

CHS0                              00000003

CHS1                              00000004

Convert                           0000001A

DC                                00000001

Delay30us                         00000020

F                                 00000001

FSR                               00000004

GIE                               00000007

GO                                00000002

GO_DONE                           00000002

INDF                              00000000

INTCON                            0000000B

INTE                              00000004

INTEDG                            00000006

INTF                              00000001

IRP                               00000007

NOT_DONE                          00000002

NOT_TO                            00000004

OPTION_REG                        00000081

PCFG0                             00000000

PCFG1                             00000001

PCL                               00000002

PCLATH                            0000000A

PORTA                             00000005

PORTB                             00000006

PS0                               00000000

PS1                               00000001

PS2                               00000002

PSA                               00000003

RBIE                              00000003

RBIF                              00000000

RP0                               00000005

RP1                               00000006

STATUS                            00000003

T0CS                              00000005

T0IE                              00000005

T0IF                              00000002

T0SE                              00000004

TMR0                              00000001

TRISA                             00000085

TRISB                             00000086

T_U1                              0000000D

MPASM 02.20 Released             LAB6.ASM   5-25-2004  19:46:50         PAGE  5

SYMBOL TABLE

  LABEL                             VALUE

T_U2                              0000000F

W                                 00000000