8位数码管软件译码 四位数码管译码器 - 电脑|办公 - 电脑办公-杀毒安全-网络-V3学习网
微商网
 
 
导航:首页 |电脑|办公|正文

8位数码管软件译码 四位数码管译码器

时间:2021-04-29 10:40:26
51制作8位数码管电路接线图 library ieee; use ieee std_logic_1164 all; use ieee std_logic_arith all; use ieee std
作者:

8位数码管软件译码

51制作8位数码管电路接线图

library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity ymq is port ( num:in std_logic_vector(3 downto 0); dout:out std_logic_vector(6 downto 0) ); end ymq; architecture a1 of ymq is begin with num select dout"0110000" when "0001", "1101101" when "0010", "1111001" when "0011", "0110011" when "0100", "1011011" when "0101", "1011111" when "0110", "1110000" when "0111", "1111111" when "1000", "1111011" when "1001", "0000000" when others; end a1;

如何使用一个4位8段数码管一个时钟程序?显示时分秒的那种

正文 基于单片机的数字时钟 摘要 近年来随着计算机在社会领域的渗透和大规模集成电路的发展,单片机的应用正在不断地走向深入,由于它具有功能强,体积小,功耗低,价格便宜,工作可靠,使用方便等特点,因此特别适合于与控制有关的系统,越来越广泛地应用于自动控制,智能化仪器,仪表,数据采集,军工产品以及家用电器等各个领域,单片机往往是作为一个核心部件来使用,在根据具体硬件结构,以及针对具体应用对象特点的软件结合,以作完善。

数子时钟在日常生活中最常见,应用也最广泛。

本次做的数子时钟是以单片机(AT89C51)为核心,结合相关的元器件(共阴极LED数码显示器、BCD –七段译码/驱动器74LS48等),再配以相应的软件,达到制作简易数子时钟的目的,文章的核心主要从硬件设计和软件编程两个大的方面。

硬件电路设计主要包括中央处理单元电路、数码显示电路、人机接口电路等几部分组成,软件用汇编语言来实现。

其硬件部分难点在于元器件的选择、布局及焊接。

关键词:单片机 AT89C51 共阴极LED数码显示器 BCD-七段译码/驱动器74LS48 中断 定时 Abstract: Recent years , the use of singlechip is moving toward deeply with the filter of computer in the society and the development of the large scale integrated circuit. Singlechip is especially equal to the system relation to the control because of its strong funtion 、samll volume、low power consumption、inexpensive price、credibility work and its handy.it is used in the area of automata 、 Intelligent instrument、appearance、data acquisition、production of war industry 、domestic appliance and so on.the singlechip is used usually as the centerpiece,It can be perfect bases the specific Hardware infrastructureand aim at the integrated hardware and software device of the specific complexion. The digital clock is the most familiar and widespread in the applications.The singlechip is the hardcore in the digital clock made in this time ,the digital clock can reach the purpose of facility digital clock with the correlation parts of an apparatus(common cathode LED nixie display 、BCD- seven-segment decoder/ drivers74LS48 and so on) and the correspondence software。

The heart of the article has two parts :the hardware design and software programmer. the hardware design includes central processing cell circuit、numeral show circuit 、man-machine interface circuit and so on. Software is come true with assemble language。

The difficulty of the hardware design is the choosen of the omponent、lay out and solder。

Key term:singlechip、AT89C51、common cathode LED nixie display、BCD- seven-segment decoder/ drivers74LS48、interrupt、timing. 0.引言 数子时钟是采用数字电路实现对时,分,秒,数字显示的计时装置,广泛用于个人家庭,车站, 码头办公室等公共场所,成为人们日常生活中不可少的必需品,由于数字集成电路的发展和石英晶体振荡器的广泛应用,使得数子时钟的精度,远远超过老式钟表, 钟表的数字化给人们生产生活带来了极大的方便,而且大大地扩展了钟表原先的报时功能。

诸如定时自动报警、按时自动打铃、时间程序自动控制、定时广播、自动起闭路灯、定时开关烘箱、通断动力设备、甚至各种定时电气的自动启用等,所有这些,都是以钟表数字化为基础的。

因此,研究数子时钟及扩大其应用,有着非常现实的意义。

1.题目 1.1设计要求 (1)掌握AT89C51实验开发系统中的实验模块原理; (2)综合运用实验模块,用AT89C51开发设计具有一定功能的单片机控制系统,进行软、硬件设计及调试; (3)写出完整的设计任务书:课题的名称、系统的功能、硬件原理图、程序清单、参考资料; (4)为了保证计时的稳定及准确须由晶体振荡器提供表针时间基准信号。

1.2设计目的 (1)巩固、加深和扩大单片机应用的知识面,提高综合及灵活运用所学知识解决工业控制的能力; (2)培养针对课题需要,选择和查阅有关手册、图表及文献资料的自学能力,提高组成系统、编程、调试的动手能力; (3)针对课题设计方案的分析、选择、比较、熟悉单片机所用系统开发、研制的过程,软硬件设计的方法、内容及步骤; (4)掌握数子时钟的工作原理。

2.单片机的组成 单片机是微型机的一个主要分支,在结构上的最大特点是把CPU、存储器、定时器和多种输入/输出接口电路集成在一块超大规模集成电路芯片上。

就其组成和功能而言,一块单片机芯片就是一台计算机。

2.1 单片机的组成 单片机是通过内部总线把计算机的各主要部件接为一体,其内部总线包括地址总线、数据总线和控制总线。

其中,地址总线的作用是在进行数据交换时提供地址,CPU通过它们将地址输出到存储器或I/O接口;/数据总线的作用是在CPU与存储器或I/O接口之间,或存储器与外设之间交换数据;控制总线包括CPU发出的控制信号线和外部送入CPU的应答信号线等。

3.单片机的应用 3.1单片机的应用分类 由于...

如何用VHDL语言设计一个8位数码管动态显示电路?是EDA 实习哎!...

library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;entity dynamic is Port ( clk : in std_logic;reset: in std_logic;din1 : in std_logic_vector(6 downto 0); --译码后的数据信号1din2 : in std_logic_vector(6 downto 0); --译码后的数据信号2din3 : in std_logic_vector(6 downto 0); --译码后的数据信号3din4 : in std_logic_vector(6 downto 0); --译码后的数据信号4shift: out std_logic_vector(3 downto 0); --位选信号bus4 : out std_logic_vector(6 downto 0)); --数据信号end dynamic;architecture Behavioral of dynamic issignal scan_clk:std_logic_vector(1 downto 0);beginprocess(clk,scan_clk,reset) --分频进程variable scan:std_logic_vector(17 downto 0);beginif reset="1" thenscan:="000000000000000000";scan_clkelsif clk"event and clk="1"thenscan:=scan+1;end if;scan_clkend process;process(scan_clk,din1,din2,din3,din4) --扫描进程begincase scan_clk iswhen "00"=>bus4shiftwhen "01"=>bus4shiftwhen "10"=>bus4shiftwhen "11"=>bus4shiftwhen others=>bus4end case;end process; end Behavioral;

用51单片机控制8位数码管显示特定数字,如426721850求程序

[] &nbsp,#7 ;/关显示 CLR MOV R1;50[防止闪烁]D1: MOV R2,#100 DJNZ R2,$ DJNZ R1,D1 RET SEG_TAB: DB 03fh,06H,05BH,04FH,66H,06DH,07DH,07H,07FH,06FH;共阴数码管段码[0~9]WEI_TAB: DB 0FeH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FH; END; &nbsp,#35; CALL JMP LOOP ;;/位码给出 DELAY_1MS; A;COUN_WEI,#0 RET SEG_C MOV &nbsp,A SETB SEG_C [] MOVC A;&nbsp,@R0 MOV 30H;BIT P1;MOV SP,给你参考。

SEG_C /段控制位定义BIT_C MOV DISPLAY_BUFF+1; BIT_C ; LOOP: CALL DISPLAY_0 显示缓存30H-37H; /显示DISPLAY_BUFF(8字节)中的数据DISPLAY_0; MOV DISPLAY_BUFF+7; &nbsp,#4 CLR BIT_C MOV DPTR;SETB /位控制位定义DISPLAY_BUFF EQU MOV DISPLAY_BUFF+6; NOP CLR &nbsp,#0ffh; /显示位存储区 ORG &nbsp,#5 3CH ; //段码给出 COUN_WEI MOV P0;&nbsp,#1 MOV P0; BIT P1; 0000H AJMP MAIN ORG &nbsp,@A+DPTR MOV &nbsp,#WEI_TAB MOV DISPLAY_BUFF+4; MOV A,COUN_WEI ;MOV DISPLAY_BUFF+2: 0100HMAIN;MOV A,COUN_WEI CJNE A,#8;CLR SEG_C&nbsp,#2 &nbsp: ADD A,#DISPLAY_BUFF MOV COUN_WEI; P0,A&nbsp,DISPLAY_0 MOV&nbsp: 【先clr bti—C再做延时】 INC MOV DISPLAY_BUFF; MOV DISPLAY_BUFF+3,#60H&nbsp,COUN_WEI&nbsp,#8 &nbsp,#0;初始化显示缓存 DELAY_1MS; SETB BIT_C nop A,#2 MOV DISPLAY_BUFF+5.5 ;CLR BIT_C &nbsp以下代码不是采用中断方式,并且使用了74HC573.4 ;BIT_C NOP DPTR,#SEG_TAB MOVC A,@A+DPTR MOV R0,A MOV &nbsp,#6&nbsp,8字节COUN_WEI EQU &nbsp

8位数码管怎么显示的!!!!

不知道提问者的电子基础是怎样的。

从最简单的讲,8位数码管可以看成是8个小灯泡(其中一个小灯泡是8后面的小数点)。

比如想显示1,则右侧上下两个小灯泡点亮即可。

按一定顺序,把8个小灯泡编号,比如ABCDEFGH当显示不同的数值,比如从0一直到9(实际上也就是这10个数字反复变化),把显示这十个数字时的小灯泡的编号记下来,也就形成了所谓的“编码”。

在进一步的应用中,只要按之前所记的编码,按某个编码将小灯泡点亮,则显示的一定是对应的那个数字。

...

求用两片74HC595控制8位八段数码管汇编程序!!

/*****************************************************************名称: seg_BaseSend*功能: 发送8bit数据send_code到1个74HC595中*参数: 待发送数据*****************************************************************/void seg_BaseSend(uchar sendByte){uchar i;for(i = 0x00;i {P1_4 = 0x00; //控制移位寄存器P1_3 = sendByte & (0x80 >>i); //数据逐位输入P1_4 = 0x01;}}/*****************************************************************名称: Show*功能: 发送16bit到级联的2个74HC595中*****************************************************************/void Show(){uchar j;scoreMatchup();P1_2 = 0; //控制RCK输出一个锁存信号for(j = 0; j {seg_BaseSend(seg_Array[j]); }P1_2 = 1;}//按你的要求seg_num为2,但可以根据系统的个数来确实数值,seg_Array[]为传送的数组,//汇编就根据这个修改就行了,很简单

大家还关注
阅读排行
推荐阅读