Analog to Digital Converter (ADC)

OBJECTIVE:

  1. Students understand the microcontroller interface circuit with ADC 0804
  2. Students understand the setting of the ADC0804 Vref reference voltage
  3. Students understand the calculation of the ADC0804 resolution voltage
  4. Students can understand assembly programs to display ADC data to 7 segments.
  5. Students can understand assembly programs to display ADC data to a 2x16 Character LCD.


Figure 5.1 ADC0804 Network

Theoretical basis

A/D converters are commercially available as integrated circuits with resolutions ranging from 8 bits to 16 bits. This experiment will introduce the ADC0801, an 8-bit A/D converter that is easy to interface with a microcontroller system. This A/D uses a successive approximation method to convert analog input (0-5V) to equivalent 8-bit digital data. The ADC0801 has an internal clock generator and requires a +5V power supply and has an optimum conversion time of around 100us.

The pin configuration diagram of the ADC0804 is shown in Figure 5.2. Pins 11 to 18 (digital outputs) are three-state outputs, which can be connected directly to the data bus whenever needed. When CS (pin 1) or RD (pin 2) is high ("1"), pins 11 to 18 will float (high impedance), when CS and RD are both low, a digital output will appear on the output channel.

The conversion start signal is at WR (pin 3). To start a conversion, CS must be low. When WR goes low, the converter resets, and when WR returns to high, the conversion begins immediately.

The converter clock conversion must be in the frequency range of 100 to 800kHz. CLK IN (pin 4) can be derived from the microcontroller clock, alternatively, we can use the internal clock generator by installing an RC circuit between CLN IN (pin 4) and CLK R (pin 19).

Pin 5 is the channel used for INTR, the conversion completion signal. INTR will be high when starting a conversion, and will be active low when the conversion is complete. The falling edge of the INTR signal can be used to interrupt the microcontroller system, so that the microcontroller branches to the service subroutine that processes the converter output.

Pins 6 and 7 are differential inputs for analog signals. This A/D has two grounds, A GND (pin 8) and D GND (pin 10). Both of these pins must be connected to ground. Pin 20 must be connected to a +5V power supply. This A/D has two grounds, A GND (pin 8) and D GND (pin 10). Both must be connected to a power supply, of +5V.

In A/D 0804 is a reference voltage used for the offset of a maximum digital output. With the following equation:

For example, if you want a maximum analog input of 4 V, then:

Vref=0.5 x 4 = 2 volt

This resolution has the following meaning:

| Vin (volt) | Data Digital (biner) | Data Digital (desimal) |
|------------|----------------------|------------------------|
| 0,000      | 0000 0000            |                        |
| 0,0156     | 0000 0001            |                        |
| 0,0313     | 0000 0010            |                        |
|            |                      |                        |
| 4          | 1111 1111            | 255                    |

This A/D can be arranged to produce continuous conversion. To do this, we must connect CS, and RD to ground and connect WR with INTR as shown in the picture below. Then with this continuous digital output will appear, because the INTR signal drives the WR input. At the end of the conversion INTR changes to low, so this condition will reset the converter and start the conversion.

Table 5.1 ADC Interface Connection to Microcontroller

| ADC       | Port Mikrokontroller |
|-----------|----------------------|
| /INTR     | P3.2                 |
| /WR       | P3.3                 |
| /RD       | P3.4                 |
| D0 s/d D7 | P1.0 s/d P1.7        |

Table 5.2. Logic instructions on A/D control pin 0804

| INPUT |     |       | OUTPUT    | KEGIATAN                |
|-------|-----|-------|-----------|-------------------------|
| /WR   | /RD | /INTR | DO S/D D7 | Hi-Z ( High Impedansi ) |
| 1     | 1   | 1     | -         | -                       |
| 0     | 1   | 1     | Hi-Z      | Reset                   |
| 1     | 1   | 1     | Hi-Z      | -                       |
| 1     | 1   | 0     | Hi-Z      | Konversi Selesai        |
| 1     | 0   | 1     | Data Out  | Data Ready              |

Experiment 5.1. ADC0804 and 7 Segment Display

In this experiment, ADC data in decimal will be displayed on 8 x 7 segments on Display 1, Display 2, and Display 3 which each display data for hundreds, tens and units.


Figure 5.3. 7 segment display circuit interface (a)


Figure 5.3. 7 segment display circuit interface (b)

Table 5.1. 74LS138 truth

| INPUT SELECTOR |   |   | ENABLE |      |      | OUTPUT |    |    |    |    |    |    |    |
|----------------|---|---|--------|------|------|--------|----|----|----|----|----|----|----|
| C              | B | A | G1     | /G2A | /G2B | Y1     | Y2 | Y2 | Y3 | Y4 | Y5 | Y6 | Y7 |
| 0              | 0 | 0 | 1      | 0    | 0    | 0      | 1  | 1  | 1  | 1  | 1  | 1  | 1  |
| 0              | 0 | 1 | 1      | 0    | 0    | 1      | 0  | 1  | 1  | 1  | 1  | 1  | 1  |
| 0              | 1 | 0 | 1      | 0    | 0    | 1      | 1  | 0  | 1  | 1  | 1  | 1  | 1  |
| 0              | 1 | 1 | 1      | 0    | 0    | 1      | 1  | 1  | 0  | 1  | 1  | 1  | 1  |
| 1              | 0 | 0 | 1      | 0    | 0    | 1      | 1  | 1  | 1  | 0  | 1  | 1  | 1  |
| 1              | 0 | 1 | 1      | 0    | 0    | 1      | 1  | 1  | 1  | 1  | 0  | 1  | 1  |
| 1              | 1 | 0 | 1      | 0    | 0    | 1      | 1  | 1  | 1  | 1  | 1  | 0  | 1  |
| 1              | 1 | 1 | 1      | 0    | 0    | 1      | 1  | 1  | 1  | 1  | 1  | 1  | 0  |

In the truth table, it appears that the seven segments that are on depend on the output of the 74LS138 decoder, which is outputting a low logic "0", so that out of the 8 displays, only one display will always be turned on. In order for the displays to appear on simultaneously, the three displays must be turned on alternately with a certain delay time.

To do this experiment, do the following steps:

  1. During the programming step, position the toggle switch to the PROG position.
  2. Position the toggle switch to RUN to enable the ADC0804 CS=0
  3. Connect the Microcontroller Trainer module to the +5V power supply.
  4. Connect the Microcontroller Trainer module to the programmer circuit 
  5. Open the M-IDE Studio for MCS-51 program, as a program editor and compiler.
  6. Type the following program:
    org 0h
               ratusan equ 30h
               puluhan equ 31h
               satuan equ 32h
               ;
               org 0h
    start: call ADC
               call Bin2Dec
               call Display2SevenSegmen
               sjmp start
               ;
    ;=================================================
    ;Subrutin ini digunakan untuk mengambil data ADC
    ;=================================================
    ADC: clr P3.3
               nop
               nop
               nop
               setb P3.3
               eoc: jb P3.2,eoc
               clr P3.4
               mov A,P1
               setb P3.4
               ret
               ;
    ;=================================================
    ;Subrutin ini untuk menampilkan data ke 7 Segmen
    ;dalam bentuk: ratusan, puluhan, and satuan
    ;data desimal diubah ke segmen dengan menggunakan
    ;Look up table Data7segmen
    ;=================================================
    Display2SevenSegmen:
               mov A, ratusan
               mov DPTR,#Data7segmen
               movc A,@A+DPTR
               mov P0,A
               Setb P3.5 ;
               clr P3.6
               Setb P3.7
               call delay
               ;
               mov A,puluhan
               mov DPTR,#Data7segmen
               movc A,@A+DPTR
               mov P0,A
               clr P3.5 ;
               Setb P3.6
               Setb P3.7
               call delay
               ;
               mov A,satuan
               mov DPTR,#Data7segmen
               movc A,@A+DPTR
               mov P0,A
               Setb P3.5 ;
               Setb P3.6
               Setb P3.7
               call delay
               ret
               ;
               delay: mov R0,#0
               delay1:mov R2,#0fh
               djnz R2,$
               djnz R0,delay1
               ret
               ;
    ;==================================================
    ;Subrutin ini untuk merubah data biner ke desimal
    ;menjadi 3 digit = ratusan-puluhan-satuan
    ;==================================================
    Bin2Dec:
               mov b,#100d
               div ab
               mov ratusan,a
               mov a,b
               mov b,#10d
               div ab
               mov puluhan,a
               mov satuan,b
               ret
               ;
    Data7segmen:
               db 11000000b,11111001b,10100100b,10110000b,10011001b
               db 10010010b,10000010b,11111000b,10000000b,10010000b
               ;
               end
  7. Save the program you typed and name it: prog51a.asm
  8. In the MIDE program, select Build /F9 or to compile the program from *.asm to *.hex.
  9. Program the microcontroller using the ISP Software Program (See Instructions for Use)
  10. Make modifications to the program by adding the word TEMPERATURE to Display1, 2, 3 and 4 followed by the ADC data.

