LẬP TRÌNH VI ĐIỀU KHIỂN 8051 Mục tiêu: Hiển thị chữ tiếng việt lên led ma trận sử dụng led ma trận 8x8, chữ chạy từ phải qua trái (cho dễ đọc) Hiệu ứng: Chữ thường dài phần hiển thị, nên sau hiển thị tất cột, sau cột cuối trơi hết lặp lại Có thể hiển thị nhiều chuỗi nối tiếp Điều khiển: Mạch tự động chạy, có nút bấm: nút pause/unPause; nút next (để sang chuỗi tiếp theo) thấy bé để hiển thị tiếng việt Cuối định dùng hàng led8x8 đủ độ cao để hiển thị tiếng việt có dấu Mạch thật: chưa làm ^^ Mạch mơ phỏng: sử dụng AT89C51 IC loại 74HC595, cuối dùng để xác định cột cần quét, dùng để đưa liệu bít cần sáng cột quét mạch trên, led sáng liệu xuất bít Code asm: ; dat ten cho cac chan st_cp bit P1.0 dl bit P1.7 sh_cp bit P1.2 org 0000h clr sh_cp clr st_cp reset: ; dua chan sh xuong muc thap,chan xac nhan bit ; xoa chan chot mov r0,#0 mov r1,#0 mov r2,#0 mov r3,#0 mov r4,#0 mov dptr,#mydata mov r5,#96 again: mov r6,#24 show: mov r7,#32 setb c next: ; xau hien thi co 96 cot ; quet moi hinh 50 lan ; man hinh co 32 cot led acall XuatDL acall delay inc r0 djnz r7, next mov r0, #0 djnz r6, show inc dptr djnz r5, again ajmp reset out1byte: mov b,#8 loop_out: ; ; rlc a mov dl,c ; setb sh_cp clr sh_cp djnz b,loop_out; nhay xuat bit A 595 vong lap ; dua bit a vao cy chuyen bit vao chan dl ; dua xung xac nhan de dua bit vao vdk ; xac nhan xong bit duoc dua vao vdk khong bang de dua bit vao vdk ret XuatDL: mov rlc mov mov rlc mov mov rlc mov mov rlc mov a,r4 a r4,a a,r3 a r3,a a,r2 a r2,a a,r1 a r1,a mov a,r1 acall out1byte mov a,r2 acall out1byte mov a,r3 acall out1byte mov a,r4 acall out1byte mov a,r0 movc a,@a+dptr acall out1byte setb st_cp clr st_cp ; dua xung vao chan st_cp de xuat du lieu led RET delay: mov a,#2 for1: mov b,#2 for2: ;viet ham tre cho vdk ;nop djnz b,for2 dec a cjne a,#0,for1 ret org 300h mydata: db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh db 00000111B,11101011B,11101101B,11101011B,00000111B,11111111B,00000001B,11110011B,11100111B,11001111B,10011111B,00000001B,11111111B ,00000001B,11101111B,11101111B,11101111B,00000001B,11111111B,11110001B,11100000B,11000000B,10000001B,00000011B,10000001B,11000000 B,11100000B,11110001B,11111111B,00000001B,01101101B,01101101B,01101101B,11111111B,00000001B,11110011B,11100111B,11001111B,1110011 1B,11110011B,00000001B,11111111B,11111111B,00000001B,01111111B,01111111B,01111111B,11111111B,00000111B,11101011B,11101101B,111010 11B,00000111B,11111111B,00000001B,11110011B,11100111B,11001111B,11100111B,11110011B,00000001B,11111111B,01000000B,11111111B ;db 7h,0ebh,0edh,0ebh,7h,0ffh,1h,0f3h,0e7h,0cfh,9fh,1h,0ffh,1h,0efh,0efh,0efh,1h,0ffh,0f1h,0e0h,0c0h,81h,3h,81h,0c0h,0e0h,0f1h,0ffh,1 h,6dh,6dh,6dh,0ffh,1h,0f3h,0e7h,0cfh,0e7h,0f3h,1h,0ffh,0ffh,1h,7fh,7fh,7fh,0ffh,7h,0ebh,0edh,0ebh,7h,0ffh,1h,0f3h,0e7h,0cfh,0e7h, 0f3h,1h,0ffh,40h,0ffh ;db 00000111B, 11101011B, 11101101B, 11101011B, 00000111B, 11111111B, 11111111B, 00000001B, 11110111B, 11101011B, 11011101B, 10111111B, 01100111B, 11000011B, 11000011B, 11000011B, 11100111B, 11111111B, 11111111B, 11110001B, 11100000B, 11000000B, 10000001B, 00000011B, 10000001B, 11000000B, 11100000B, 11110001B, 11111111B, 00000001B, 01101101B, 01101101B, 01101101B, 11111111B, 00000001B, 11110011B, 11100111B, 11001111B, 11100111B, 11110011B, 00000001B, 11111111B, 11111111B, 00000001B, 01111111B, 01111111B, 01111111B, 11111111B, 00000111B, 11101011B, 11101101B, 11101011B, 00000111B, 11111111B, 00000001B, 11110011B, 11100111B, 11001111B, 11100111B, 11110011B, 00000001B, 11111111B, 01000000B, 11111111B db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh end Có thể dùng excel để vẽ chữ hình dưới, sau nối bít theo cột dọc để có liệu cho code asm viết keil ảnh thử viết chữ có dấu k0 ổn lắm, cao đèn nên khó thể dấu tiếng Việt Quyết định dùng hàng led8x8 đủ độ cao để hiển thị tiếng việt có dấu sau: Mạch mơ sử dụng IC loại 74HC595 để điều khiển hàng cột, cuối dùng để chọn hàng cần quét, đầu dùng để đưa liệu hàng led Code asm cho mạch là: ; DAT TEN CHO CAC CHAN CHOT595 BIT P2.2 DU_LIEU BIT P2.1 CLOCK595 BIT P2.0 BPAUSE PAUSE BIT P3.2 BIT P3.0 COL COUNTER COUNTER_COL COUNTER_SCAN EQU 30H EQU 31H STRING_LENGTH DELAY_TIME SCAN_TIME LOOP_TIME EQU 32 EQU 32H EQU 33H EQU 34H EQU 35H EQU 36H ORG 0000H AJMP MAIN ORG 03H LJMP IF_PAUSE ORG 13H LJMP IF_NEXT ORG 30H MAIN: MOV IE,#85H ; CHO PHEP NGAT NGOAI (INT0 AT P3.2) CLR PAUSE CLR CLOCK595 CLR CHOT595 ; DUA CHAN SH XUONG MUC THAP,CHAN XAC NHAN BIT ; XOA CHAN CHOT RESET: MOV R0,#0 MOV R1,#0 MOV R2,#0 MOV R3,#0 MOV COUNTER,#0 CLR F0 ACALL SHOW_STR1 CLR F0 ACALL SHOW_STR2 CLR F0 ACALL SHOW_STR3 AJMP RESET SHOW_STR1: MOV LOOP_TIME,#1 LOOP_STRING1: MOV DPTR,#MYDATA1 MOV STRING_LENGTH,#236 MOV DELAY_TIME,#2 MOV SCAN_TIME,#5 AGAIN1: JB F0, END_SHOW_STR1 ACALL DISPLAY DJNZ STRING_LENGTH, AGAIN1 DJNZ LOOP_TIME, LOOP_STRING1 END_SHOW_STR1: RET SHOW_STR2: MOV LOOP_TIME,#1 LOOP_STRING2: MOV DPTR,#MYDATA2 MOV STRING_LENGTH,#212 MOV DELAY_TIME,#3 MOV SCAN_TIME,#3 AGAIN2: JB F0, END_SHOW_STR2 ACALL DISPLAY DJNZ STRING_LENGTH, AGAIN2 DJNZ LOOP_TIME, LOOP_STRING2 END_SHOW_STR2: RET SHOW_STR3: MOV LOOP_TIME,#3 LOOP_STRING3: MOV DPTR,#MYDATA3 MOV STRING_LENGTH,#88 MOV DELAY_TIME,#3 MOV SCAN_TIME,#5 AGAIN3: JB F0, END_SHOW_STR3 ACALL DISPLAY DJNZ STRING_LENGTH, AGAIN3 DJNZ LOOP_TIME, LOOP_STRING3 END_SHOW_STR3: RET IF_PAUSE: JB BPAUSE,DONE WAIT: ACALL FRAME JNB BPAUSE,WAIT CPL PAUSE DONE: ; BIEN DEM RETI IF_NEXT: JB PAUSE,END_NEXT WAIT_NEXT: ACALL DISPLAY JNB P3.3, WAIT_NEXT SETB F0 END_NEXT: RETI FRAME: MOV COUNTER_COL,#COL SETB C NEXT_COL: ACALL XUATDL JB F0, END_FRAME ACALL DELAY INC COUNTER INC COUNTER DJNZ COUNTER_COL, NEXT_COL MOV COUNTER, #0 END_FRAME: ; MAN HINH CO 32 COT LED RET DISPLAY: MOV COUNTER_SCAN, SCAN_TIME SHOW: JB F0, END_DISPLAY ACALL FRAME DJNZ COUNTER_SCAN, SHOW JB PAUSE, SHOW INC DPTR INC DPTR END_DISPLAY: ; QUET MOI HINH 24 LAN RET OUT1BYTE: MOV B,#8 LOOP_OUT: RLC A MOV DU_LIEU,C SETB CLOCK595 CLR CLOCK595 DJNZ B, LOOP_OUT ; XUAT BIT TRONG A RA CON 595 ; VONG LAP ; DUA BIT TRONG A VAO CY ; CHUYEN BIT VAO CHAN DU_LIEU ; DUA XUNG XAC NHAN DE DUA BIT VAO VDK ; XAC NHAN XONG BIT DUOC DUA VAO VDK ; NHAY KHI KHONG BANG DE DUA BIT VAO VDK RET XUATDL: MOV RLC MOV MOV RLC MOV MOV RLC MOV MOV RLC MOV A,R3 A R3,A A,R2 A R2,A A,R1 A R1,A A,R0 A R0,A MOV A,R0 ACALL OUT1BYTE MOV A,R1 ACALL OUT1BYTE MOV A,R2 ACALL OUT1BYTE MOV A,R3 ACALL OUT1BYTE MOV A,COUNTER MOVC A,@A+DPTR ACALL OUT1BYTE ;LAY GIA TRI BIEN DEM ;LAY DATA MOV A,COUNTER INC A MOVC A,@A+DPTR ACALL OUT1BYTE ;LAY GIA TRI BIEN DEM SETB CHOT595 CLR CHOT595 ; DUA XUNG VAO CHAN CHOT595 DE XUAT DU LIEU RA LED RET DELAY: ;VIET HAM TRE CHO VDK MOV A,DELAY_TIME FOR_DELAY: ;NOP JB F0, END_DELAY DEC A CJNE A,#0,FOR_DELAY END_DELAY: RET ;LAY DATA ORG 300H MYDATA1: ;'DO DUY COP - HOC VI DIEU KHIEN'; LENGTH=240 dw dw dw dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB 0EFH,0EEH, 0FH,0E0H, 0F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,0FFH, 7FH,0E0H,0FFH,0E0H,0FFH,0FFH; 159 231 68 D 117 U 121 Y 67 C 232 112 P 45 104 H 228 99 C 118 V 166 210 117 U 107 K 104 H 211 110 N MYDATA2: ;'Thi tr?c nghi?m máy' length=202 dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH db db db db db db db db db db db db db db db db db db db db db db db db 0ffh,0ffh, 8fh,0ffh,0cfh,0efh, 0fh,0e0h, 0fh,0e0h,0cfh,0efh, 8fh,0ffh,0ffh,0ffh; 84 T;//84 T 0efh,0efh, 0fh,0e0h, 0fh,0e0h,0ffh,0feh, 7fh,0ffh, 7fh,0e0h,0ffh,0e0h,0ffh,0ffh; 104 h;//104 h 0ffh,0ffh, 7fh,0efh, 4fh,0e0h, 4fh,0e0h,0ffh,0efh,0ffh,0ffh,0ffh,0ffh; 105 i;//105 i 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh; 32 (space);//32 7fh,0ffh, 7fh,0ffh, 1fh,0f0h, 0fh,0e0h, 7fh,0efh, 7fh,0e7h,0ffh,0f7h,0ffh,0ffh; 116 t;//116 t 7fh,0efh, 7fh,0e0h,0ffh,0e0h, 7fh,0eeh, 7fh,0ffh, 7fh,0fch,0ffh,0fch,0ffh,0ffh; 114 r;//114 r 0ffh,0f3h, 6fh,0e1h, 4fh,0edh, 57h,0edh, 4bh,0f0h,0ebh,0e0h,0ffh,0efh,0ffh,0ffh; 175 ;//7855 ? 0ffh,0f0h, 7fh,0e0h, 7fh,0efh, 7fh,0efh, 7fh,0efh, 7fh,0e6h,0ffh,0f6h,0ffh,0ffh; 99 c;//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ffh; 0fh,0fch, 0fh,0f8h,0ffh,0f3h,0ffh,0e7h,0ffh,0f3h, 0fh,0f8h, 0fh,0fch,0ffh,0ffh; 0efh,0eeh, 0fh,0e0h, 0fh,0e0h,0efh,0eeh,0cfh,0e6h, 1fh,0f0h, 3fh,0f8h,0ffh,0ffh; 0efh,0efh, 0fh,0e0h, 0fh,0e0h,0ffh,0feh, 3fh,0f8h, 0fh,0e1h,0cfh,0e7h,0ffh,0ffh; dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH dw 0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH,0FFFFH END 86 V;//86 V 88 X;//88 X 76 L;//76 L 45 -;//45 86 V;//86 V 159 ;//272 Ð 75 K;//75 K Nảy sinh vấn đề ngồi tạo hình dáng tiếng việt cho bảng chữ tiếng Việt thật mệt Chợt nhớ hồi sv có viết chươn trình (sử dụng thư viện có sẵn VietRes) để tạo tiếng Việt Turbo C Chương trình viết TC, chạy dos có giao diện tiếng Việt sau: Nguyên lý chạy chương trình ta cho BIOS trỏ sang font tiếng Việt, chạy xong lại dùng lại font cũ BIOS File font.h sau: /*************************************************/ void LoadFont(); void LoadBiosFont(); /*************************************************/ char FontArray[4096] = { /* */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , /* */ 0, 0, 6, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 16, 96 , /* */ 0, 0, 0, 0, 0, 0,124,198, 6, 28, 6,198,124, 0, 0, , /* */ 0, 0, 0, 0, 0, 0, 0,118, 27,126,200,220,119, 0, 0, , /* */ 0, 0, 0, 0, 0, 0, 0,124,198, 6,254,134,124, 0, 0, , /* */ 0, 0, 0, 0, 24, 36,102,102,126,102,102, 36, 24, 0, 0, , /* */ 0, 0, 0, 0, 0, 0,220,230,198,198,198,198,198, 6, 12, 24 , /* */ 170, 85,170, 85,170, 85,170, 85,170, 0, 0, 0, 0, 0, 0, , /* */ 255,255,255,255,255,255,231,195,195,231,255,255,255,255,255,255 , /* */ 0, 0, 0, 0, 0, 60,102, 66, 66,102, 60, 0, 0, 0, 0, , /* */ 255,255,255,255,255,195,153,189,189,153,195,255,255,255,255,255 , /* */ 224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224 , /* */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, , /* */ 224,224,224,224,224,224,224,224,224,224,224,224,224,255,255,255 , /* */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,255,255,255 , /* */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255 , /* */ 0, 0, 0, 0, 0, 0, 24, 24, 44, 36, 70, 66,231, 0, 0, , /* */ 0, 0, 0, 0, 0, 0, 0,124,198, 6, 6,198,124, 0, 0, , /* */ 0, 0, 0, 0, 0,127, 6, 12, 30, 7, 3, 3, 99,102, 60, , /* */ 0, 0, 0, 0, 0, 0,231, 36, 36,195,195,195,126, 0, 0, , /* */ 0, 0, 0, 0,208, 96,112,152, 60,102,102,102, 60, 0, 0, , /* */ 0, 0, 0, 0, 0, 0, 0,110,115, 99, 99, 99,222, 0, 0, , /* */ 255,128,129,131,135,143,159,191,128,129,131,135,143,159,128,255 , /* */ 255, 1,129,193,225,241,249,253, 1,129,193,225,241,249, 1,255 , /* */ 255,128,159,143,135,131,129,128,191,159,143,135,131,129,128,255 , /* */ 255, 1,249,241,225,193,129, 1,253,249,241,225,193,129, 1,255 , 0, 0, 0, 0, 0, 0, 24, 12,254, 12, 24, 0, 0, 0, 0, , /* */ 255,128,129,131,135,143,159,159,131,131,131,131,131,131,128,255 , /* */ 255, 1,129,193,225,241,249,249,193,193,193,193,193,193, 1,255 , /* */ 255,128,131,131,131,131,131,131,159,159,143,135,131,129,128,255 , /* */ 255, 1,193,193,193,193,193,193,249,249,241,225,193,129, 1,255 , /* */ 0, 0, 0, 0, 0,254,254,124,124, 56, 56, 16, 0, 0, 0, , /* */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, , /*!! */ 0, 0, 0, 0, 24, 60, 60, 60, 24, 24, 0, 24, 24, 0, 0, , /*"" */ /*## */ /*%% /*&& /*'' /*(( /* /*** /*++ /*,, /*-/* /*// /*00 /*11 /*22 /*33 /*44 /*55 /*66 /*77 /*88 /*99 /*:: /*;; /*> /*?? /*@@ /*AA /*BB /*CC /*DD /*EE /*FF /*GG /*HH /*II /*JJ /*KK /*LL /*MM /*NN /*OO /*PP /*QQ /*RR /*SS /*TT /*UU /*VV /*WW /*XX /*YY /*ZZ /*[[ /*\\ /*]] /*^^ /* /*`` /*aa /*bb /*cc /*dd /*ee /*ff /*gg /*hh /*ii /*jj /*kk /*ll /*mm /*nn /*oo /*pp /*qq /*rr /*ss /*tt /*uu /*vv /*ww /*xx /*yy /*zz /*/* /*|| /* /*~~ /*•• /*€€ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ */ /* */ */ */ */ */ */ 0, 0, 0,102,102,102, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,108,108,254,108,108,108,254,108,108, 0, 0, 0, 0, 24, 24,124,198,194,192,124, 6,134,198,124, 24, 24, 0, 0, 0, 0, 0, 0,194,198, 12, 24, 48,102,198, 0, 0, 0, 0, 0, 0, 56,108,108, 56,118,220,204,204,118, 0, 0, 0, 0, 0, 48, 48, 48, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 24, 48, 48, 48, 48, 48, 24, 12, 0, 0, 0, 0, 0, 0, 48, 24, 12, 12, 12, 12, 12, 24, 48, 0, 0, 0, 0, 0, 0, 0, 0,102, 60,255, 60,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24,126, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0, 0, 0, 0, 2, 6, 12, 24, 48, 96,192,128, 0, 0, 0, 0, 0, 0, 0,124,198,206,222,246,230,198,198,124, 0, 0, 0, 0, 0, 0, 24, 56,120, 24, 24, 24, 24, 24,126, 0, 0, 0, 0, 0, 0,124,198, 6, 12, 24, 48, 96,198,254, 0, 0, 0, 0, 0, 0,124,198, 6, 6, 60, 6, 6,198,124, 0, 0, 0, 0, 0, 0, 12, 28, 60,108,204,254, 12, 12, 30, 0, 0, 0, 0, 0, 0,254,192,192,192,252, 6, 6,198,124, 0, 0, 0, 0, 0, 0, 60, 96,192,192,252,198,198,198,124, 0, 0, 0, 0, 0, 0,254,198, 6, 12, 24, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0,124,198,198,198,124,198,198,198,124, 0, 0, 0, 0, 0, 0,124,198,198,198,126, 6, 6, 12,120, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0, 24, 24, 48, 0, 0, 0, 0, 0, 0, 6, 12, 24, 48, 96, 48, 24, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 0, 0,126, 0, 0, 0, 0, 0, 0, 0, 0, 96, 48, 24, 12, 6, 12, 24, 48, 96, 0, 0, 0, 0, 0, 0,124,198,198, 12, 24, 24, 0, 24, 24, 0, 0, 0, 0, 0, 0,124,198,198,222,222,222,220,192,124, 0, 0, 0, 0, 0, 0, 16, 56,108,198,198,254,198,198,198, 0, 0, 0, 0, 0, 0,252,102,102,102,124,102,102,102,252, 0, 0, 0, 0, 0, 0, 60,102,194,192,192,192,194,102, 60, 0, 0, 0, 0, 0, 0,248,108,102,102,102,102,102,108,248, 0, 0, 0, 0, 0, 0,254,102, 98,104,120,104, 98,102,254, 0, 0, 0, 0, 0, 0,254,102, 98,104,120,104, 96, 96,240, 0, 0, 0, 0, 0, 0, 60,102,194,192,192,222,198,102, 58, 0, 0, 0, 0, 0, 0,198,198,198,198,254,198,198,198,198, 0, 0, 0, 0, 0, 0, 60, 24, 24, 24, 24, 24, 24, 24, 60, 0, 0, 0, 0, 0, 0, 30, 12, 12, 12, 12, 12,204,204,120, 0, 0, 0, 0, 0, 0,230,102,108,108,120,108,108,102,230, 0, 0, 0, 0, 0, 0,240, 96, 96, 96, 96, 96, 98,102,254, 0, 0, 0, 0, 0, 0,198,238,254,254,214,198,198,198,198, 0, 0, 0, 0, 0, 0,198,230,246,254,222,206,198,198,198, 0, 0, 0, 0, 0, 0, 56,108,198,198,198,198,198,108, 56, 0, 0, 0, 0, 0, 0,252,102,102,102,124, 96, 96, 96,240, 0, 0, 0, 0, 0, 0,124,198,198,198,198,214,222,124, 12, 14, 0, 0, 0, 0, 0,252,102,102,102,124,108,102,102,231, 0, 0, 0, 0, 0, 0,124,198,198, 96, 56, 12,198,198,124, 0, 0, 0, 0, 0, 0,126,126, 90, 24, 24, 24, 24, 24, 60, 0, 0, 0, 0, 0, 0,198,198,198,198,198,198,198,198,124, 0, 0, 0, 0, 0, 0,198,198,198,198,198,198,108, 56, 16, 0, 0, 0, 0, 0, 0,198,198,198,198,214,214,254,124,108, 0, 0, 0, 0, 0, 0,198,198,108, 56, 56, 56,108,198,198, 0, 0, 0, 0, 0, 0,102,102,102,102, 60, 24, 24, 24, 60, 0, 0, 0, 0, 0, 0,254,198,140, 24, 48, 96,194,198,254, 0, 0, 0, 0, 0, 0, 60, 48, 48, 48, 48, 48, 48, 48, 60, 0, 0, 0, 0, 0, 0,128,192,224,112, 56, 28, 14, 6, 2, 0, 0, 0, 0, 0, 0, 60, 12, 12, 12, 12, 12, 12, 12, 60, 0, 0, 0, 0, 16, 56,108,198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 48, 48, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 12,124,204,204,118, 0, 0, 0, 0, 0, 0,224, 96, 96,120,108,102,102,102,124, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,198,192,192,198,124, 0, 0, 0, 0, 0, 0, 28, 12, 12, 60,108,204,204,204,118, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,198,254,192,198,124, 0, 0, 0, 0, 0, 0, 56,108,100, 96,240, 96, 96, 96,240, 0, 0, 0, 0, 0, 0, 0, 0, 0,118,204,204,204,124, 12,204,120, 0, 0, 0, 0,224, 96, 96,108,118,102,102,102,230, 0, 0, 0, 0, 0, 0, 24, 24, 0, 56, 24, 24, 24, 24, 60, 0, 0, 0, 0, 0, 0, 6, 6, 0, 14, 6, 6, 6, 6,102,102, 60, 0, 0, 0, 0,224, 96, 96,102,108,120,108,102,230, 0, 0, 0, 0, 0, 0, 56, 24, 24, 24, 24, 24, 24, 24, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0,236,254,214,214,214,198, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,102,102,102,102,102, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,198,198,198,198,124, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,102,102,102,124, 96, 96,240, 0, 0, 0, 0, 0, 0, 0,118,204,204,204,124, 12, 12, 30, 0, 0, 0, 0, 0, 0, 0,220,118,102, 96, 96,240, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,198,112, 28,198,124, 0, 0, 0, 0, 0, 0, 16, 48, 48,252, 48, 48, 48, 54, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0,204,204,204,204,204,118, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,102,102,102, 60, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0,198,198,214,214,254,108, 0, 0, 0, 0, 0, 0, 0, 0, 0,198,108, 56, 56,108,198, 0, 0, 0, 0, 0, 0, 0, 0, 0,198,198,198,198,126, 6, 12,248, 0, 0, 0, 0, 0, 0, 0,254,204, 24, 48,102,254, 0, 0, 0, 0, 0, 0, 14, 24, 24, 24,112, 24, 24, 24, 14, 0, 0, 0, 0, 0, 0, 24, 24, 24, 24, 0, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0,112, 24, 24, 24, 14, 24, 24, 24,112, 0, 0, 0, 0, 0, 0,118,220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 56,108,198,198,254, 0, 0, 0, 0, 56,108,108, 56, 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , /*•• /*‚‚ /*ƒƒ /*„„ /*…… /*†† /*‡‡ /*ˆˆ /*‰‰ /*ŠŠ /*‹‹ /*ŒŒ /*•• /*ŽŽ /*•• /*•• /*‘‘ /*’’ /*““ /*”” /*•• /*–– /*—— /*˜˜ /* /* /* /* /* /* /* /* /*ĂĂ /* /*ÊÊ /*ÔÔ /*ƠƠ /*ƯƯ /*ĐĐ /*ăă /*ââ /*êê /*ôô /*ơơ /*-/*đđ /* /* /* /* /* /* /*àà /*ảả /*ãã /*áá /*ạạ /* /*ằằ /*ẳẳ /*ẵẵ /*ắắ /* /* /* /* /* /* /* /*ặặ /*ầầ /*ẩẩ /*ẫẫ /*ấấ /*ậậ /*ÌÌ /*ÍÍ /*ÍÍ /*ÏÏ /*ÐÐ /*ĐĐ /*ỊỊ /*ĨĨ /*ƠƠ /*ÕÕ /*ệệ /*ìì /*ỉỉ /* /* /* /*ĩĩ /*íí /*ịị /*òò */ 0,112,152, 48, 96,200,248, 0, 0, 0, 0, 0, 0, 0, 0, */ 0, 0, 0, 0, 24, 24,126, 24, 24, 0, 0,255, 0, 0, 0, */ 0, 0, 0, 0, 0,118,220,216,216,216,220,118, 0, 0, 0, */ 0, 0, 0, 0, 0,252,198,252,198,198,252,192,192,192, 0, */ 0, 0, 0, 0,108,108, 0, 56, 24, 24, 24, 24, 60, 0, 0, */ 0, 0, 0, 24, 60,102, 0, 56, 24, 24, 24, 24, 60, 0, 0, */ 0, 0, 0, 0,108,222, 26, 26,126,216,216,218,108, 0, 0, */ 0, 0, 0, 0,204,204, 0,124,198,198,198,198,124, 0, 0, */ 0, 0, 0, 48,120,204, 0,204,204,204,204,204,118, 0, 0, */ 0, 0, 0, 0,198,198, 0,198,198,198,198,126, 6, 12,120, */ 0, 0, 24, 24, 24,124,198,192,192,198,124, 24, 24, 24, 0, */ 0, 0, 0, 56,108,100, 96,240, 96, 96,102,230,188, 0, 0, */ 0, 0, 0,102,102,102, 60, 24,126, 24, 60, 24, 24, 0, 0, */ 1, 31, 63, 31, 7, 7, 15, 1, 3, 3, 5, 5, 9, 9, 17, 17 */ 0,248,248,248,192,192,224, 0,128,128, 64, 64, 32, 32, 16, 16 */ 0, 0, 0, 0, 0, 0, 54,108,216,108, 54, 0, 0, 0, 0, */ 0, 0, 0, 0, 0, 0,216,108, 54,108,216, 0, 0, 0, 0, */ 0, 0, 0, 0, 24, 24, 24,126, 24, 24, 24, 0,126,126, 0, */ 0, 0, 0, 0, 96, 48, 24, 12, 24, 48, 96, 0,124,124, 0, */ 0, 0, 0, 0, 12, 24, 48, 96, 48, 24, 12, 0,124,124, 0, */ 24, 24, 24, 60, 60,126,126,255, 24, 24, 24, 24, 24, 24, 24, 24 */ 24, 24, 24, 24, 24, 24, 24, 24,255,126,126, 60, 60, 24, 24, 24 */ 0, 0, 0, 0, 0, 64,112,124,255,124,112, 64, 0, 0, 0, */ 0, 0, 0, 0, 0, 2, 14, 62,255, 62, 14, 2, 0, 0, 0, */ 0, 0,108, 56, 0, 56,108,198,198,254,198,198,198, 0, 0, */ 0, 16, 56,108, 0, 56,108,198,198,254,198,198,198, 0, 0, */ 0, 16, 56, 68,254,102, 98,104,120,104, 98,102,254, 0, 0, */ 0, 16, 56, 68, 56,108,198,198,198,198,198,108, 56, 0, 0, */ 0, 0, 3, 1, 58,108,198,198,198,198,198,108, 56, 0, 0, */ 0, 0, 3, 1,199,198,198,198,198,198,198,198,124, 0, 0, */ 0, 0, 0, 0,248,108,102,102,254,102,102,108,248, 0, 0, aw */ 0, 0, 0, 0,108, 56, 0,120, 12,124,204,204,118, 0, 0, aa*/ 0, 0, 0, 0, 56,108, 0,120, 12,124,204,204,118, 0, 0, ee*/ 0, 0, 0, 0, 56,108, 0,124,198,254,192,198,124, 0, 0, oo*/ 0, 0, 0, 0, 56,108, 0,124,198,198,198,198,124, 0, 0, ow*/ 0, 0, 0, 0, 0, 3, 1,126,198,198,198,198,124, 0, 0, uw*/ 0, 0, 0, 0, 0, 3, 1,206,204,204,204,204,118, 0, 0, dd*/ 0, 0, 0, 0, 12, 62, 12, 60,108,204,204,204,118, 0, 0, af*/ 0, 0,192, 96, 48, 0, 0,120, 12,124,204,204,118, 0, 0, ar*/ 0, 0, 56, 8, 16, 0, 0,120, 12,124,204,204,118, 0, 0, ax*/ 0, 0, 0,118,220, 0, 0,120, 12,124,204,204,118, 0, 0, as*/ 0, 0, 6, 12, 24, 0, 0,120, 12,124,204,204,118, 0, 0, aj*/ 0, 0, 0, 0, 0, 0, 0,120, 12,124,204,204,118, 0, 48, 48 awf*/ 0, 0, 96, 16, 76, 56, 0,120, 12,124,204,204,118, 0, 0, awr*/ 0, 0, 7, 1,110, 56, 0,120, 12,124,204,204,118, 0, 0, awx*/ 0, 0,118,220,108, 56, 0,120, 12,124,204,204,118, 0, 0, aws*/ 0, 0, 12, 16,108, 56, 0,120, 12,124,204,204,118, 0, 0, */ 68, 17, 68, 17, 68, 17, 68, 17, 68, 17, 68, 17, 68, 17, 68, 17 */ 170, 85,170, 85,170, 85,170, 85,170, 85,170, 85,170, 85,170, 85 */ 119,221,119,221,119,221,119,221,119,221,119,221,119,221,119,221 */ 255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, */ 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255 awj*/ 0, 0, 0, 0,108, 56, 0,120, 12,124,204,204,118, 0, 48, 48 aaf*/ 0, 0,192, 96, 56,108, 0,120, 12,124,204,204,118, 0, 0, aar*/ 0, 0, 7, 1, 58,108, 0,120, 12,124,204,204,118, 0, 0, aax*/ 0, 0,118,220, 56,108, 0,120, 12,124,204,204,118, 0, 0, */ 54, 54, 54, 54, 54, 54, 54,246, 6,246, 54, 54, 54, 54, 54, 54 */ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54 */ 0, 0, 0, 0, 0, 0, 0,254, 6,246, 54, 54, 54, 54, 54, 54 */ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,246, 6,254, 0, aas*/ 0, 0, 6, 12, 56,108, 0,120, 12,124,204,204,118, 0, 0, aaj*/ 0, 0, 0, 0, 56,108, 0,120, 12,124,204,204,118, 0, 48, 48 */ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, */ 192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,255 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,255 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255 */ 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, */ 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ef*/ 0, 0,192, 96, 48, 0, 0,124,198,254,192,198,124, 0, 0, er*/ 0, 0, 56, 8, 16, 0, 0,124,198,254,192,198,124, 0, 0, */ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 48, 63, 0, */ 0, 0, 0, 0, 0, 0, 0, 63, 48, 55, 54, 54, 54, 54, 54, 54 */ 54, 54, 54, 54, 54, 54, 54,247, 0,255, 0, 0, 0, 0, 0, */ 0, 0, 0, 0, 0, 0, 0,255, 0,247, 54, 54, 54, 54, 54, 54 */ 54, 54, 54, 54, 54, 54, 54, 55, 48, 55, 54, 54, 54, 54, 54, 54 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0,255, 0, */ 0, 0, 0, 0, 0, 0, 0,255, 0,255, 0, 0, , 0, 0, ex*/ 0, 0, 0,118,220, 0, 0,124,198,254,192,198,124, 0, 0, es*/ 0, 0, 6, 12, 24, 0, 0,124,198,254,192,198,124, 0, 0, ej*/ 0, 0, 0, 0, 0, 0, 0,124,198,254,192,198,124, 0, 24, 24 eef*/ 0, 0,192, 96, 56,108, 0,124,198,254,192,198,124, 0, 0, eer*/ 0, 0, 7, 1, 58,108, 0,124,198,254,192,198,124, 0, 0, eex*/ 0, 0,118,220, 56,108, 0,124,198,254,192,198,124, 0, 0, ees*/ 0, 0, 6, 12, 56,108, 0,124,198,254,192,198,124, 0, 0, eej*/ 0, 0, 0, 0, 56,108, 0,124,198,254,192,198,124, 0, 24, 24 if*/ 0, 0,192, 96, 48, 0, 0, 56, 24, 24, 24, 24, 60, 0, 0, ir*/ 0, 0, 56, 8, 16, 0, 0, 56, 24, 24, 24, 24, 60, 0, 0, */ 255,192,192,192,192,192,192,207,207,192,192,192,192,192,192,255 */ 254, 6, 6, 6, 6, 6, 6,230,230, 6, 6, 6, 6, 6, 6,254 */ 255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, ix*/ 0, 0, 0,118,220, 0, 0, 56, 24, 24, 24, 24, 60, 0, 0, is*/ 0, 0, 6, 12, 24, 0, 0, 56, 24, 24, 24, 24, 60, 0, 0, ij*/ 0, 0, 0, 0, 24, 24, 0, 56, 24, 24, 24, 24, 60, 0, 24, 24 of*/ 0, 0,192, 96, 48, 0, 0,124,198,198,198,198,124, 0, 0, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , /*àà /*áá /*ââ /*ãã /*ọọ /*ồồ /*ổổ /*ỗỗ /*ốố /*ộộ /*ờờ /*ởở /*ỡỡ /*ớớ /*ợợ /*ùù /* /*ủủ /*ũũ /*úú /*ụụ /*ừừ /*ửử /*ữữ /*ứứ /*ựự /*ỳỳ /*ỷỷ /*ỹỹ /*ýý /*ỵỵ */ or*/ ox*/ os*/ oj*/ oof*/ oor*/ oox*/ oos*/ ooj*/ owf*/ owr*/ owx*/ ows*/ owj*/ uf*/ */ ur*/ ux*/ us*/ uj*/ wf*/ wr*/ wx*/ ws*/ wj*/ yf*/ yr*/ yx*/ ys*/ yj*/ 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, 62, 96,192,192,254,192,192, 96, 62, 0, 56, 8, 16, 0, 0,124,198,198,198,198,124, 0,118,220, 0, 0, 0,124,198,198,198,198,124, 0, 6, 12, 24, 0, 0,124,198,198,198,198,124, 0, 0, 0, 0, 0, 0,124,198,198,198,198,124, 0,192, 96, 56,108, 0,124,198,198,198,198,124, 0, 7, 1, 58,108, 0,124,198,198,198,198,124, 0,118,220, 56,108, 0,124,198,198,198,198,124, 0, 6, 12, 56,108, 0,124,198,198,198,198,124, 0, 0, 0, 56,108, 0,124,198,198,198,198,124, 0,192, 96, 48, 3, 1,126,198,198,198,198,124, 0, 56, 8, 16, 3, 1,126,198,198,198,198,124, 0,118,220, 0, 3, 1,126,198,198,198,198,124, 0, 6, 12, 24, 3, 1,126,198,198,198,198,124, 0, 0, 0, 0, 3, 1,126,198,198,198,198,124, 0,192, 96, 48, 0, 0,204,204,204,204,204,118, 0, 0, 0, 0,254, 0, 0,254, 0, 0,254, 0, 0, 56, 8, 16, 0, 0,204,204,204,204,204,118, 0,118,220, 0, 0, 0,204,204,204,204,204,118, 0, 6, 12, 24, 0, 0,204,204,204,204,204,118, 0, 0, 0, 0, 0, 0,204,204,204,204,204,118, 0,192, 96, 48, 3, 1,206,204,204,204,204,118, 0, 56, 8, 16, 3, 1,206,204,204,204,204,118, 0,118,220, 0, 3, 1,206,204,204,204,204,118, 0, 6, 12, 24, 3, 1,206,204,204,204,204,118, 0, 0, 0, 0, 3, 1,206,204,204,204,204,118, 0,192, 96, 48, 0, 0,198,198,198,198,126, 6, 0, 56, 8, 16, 0, 0,198,198,198,198,126, 6, 0, 0,118,220, 0, 0,198,198,198,198,126, 6, 0, 6, 12, 24, 0, 0,198,198,198,198,126, 6, 0, 0, 0, 0, 0, 0,198,198,198,198,126, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 12,248, 12,248, 12,248, 12,248, 12,251, 0, 0, 0 0 24 0 0 24 0 0 24 0 0 48 0 0 48 0 0 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , }; /*************************************************/ // Tao font tieng Viet void LoadFont() { asm{ mov dx,0 mov cx,256 mov ax,1110h mov bx,1000h mov bp, seg FontArray mov es,bp mov bp,offset FontArray int 10h } } /*************************************************/ // Lay lai font he thong void LoadBiosFont() { asm{ mov ax,1114h mov bl,0 int 10h } } /*het*/ Trong file này, mảng FontArray có cấu trúc 16*256 phần tử, xác định hình dạng cho 256 phần tử bảng mã ascii Mỗi phần tử ascii biểu diễn ma trận 16x8 (16 hàng, hàng bít), kí tự ascii gồm 16 số mảng, số hàng (số byte có bít) ma trận 16x8 Trong đó, đưa liệu ma trận led8x8 ta phải đưa liệu cột dọc, cần xử lý file để có liệu mong muốn Code php sau để dựng ma trận lên, tách hàng liệu bít: