Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Seven Segmen By Kustanto.

Presentasi serupa


Presentasi berjudul: "Seven Segmen By Kustanto."— Transcript presentasi:

1 Seven Segmen By Kustanto

2 Gambar

3 Numbers to 7-segment-code
A single byte can encode the full state of a 7- segment-display. The most popular bit encodings are abcdefg - both usually assume 0 is off and 1 is on. This table gives the hexadecimal encodings for displaying the digits 0 to 9:

4 Tabel Angka /Huruf Data (Heksa) 3f 1 0_6 2 5b 3 4f 4 66 5 6d 6 7d 7
Tabel: Seven segmen Angka /Huruf Data (Heksa) 3f 1 0_6 2 5b 3 4f 4 66 5 6d 6 7d 7 0_7 8 7f 9 6f A 77 B 7c C 39 D 5e E 79 F 71

5 Fungsi pin ATMEL AT89S52 (40 Pin DIP)

6 Aplikasi AT89S52 P20 C AT89S52 Mikrokontroler Common Catode (0)
ULN2003A P0.0 . P0.7 A . G DP

7 Software angka Nol $mod51 org 00h mulai:
mov p2,#0feh ;P2.0 dibuat low (0) mov p0,#3fh ;membentuk angka 0 sjmp mulai ;lompat ke mulai end ;fe=

8 Rangkaian Seven Segmen

9 $mod51 org 00h loop: mov r0,#0ah mov dptr,#tabel_led loop1: clr a
Program assemblernya: $mod51 org 00h loop: mov r0,#0ah mov dptr,#tabel_led loop1: clr a movc mov p0,a inc dptr call tunda djnz r0,loop1 sjmp loop tunda: mov r7,#0ffh lupa: mov r6,#33h lupb: mov r5,#22h djnz r5,$ djnz r6,lupb djnz r7,lupa ret tabel_led: db b db b db b db b db b db b db b db b db b db b end

10 Aplikasi AT89S52 P20 C P21 AT89S52 Pin Digit 1 Digit 2 Mikrokontroler
Common Catode Mikrokontroler AT89S52 Pin ULN2003A P P A . G DP 18 . 11 Digit 1 Digit 2

11 Instruksinya $mod51 org 00h mulai:
mov p2,#0feh ;digit 1 (fe= ) mov p0,#3fh ;angka 0 call tunda mov p2,#0fdh ;digit 2 (fd= ) mov p0,4fh ;angka 3 sjmp mulai tunda: mov r7,#02h lupa: mov r6,#33h lupb: mov r5,#22h djnz r5,$ djnz r6, lupb djnz r7,lupa ret end

12 Selesai


Download ppt "Seven Segmen By Kustanto."

Presentasi serupa


Iklan oleh Google