aaaa12345
loading
It is a condensed emotional expression of the corporate policy

An Example of LED Dynamic Display Based on 80C51 Single Chip Microcomputer

The wiring diagram of single chip microcomputer 80C51 is shown in Figure 1. In Figure 1, position 4 shows the common anode for the tube. Use dynamic display and cycle on or cycle off each display. When the cycle display time interval is small, due to the temporary characteristics of human eyes, the flashing phenomenon of nixie tube will not be seen.

Fig. 1 wiring diagram of single chip microcomputer 80C51

control system design

Block diagram

Fig. 2 program block diagram

Program list

The program is written into 80C51 chip as follows

#include

/*---------------------Define variables----------------------------------*/

  sbit p1_ 0=P1^0;

  sbit p1_ 1=P1^1;

  sbit p1_ 2=P1^2;

  sbit p1_ 3=P1^3;

  sbit p1_ 4=P1^4;

  sbit p1_ 7=P1^7;

/ / common anode nixie tube displays segment codes of 0 9

  unsigned char code table[]=0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90;

  unsigned int count=0; // Define counter

  unsigned int weight=0; // Weighing variable

  void delay(unsigned int TIme); // delayed

  void display(unsigned int n); // Nixie tube display

/ * ----------------- main program------------------------------------*/

  void main(void)

/ * - input synchronous display-*/

  while(1)

  int i=0;

  unsigned int a;

If ((P1 & 0x1f) = = 0x1f); / / no action without pressing the key

Else if (p1_0 = = 0) count = count 100; while (p1_0 = = 0); / / while (P1! = 0xff) is waiting for the key to be released

  else if(p1_1==0) count=count10; while(p1_1==0);

  else if(p1_2==0) count=count1; while(p1_2==0);

Else if (p1_3 = = 0) count = 0; while (p1_3 = = 0); / / calculate zero clearing

Else if (p1_4 = = 0) break; / / confirm to start weighing

  p1_7=0;

If (count > 255) count = 0; / / the counter range is 0 255g, and will be cleared automatically

  a=count;

Display (a); / / call the display function

  

/ * - judge whether the weighing is sufficient and display-*/

  while(1)

Weight = P3; / / obtain the weighing data from port P3

  if(weight

Else p1_7 = 0; / / P1.7 set the low position to stop the motor

  display(weight*5);

If (p1_3 = = 0) while (p1_3 = = 0); break; / / clear the calculation and end the weighing

  

  

/ * ----------------- delay subroutine -------------------------------------------- * / void delay (unsigned int time)

  unsigned int j=0;

  for(;TIme>0;TIme--)

  for(j=0;j

GET IN TOUCH WITH Us
recommended articles
wen
I had a neighbor who had dentures since she was 18. Her own teeth were so crooked and her parents could not afford braces so she had them pulled. She loved her new '...
The suspect in the Pennsylvania police barrack ambush last week was added to the FBI's 10 most wanted list Friday as the search focuses in on the wooded area in the ...
Principle of three-stage dimming of the lamp_How to use TRIAC to dim the LED lamp and how to design the specific scheme? - Programmer SoughtAt present, non-energy-sa...
"To talk about smart grid, Jiangning District has gathered more than 300 enterprises, led by 12 listed enterprises such as NARI Group and Guodian Nanzi, covering the...
What is your policy on bath toys?We only have as many bath toys as can fit in one regular-sized mesh bag on the shower wall. I do not want them taking over the bathr...
Well graphic cards are not cheap, but you will always get ripped by people taking a look at your computer, there's no way around that unless you fix it yourself or h...
No it would not , as a pure black light bulb will not allow the light to come out, and it means it is same when it is on or off. So neither it makes the room lighter...
How to Repair Rain GuttersThis post may contain affiliate links. For more information see our disclosures here . Expert advice on downspout and gutter repairs. Stop ...
(source: Robert Institute of robotics, China)Yaskawa motoman-gp7 is a 6-axis vertical multi joint robot. Because of its combination with the small robot controller "...
Polypropylene and tire powder composite for use in automotive industryIn this work, we study and characterize 20%- and 30%-reinforced rubber tire powder and polyprop...
no data
ADDRESS
Manhatthan
NY 1234 USA
master@weyes.cn
LINKS
Home
Services
Portfolio
Career
Contact us
PRODUCT
Chandelier
Wall Lamp
Table Lamp
Floor Lamp
Contact Us
+86 020-22139352
If you have a question, please contact at contact service@lifisher.com
Copyright © 2025 | Sitemap
Contact us
whatsapp
phone
email
contact customer service
Contact us
whatsapp
phone
email
cancel
Customer service
detect