PIC microcontroller realizes the design of 8 digital tubes to realize circular display

Publisher:VelvetDreamerLatest update time:2019-12-31 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

8 digital tubes scroll to display the same number

8 digital tubes display multiple different characters

8 digital tubes flashing display

8 digital tubes scroll to display digital strings

PIC microcontroller realizes the design of 8 digital tubes to realize circular display

#include

__CONFIG(0x3B31);

unsigned char tab[]={0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71}; //0-F--common cathode digital tube

#defineLEDPORTB

void delay1ms(unsigned int x)

{

unsigned char i;

for (;x>0;x--)

for (i=0;i<165;i++);

}

void init()

{

TRISB=0x00;

PORTB=0xFF;

}

void main()

{

unsigned char i;

init();

while(1)

{

for (i=0;i<10;i++)

{

LED=tab[i];

delay1ms(500);

}

}

}

Reference address:PIC microcontroller realizes the design of 8 digital tubes to realize circular display

Previous article:What should be paid attention to when programming and allocating space for PIC microcontrollers?
Next article:Design of clock error analyzer system for multiple rate electric energy meter based on PIC single chip

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号