Experiment 5.2. ADC0804 and Display to 2x16 Character LCD

In this experiment, the ADC data in decimal will be displayed on the 2x16 Character LCD in Row 1, Column 1, 2 and 3, which respectively display hundreds, tens and units data.


LCD Character 2x16

To do this experiment, do the following steps:

  1. During the programming step, position the toggle switch to the PROG position.
  2. Position the toggle switch to RUN to enable the ADC0804 CS=0
  3. Connect the Microcontroller Trainer module to the +5V power supply.
  4. Connect the Microcontroller Trainer module to the programmer circuit 
  5. Open the M-IDE Studio for MCS-51 program, as a program editor and compiler.
  6. Type the following program:
ratusan equ 30h
           puluhan equ 31h
           satuan equ 32h
           ;
           org 0h
           call init_LCD
           call write_char
           start: call ADC
           call Bin2Dec
           call Write2LCD
           sjmp start
           ;
;=================================================
;Subrutin ini digunakan untuk mengambil data ADC
;=================================================
ADC: clr P3.3
           nop
           nop
           nop
           setb P3.3
           eoc: jb P3.2,eoc
           clr P3.4
           mov A,P1
           cpl A
           mov P0,A
           setb P3.4
           ret
           ;
;============================================
;Subrutin untuk menampilkan data ke LCD character 2 x16
;pada DDRAM 0C9 0CA 0CB untukratusan, puluhan, and satuan
 ;============================================
Write2LCD:
           mov r1,#0c9h
           call write_inst
           mov a,ratusan
           add a,#30h
           mov r1,a
           call write_data
           ;
           mov r1,#0cah
           call write_inst
           mov a,puluhan
           add a,#30h
           mov r1,a
           call write_data
           ;
           mov r1,#0cbh
           call write_inst
           mov a,satuan
           add a,#30h
           mov r1,a
           call write_data
           ret
           ;
;==================================
;Subrutin ini untuk merubah data biner ke desimal
;menjadi 3 digit = ratusan-puluhan-satuan
;==================================
Bin2Dec:
           mov b,#100d
           div ab
           mov ratusan,a
           mov a,b
           mov b,#10d
           div ab
           mov puluhan,a
           mov satuan,b
           ret
           ;
;===================================
;Subrutin untuk menampilkan tulisan Data ADC0804
; pada baris 1
;===================================
write_char:
           mov dptr,#word1 ;DPTR = [ address word1 ]
           mov r3,#16 ;R3=16,number character to be display
           mov r1,#80h ;R1=80h,address DDRAM start position
           acall write_inst
           ;
write1:clr a ; A = 0
           movc a,@a+dptr ; A = [A+ DPTR]
           mov r1,A ; R1 = A
           inc dptr ; DPTR = DPTR +1
           acall write_data ;
           djnz r3,write1 ; R3 = R3-1,
           ret
           ;
Init_lcd:
           mov r1,#00000001b ;Display clear
           call write_inst
           mov r1,#00111000b ;Function set,Data 8 bit,2 line font 5x7
           call write_inst
           mov r1,#00001100b ;Display on, cursor off,cursor blink off
           call write_inst
           mov r1,#00000110b ;Entry mode, Set increment
           call write_inst
           ret
           ;
write_inst:
           clr P3.6 ; RS = P2.0 = 0, write mode instruction
           mov P0,R1 ; D7 s/d D0 = P0 = R1
           setb P3.7 ; EN = 1 = P2.1
           call delay ; call delay time
           clr P3.7 ; EN = 0 = P2.1
           ret
           ;
Write_data:
           setb P3.6 ; RS = P2.0 = 1, write mode data
           mov P0,R1 ; D7 s/d D0 = P0 = R1
           setb P3.7 ; EN = 1 = P2.1
           call delay ; call delay time
           clr p3.7 ; EN = 0 = P2.1
           ret
           ;
delay: mov R0,#0
delay1:mov R2,#0fh
           djnz R2,$
           djnz R0,delay1
           ret
           ;
word1: DB ' Data ADC0804 '
           end
  1. Save the program you typed and name it: prog52a.asm
  2. In the MIDE program, select Build /F9 or to compile the program from *.asm to *.hex.
  3. Program the microcontroller using the ISP Software Program (See Instructions for Use)
  4. Modify the program by adding the word TEMPERATURE: , in Line 2 followed by the ADC data.

