基于单片机程控滤波放大器增益设计-protues仿真
可以实现20倍、30倍和50倍的放大增益porutes仿真。
#include <AT89X52.h>
#include <intrins.h>
sbit sbF1 = P2 ^ 0; //不进行放大处理
sbit sbF20 = P2 ^ 1; //放大20倍
sbit sbF30 = P2 ^ 2; //放大30倍
sbit sbF50 = P2 ^ 3; //放大50倍
sbit sbDIN = P3 ^ 0; //MAX7219的数据引脚
sbit sbLOAD = P3 ^ 1; //MAX7219的控制引脚
sbit sbCLK = P3 ^ 2; //MAX7219的时钟引脚
//显示缓冲区定义
unsigned char Disp_Buffer[8]= //MAX7219的输出缓冲
{
0,0,0,0,0,0,0,0
};
unsigned char Disp_Buffer1[8]= //MAX7219的输出缓冲
{
0,0,0,0,0,0,0,1
};
unsigned char Disp_Buffer20[8]= //MAX7219的输出缓冲
{
0,0,0,0,0,0,2,0
};
unsigned char Disp_Buffer30[8]= //MAX7219的输出缓冲
{
0,0,0,0,0,0,3,0
};
unsigned char Disp_Buffer50[8]= //MAX7219的输出缓冲
{
0,0,0,0,0,0,5,0
};