当前位置:网站首页>Proteus simulation based on 51 MCU ADC0808
Proteus simulation based on 51 MCU ADC0808
2022-07-29 08:11:00 【Half life fireworks I blurred】
Use ADC0808 Of IN0 passageway , Input CLOCK by 500KHZ, use AT89C51 Single chip microcomputer
ADC0808 Of ADDA、ADDB、ADDC by 000 Corresponding channel IN0
ADC0808 Of ADDA、ADDB、ADDC by 001 Corresponding channel IN1
ADC0808 Of ADDA、ADDB、ADDC by 010 Corresponding channel IN2 Push in .
START and ALE You can share one I/O mouth , They are synchronized .
In this paper IN0 Channel so ADDA、ADDB、ADDC Direct ground .
Nixie tube displays some codes , Digital tube adopts common cathode display
#include <REGX52.H>
#include "Delay.h"
sbit we1=P3^0;
sbit we2=P3^1;
sbit we3=P3^2;
sbit we4=P3^3;
// Common cathode nixie tube segment code table
unsigned char NixieTable[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
// Nixie tube display sub function
void Nixie(float num)
{
unsigned int x,y,z,f;
x=num/1000;// Take out every bit value of voltage
y=(unsigned int)num%1000/100;//(unsigned int) Floating point cast to integer data display
z=(unsigned int)num%100/10;
f=(unsigned int)num%10;
we1=0;
P0=NixieTable[x]+0x80; // Show decimal point and 1 v
Delay(1);
we1=1;
P0=0x00;
we2=0;
P0=NixieTable[y]; // Segment code output
Delay(1); // Show for a period of time
we2=1;
P0=0x00; // Segment code clear 0, Shadow elimination
we3=0;
P0=NixieTable[z]; // Segment code output
Delay(1); // Show for a period of time
we3=1;
P0=0x00; // Segment code clear 0, Shadow elimination
we4=0;
P0=NixieTable[f]; // Segment code output
Delay(1); // Show for a period of time
we4=1;
P0=0x00; // Segment code clear 0, Shadow elimination
}
ADC0808 Convert code
#include <REGX52.H>
#include <Delay.h>
sbit ST=P2^0;
sbit EOC=P2^1;
sbit OE=P2^2;
unsigned int readDAC0808()
{
unsigned int ADC_NUM;
ST=1;// Empty ADC0808 Internal register value of
Delay(1);
ST=0;// The falling edge begins AD transformation
while(EOC==0);// Judge whether the conversion is over
OE=1;
ADC_NUM=P1;// receive data
return ADC_NUM;
}Main function code
#include <REGX52.H>
#include <Delay.h>
#include <Nixie.h>
#include <DAC0808.h>
void main()
{
float num;
while(1)
{
num=readDAC0808()*(5.0/255)*1000;// Read DAC0808 The conversion value of , And convert binary numbers into voltage values
Nixie(num);// The nixie tube shows
}
}As it is the first time to create, I am not proficient yet. It is only for beginners' reference

边栏推荐
- "Swiss Army Knife" -nc in network tools
- [beauty of software engineering - column notes] 22 | how to do a good job in technology selection for the project?
- Dynamic Thresholds Buffer Management in a Shared Buffer Packet Switch论文总结
- Nrf52832-qfaa Bluetooth wireless chip
- Stm32ff030 replaces domestic MCU dp32g030
- Unity beginner 1 - character movement control (2D)
- Taiyuan bus route crawling
- Use the cloud code to crack the problem of authentication code encountered during login
- [robomaster] a board receives jy-me01 angle sensor data -- Modbus Protocol & CRC software verification
- UE4 highlight official reference value
猜你喜欢

Random lottery turntable wechat applet project source code

Solving linear programming problems based on MATLAB
![[密码学实验] 0x00 安装NTL库](/img/2a/03d95082a2a63238b475b3f7f3e13d.png)
[密码学实验] 0x00 安装NTL库

Character shader exercise

Matrix decomposition and gradient descent

Useful websites
![[cryptography experiment] 0x00 install NTL Library](/img/2a/03d95082a2a63238b475b3f7f3e13d.png)
[cryptography experiment] 0x00 install NTL Library

Simple calculator wechat applet project source code

Autojs微信研究:微信自动发送信息机器人最终成品(有效果演示)

Compare three clock circuit schemes of single chip microcomputer
随机推荐
Very practical shell and shellcheck
【学术相关】为什么很多国内学者的AI的论文复现不了?
[cryoelectron microscope | paper reading] emclarity: software for high-resolution cryoelectron tomography and sub fault averaging
Arduino uno error analysis avrdude: stk500_ recv(): programmer is not responding
STM32 printf problem summary semihosting microlib understanding
Implementation of simple cubecap+fresnel shader in unity
Security baseline of network security
What is Amazon self support number and what should sellers do?
Alibaba political commissar system - Chapter III, Alibaba political commissar and cultural docking
A problem encountered in SQL interview
Nrf52832-qfaa Bluetooth wireless chip
产品推广的渠道和策略,化妆品品牌推广方法及步骤
V-Ray 5 acescg workflow settings
Crawl notes
Preparation of SQL judgment statement
Tcp/ip five layer reference model and corresponding typical devices and IPv6
[note] the art of research (understand the importance of the problem)
In an SQL file, a test table and data are defined above, and you can select* from the test table below
Matrix decomposition and gradient descent
[memo] summary of the reasons why SSH failed? Remember to come next time.