Experiment 5.3. Application of a comparator program by utilizing arithmetic instructions and jump instructions for temperature control with a Character LCD display.

In the world of electronics, a comparator circuit is generally realized by utilizing an op-amp circuit built as a comparator. In accordance with the working principle of the comparator, comparing two voltages that enter the INV and NON INV inputs, to produce a saturation voltage output. By utilizing the SUBB arithmetic instruction and the JZ and JC jump instructions, this analog circuit can be replaced using assembly programming.

If the voltage entering VREF is greater than the voltage entering VIN then VOUT will output a voltage of  0  volts. Conversely, if the voltage entering VREF is smaller than VIN then VOUT will output a voltage of VSAT.

ControlSuhu:
    mov a,dataSetting ; contoh dataSetting=50
    mov b,dataADC ; contoh dataADC=30
    clr c
    subb a,b
    jnz OnHeater
    ret
OnHeater:
    jc OffHeater
    call HeaterOn ;Instruksi hidupkan heater
    ret
OffHeater:
    Call HeaterOff ;Instruksi matikan heater
    ret
;

In this instruction, the difference between dataSetting and dataADC is taken using the SUBB instruction, this subtraction will produce three states, namely: ZERO, NEGATIVE or POSITIVE. These results must be detected, the NEGATIVE state can be detected by monitoring the C bit (carry), the ZERO state can be detected by monitoring the A register (accumulator).

When given input conditions according to the example then:

A=dataSetting=50
B=dataADC=30
SUBB A,B
A=50-30 =20 (keadaan POSITIF)

According to the instructions above, the program will go to Ret OnHeater, in this line the condition testing process is carried out, with the JC instruction, because the condition is POSITIVE then C = 0 (clear) so the program will call HeaterOn

When given input conditions according to the example then:

A=dataSetting=50
B=dataADC=50
SUBB A,B
A=50-50 =00 (keadaan NOL)

According to the instructions above, the program will go to Ret.

When given input conditions according to the example then:

A=dataSetting=50
B=dataADC=51
SUBB A,B
A=50-51 =-1 (keadaan NEGATIF)

According to the instructions above, the program will go to OnHeater, in this line the condition testing process is carried out, with the JC instruction, because the condition is NEGATIVE then C = 1 (clear) so the program will call the OffHeater label.

In experiment 5.3. this heater On and Off indicator is shown on the Character LCD screen on line 1. As shown in the following programming:

  1. During the programming step, position the toggle switch to the PROG position.
  2. Position the toggle switch to RUN to enable the ADC0804 CS=0
  3. Connect the Microcontroller Trainer module to the +5V power supply.
  4. Connect the Microcontroller Trainer module to the programmer circuit 
  5. Open the M-IDE Studio for MCS-51 program, as a program editor and compiler.
dataSetting equ 30h
dataADC equ 31h
ratusan equ 32h
puluhan equ 33h
satuan equ 34h
      org 0h
      mov dataSetting,#50d; contoh datasetting=50
      call init_lcd
start:call ADC
      call ControlSuhu
      call bin2dec
      call Display2LCD
      sjmp start
           ;
ControlSuhu:
      mov a,dataSetting ; contoh dataSetting=50
      mov b,dataADC ; contoh dataADC=30
      clr c
      subb a,b
      jnz OnHeater
      ret
OnHeater:
      jc OffHeater
      call HeaterOn ;Instruksi hidupkan heater
      ret
OffHeater:
      Call HeaterOff ;Instruksi matikan heater
      ret
           ;
HeaterOn:
      mov R1,#80h
      call write_inst
      mov R1,#'O'
      call write_data
           ;
      mov R1,#81h
      call write_inst
      mov R1,#'n'
      call write_data
           ;
      mov R1,#82h
      call write_inst
      mov R1,#' '
      call write_data
      ret
HeaterOff:
      mov R1,#80h
      call write_inst
      mov R1,#'O'
      call write_data
           ;
      mov R1,#81h
      call write_inst
      mov R1,#'f'
      call write_data
           ;
      mov R1,#82h
      call write_inst
      mov R1,#'f'
      call write_data
      ret
;=======================================
;Subrutin ini untuk merubah data biner ke desimal
;menjadi 3 digit = ratusan-puluhan-satuan
;=======================================
Bin2Dec:
      mov A,dataADC
      mov b,#100d
      div ab
      mov ratusan,a
      mov a,b
      mov b,#10d
      div ab
      mov puluhan,a
      mov satuan,b
      ret
