51 8*8 dot-matrix display number

Source: Internet
Author: User

Tags: c c language dot matrix single chip microcomputer

51 of the Code

#include <reg51.h> #include <intrins.h> #define int8 unsigned char#define int16 unsigned int#define int32 unsigned long int8 code num_tab[10][8]={{0xff,0xff,0xc1,0xbe,0xbe,0xc1,0xff,0xff},/* "0", 0*/{0xff,0xff,0xde,0x80, 0xfe,0xff,0xff,0xff},/* "1", 1*/{0xff,0xff,0xdc,0xba,0xb6,0xce,0xff,0xff},/* "2", 2*/{0xff,0xff,0xdd,0xb6,0xb6, 0xc9,0xff,0xff},/* "3", 3*/{0xff,0xff,0xf1,0xcd,0x80,0xfd,0xff,0xff},/* "4", 4*/{0XFF,0XFF,0X86,0XB6,0XB6,0XB9, 0xff,0xff},/* "5", 5*/{0xff,0xff,0xc1,0xb6,0xb6,0xd9,0xff,0xff},/* "6", 6*/{0xff,0xff,0x9f,0xb8,0xb7,0x8f,0xff, 0xff},/* "7", 7*/{0xff,0xff,0xc9,0xb6,0xb6,0xc9,0xff,0xff},/* "8", 8*/{0xff,0xff,0xcd,0xb6,0xb6,0xc1,0xff,0xff},/* "9", 0*/};void delay (int x), void main (void) {int8 i;int8 j;int8 K; P3 = 0x80;while (1) {for (j = 0; J <, J + +) {for (k = 0; k <, k++) {for (i = 0; i < 8; i++) {P0 = 0xFF; P0 = Num_tab[j][i]; P3 = _crol_ (p3,1);d elay (1);}}} void delay (int x) {int16 i,j;for (i=0;i<x;i++) {for (j=0; J <; J + +);}}
Schematic diagram of the circuit implemented
<img src= "http://img.blog.csdn.net/20150121122452694?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmta0nja0mg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Center "alt=" "/>
Significant effect
<img align= "Middle" src= "http://img.blog.csdn.net/20150121123608718?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmta0nja0mg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Center "alt=" "/>

51 8*8 dot-matrix display number

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: