当前位置:网站首页>Tlc549proteus simulation &sallen key filter &ad736vrms to DC conversion &proteus view 51 register value
Tlc549proteus simulation &sallen key filter &ad736vrms to DC conversion &proteus view 51 register value
2022-07-27 11:45:00 【char~lie】
As the title , This blog is about 4 Block content , But it was solved through a small experiment !
It turned out that there was a homework problem that said it should be used 51 and TLC549 Measure the effective value of low-pass voltage , Think about using the effective value to DC transformation , So use the AD736 Chip emulation .
Sallen-Key Low pass filtering principle

Send a letter : It is a second-order low-pass filter 
Parameter selection and circuit connection
A little bit , I don't know whether it's because of simulation or really , Input 1Hz The signal of AD736 It can't be imitated , added 10Hz Just fine , then RC The choice is 1k and 10uF, According to the above formula, it is w0=100(rad/s).
Then enter sine , amplitude 1V, Filter output amplitude 0.7V about , Valid values 0.5V about .
AD736 The connection method of is as above .
From the voltage probe, it really is 0.5V about .
The back is AD736 Output termination AIN,P1.5 Pick up DO,P1.6 Pick up SCK,P1.7 Pick up CS Not , The two capacitors are used for filtering .
The whole circuit is almost like this :
Simulation process and results
use Proteus Looking at registers is simple , Because I'm running in a loop , There is no need to stop at any step , So first click Run at the bottom left , Then click debug (debug) Pause in the drop-down list , Then move the cursor to 8051CPU here :
Choose registers from the things that pop up (Register), Of course, if you want to see others, it's convenient to order others .
The result of the transformation is theoretically 1AH:

The result of conversion is that I exist R6, You can see that the simulation result is the same as the calculation of Yimao , The experiment is finished .
TLC549 sequential
The book says CS You have to wait for two rising edges after pulling down , I believe , The result I made at the beginning was 68H, just 1AH Of 4 times , Because there are two missing 0, Wait for these two rising edges .
Actually CS After pulling down SCK High level direct reading 8 I'll be fine ,CS You need to wait after non lifting 36 A cycle ( The book says, , Maybe not necessarily , But the result is no problem ).
Program
Assembly write timing ratio C convenient ,C Is slightly better than assembly in integration , Of course, what I use here is compilation :
CS BIT P1.7
SCK BIT P1.6
DO BIT P1.5
ORG 0000H
START:SETB CS
CLR SCK
SETB DO
ADC:MOV A,#0
MOV R0,#08H
CLR CS
CLR SCK
LP1:CPL SCK
NOP
MOV C,DO
RLC A
CPL SCK
NOP
DJNZ R0,LP1
SETB CS
MOV R6,A
MOV R0,#48H
LP4:CPL SCK
NOP
DJNZ R0,LP4
AJMP ADC
END
边栏推荐
- 多家银行调整现金管理类理财产品申赎规则:申赎确认时效“T+0”变“T+1”
- MATLAB画带延时系统的伯德图
- Wilcoxon rank-sum 和 signed-rank
- IDEA: Can‘t use Subversion command line client:svn 解决方案
- Can you really write binary search - variant binary search
- 第12章 泛型
- USB 网卡驱动数据流
- compute_class_weight() takes 1 positional argument but 3 were given
- Raw socket grabs packets, and packets on some ports cannot be caught
- C programming language (2nd Edition) -- Reading Notes -- 1.5.3
猜你喜欢

Can you really write binary search - variant binary search

Installation and use of GTEST and gmock

第10章 枚举类与注解

Digital triangle model acwing 1015. Picking flowers

VSCode复制代码时去掉样式/语法高亮/代码高亮/黑色背景

Wilcoxon rank-sum 和 signed-rank

第8章 多线程

Could not load dynamic library ‘libcudnn.so.8‘;

Matlab draws Bode diagram with time delay system

MATLAB画带延时系统的伯德图
随机推荐
[machine learning whiteboard derivation series] learning notes - support vector machine and principal component analysis
局域网SDN硬核技术内幕 24 展望未来——RDMA(中)
日本福岛废堆安全监视协议会认可排海计划“安全”
[machine learning whiteboard derivation series] learning notes --- conditional random fields
torch‘ has no attribute ‘inference_mode‘
美现首例孕妇猴痘病例:新生儿被注射免疫球蛋白,已安全出生
求不同采样周期下的传递函数有限零点
STM32编译出现error: L6235E: More than one section matches selector - cannot all be FIRST/L
Several banks adjusted the redemption rules of cash management financial products: the confirmation time limit of redemption changed from "t+0" to "t+1"
请教大佬们,请问用flink sink数据到mysql有事务控制吗?如果在一个checkpoint时
Ask the big guys, is there transaction control for using flick sink data to MySQL? If at a checkpoint
When std:: bind meets this
Can you really write binary search - variant binary search
多种进制之间的转换
Error encountered in adding quick open option to right-click menu:
检定和校准的区别
IDEA: Can‘t use Subversion command line client:svn 解决方案
Adobe Audition提示 音频输入的采样率与输出设备不匹配——问题解决
LAN SDN hard core technology insider 23 looking forward to the future - RDMA (Part 1)
Matlab S-function详解