;=================================================
;Subrutin untuk menampilkan data ke LCD character 2 x16
;pada DDRAM 0C9 0CA 0CB untukratusan, puluhan, and satuan
;=================================================
Display2LCD:
           mov r1,#0c0h
           call write_inst
           mov a,ratusan
           add a,#30h
           mov r1,a
           call write_data
           ;
           mov r1,#0c1h
           call write_inst
           mov a,puluhan
           add a,#30h
           mov r1,a
           call write_data
           ;
           mov r1,#0c2h
           call write_inst
           mov a,satuan
           add a,#30h
           mov r1,a
           call write_data
           ret
;=======================================
;Subrutin ini digunakan untuk mengambil data ADC
;========================================
ADC: clr P3.3
     nop
     nop
     nop
     setb P3.3
eoc: jb P3.2,eoc
     clr P3.4
     mov A,P1
     mov dataADC,A
     setb P3.4
     ret
           ;
Init_lcd:
   mov r1,#00000001b ;Display clear
   call write_inst
   mov r1,#00111000b ;Function set,Data 8 bit,2 line font 5x7
   call write_inst
   mov r1,#00001100b ;Display on, cursor off,cursor blink off
   call write_inst
   mov r1,#00000110b ;Entry mode, Set increment
   call write_inst
   ret
;
write_inst:
           clr P3.6 ; RS = P2.0 = 0, write mode instruction
           mov P0,R1 ; D7 s/d D0 = P0 = R1
           setb P3.7 ; EN = 1 = P2.1
           call delay ; call delay time
           clr P3.7 ; EN = 0 = P2.1
           ret
           ;
Write_data:
           setb P3.6 ; RS = P2.0 = 1, write mode data
           mov P0,R1 ; D7 s/d D0 = P0 = R1
           setb P3.7 ; EN = 1 = P2.1
           call delay ; call delay time
           clr p3.7 ; EN = 0 = P2.1
           ret
           ;
           delay: mov R0,#0
           delay1:mov R2,#0fh
           djnz R2,$
           djnz R0,delay1
           ret
           end
  1. Save the program you typed and name it: prog53a.asm
  2. In the MIDE program, select Build /F9 or to compile the program from *.asm to *.hex.
  3. Program the microcontroller using the ISP Software Program (See Instructions for Use)
  4. Modify the program by adding the word TEMPERATURE: , in Line 2 followed by the ADC data.

Experiment 5.4. Calibrate ADC data to temperature using the Look Up Table method.

Why do we need a look up table?: A look up table is a method used to avoid the long-winded and confusing multiplication and division process when done using assembly language, which of course must be done if we are going to calibrate a measuring instrument. An example of a thermometer calibration using the following equations: Temperature = DataADC * 100/ 255 oC.

Example table for converting data to temperature (using Microsoft Excel). Because the maximum decimal data is 255 and the maximum temperature is 100, the Data look up table is 255/100.

In experiment 5.4, calibration was carried out to change the decimal range (0 to 255) to a temperature range (000.0 to 100.0 oC).

  1. During the programming step, position the toggle switch to the PROG position.
  2. Position the toggle switch to RUN to enable the ADC0804 CS=0
  3. Connect the Microcontroller Trainer module to the +5V power supply.
  4. Connect the Microcontroller Trainer module to the programmer circuit 
  5. Open the M-IDE Studio for MCS-51 program, as a program editor and compiler.
dataADC equ 30h
           org 0h
start: call ADC
           call Display2SevenSegmen
           sjmp start
           ;
           ;=======================================
           ;Subrutin ini digunakan untuk mengambil data ADC
           ;========================================
ADC: clr P3.3
           nop
           nop
           nop
           setb P3.3
           eoc: jb P3.2,eoc
           clr P3.4
           mov A,P1
           mov dataADC,A
           setb P3.4
           ret
           ;
Display2SevenSegmen:
           mov DPTR,#ratusan ; DPTR = [ Ratusan ]
           mov A,DataADC ; A = [DataADC]
           movc A,@A+DPTR ; A = [A+DPTR]
           mov DPTR,#Data7segmen ; DPTR = [Data7Segmen]
           movc A,@A+DPTR ; A = [A+DPTR]
           mov P0,A ; Copy A ke P0
           Clr P3.5 ; Decoder, A=1,
           Clr P3.6 ; B=0
           Setb P3.7 ; dan C=1
           call delay ; Panggil waktu tunda
           ;
           mov DPTR,#puluhan ; DPTR = [ Puluhan ]
           mov A,DataADC ; A = DataADC
           movc A,@A+DPTR ; A =[ A+DPTR]
           mov DPTR,#Data7segmen ; DPTR = [Data7Segmen]
           movc A,@A+DPTR ; A = [A+DPTR]
           mov P0,A
           Setb P3.5
           Clr P3.6
           Setb P3.7
           call delay
           ;
           mov DPTR,#Satuan
           mov A,DataADC
           movc A,@A+DPTR
           mov DPTR,#Data7segmen
           movc A,@A+DPTR
           mov P0,A
           Clr P3.5 ;
           Setb P3.6
           Setb P3.7
           call delay
           ;
           mov DPTR,#Pecahan
           mov A,DataADC
           movc A,@A+DPTR
           mov DPTR,#Data7segmen
           movc A,@A+DPTR
           mov P0,A
           Setb P3.5 ;
           Setb P3.6
           Setb P3.7
           call delay
           ret
           ;
delay: mov R0,#0
delay1:mov R2,#0fh
           djnz R2,$
           djnz R0,delay1
           ret
           ;
Pecahan:
           db 0,4,8,2,6,0,4,7,1,5,9,3,7,1,5,9,3,7,1,5,8,2,6,0,4,8,2,6,0,4,8,2,5,9,3,7,1,5
           db 9,3,7,1,5,9,3,6,0,4,8,2,6,0,4,8,2,6,0,4,7,1,5,9,3,7,1,5,9,3,7,1,5,8,2,6,0,4
           db 8,2,6,0,4,8,2,5,9,3,7,1,5,9,3,7,1,5,9,3,6,0,4,8,2,6,0,4,8,2,6,0,4,7,1,5,9,3
           db 7,1,5,9,3,7,1,5,8,2,6,0,4,8,2,6,0,4,8,2,5,9,3,7,1,5,9,3,7,1,5,9,3,6,0,4,8,2
           db 6,0,4,8,2,6,0,4,7,1,5,9,3,7,1,5,9,3,7,1,5,8,2,6,0,4,8,2,6,0,4,8,2,5,9,3,7,1
           db 5,9,3,7,1,5,9,3,6,0,4,8,2,6,0,4,8,2,6,0,4,7,1,5,9,3,7,1,5,9,3,7,1,5,8,2,6,0
           db 4,8,2,6,0,4,8,2,5,9,3,7,1,5,9,3,7,1,5,9,3,6,0,4,8,2,6,0
           ;
Satuan:
           db 0,0,0,1,1,2,2,2,3,3,3,4,4,5,5,5,6,6,7,7,7,8,8,9,9,9,0,0,1,1,1,2,2,2,3,3,4,4
           db 4,5,5,6,6,6,7,7,8,8,8,9,9,0,0,0,1,1,2,2,2,3,3,3,4,4,5,5,5,6,6,7,7,7,8,8,9,9
           db 9,0,0,1,1,1,2,2,2,3,3,4,4,4,5,5,6,6,6,7,7,8,8,8,9,9,0,0,0,1,1,2,2,2,3,3,3,4
           db 4,5,5,5,6,6,7,7,7,8,8,9,9,9,0,0,1,1,1,2,2,2,3,3,4,4,4,5,5,6,6,6,7,7,8,8,8,9
           db 9,0,0,0,1,1,2,2,2,3,3,3,4,4,5,5,5,6,6,7,7,7,8,8,9,9,9,0,0,1,1,1,2,2,2,3,3,4
           db 4,4,5,5,6,6,6,7,7,8,8,8,9,9,0,0,0,1,1,2,2,2,3,3,3,4,4,5,5,5,6,6,7,7,7,8,8,9
           db 9,0,0,0,1,1,2,2,2,3,3,3,4,4,5,5,5,6,6,7,7,7,8,8,9,9,9,0
           ;
puluhan:
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1
           db 1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
           db 2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4
           db 4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
           db 5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7
           db 7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
           db 8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0
           ;
Ratusan:
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
           db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
           ;
Data7segmen:
           db 11000000b,11111001b,10100100b,10110000b,10011001b
           db 10010010b,10000010b,11111000b,10000000b,10010000b
           ;
           end

Hope this is useful & happy learning!

Netizens

Bro, the link is dead, bro

Hii  TeranggonoRachmatullah,  that's right, bro, but we have secured it, bro, because actually the contents of the assembly program download file are the assembly text code above, so it's the same, just copy and paste it into your compiler, you are free to use any compiler, and just run it... good luck!


Post a Comment

Previous Next

نموذج الاتصال