蓝桥杯单片机第七届国赛题目-电压、频率采集设备

文章目录

  • 题目
  • 要点
  • 文件树
  • 代码
    • init.c
    • main.c
    • ds1302.c
    • iic.c
    • init.h
    • type.h

题目

要点

  1. 选取数码管闪烁
    蓝桥杯单片机第七届国赛题目-电压、频率采集设备_第1张图片
  2. NE555初始化和检测检测

蓝桥杯单片机第七届国赛题目-电压、频率采集设备_第2张图片

  1. 矩阵按键
    蓝桥杯单片机第七届国赛题目-电压、频率采集设备_第3张图片
    其他应该就没有什么难点了,很常规这套题,只不过就是题没说清楚开机的时候应该处于什么状态,这里我默认就是时钟显示状态了

文件树

蓝桥杯单片机第七届国赛题目-电压、频率采集设备_第4张图片

代码

init.c

#include "init.h"

uchar code table[4][4] = {
     0,1,1,1, 1,0,1,1, 1,1,0,1, 1,1,1,0};
void SL(uchar _dev, uchar _data)
{
     
  P0=_data;SEL(_dev);
}
void Timer1Init(void)		//2毫秒@12.000MHz
{
     
	AUXR |= 0x40;		//定时器时钟1T模式
	TMOD &= 0x0F;		//设置定时器模式
	TL1 = 0x40;		//设置定时初值
	TH1 = 0xA2;		//设置定时初值
	TF1 = 0;		//清除TF1标志
	TR1 = 1;		//定时器1开始计时
 ET1 = 1;
 EA = 1;
}
void BF(_0, _1, _2, _3, 
        _4, _5, _6, _7)
{
     
 buf[0] = _0; buf[1] = _1; buf[2] = _2; buf[3] = _3;
 buf[4] = _4; buf[5] = _5; buf[6] = _6; buf[7] = _7;
}
uchar FR(float _data, uchar _dig)
{
     
 uint i = 1;
 while(_dig--)
 {
     
  i = i * 10;
 }
 return((uint)_data/i%10);
}
//uchar LedChange(uchar _data, uchar _dig, uchar _en)
//{
     
// if(_en == 1)
// {
     
//  _data &= ~(1 << _dig);
// }
// else if(_en == 0)
// {
     
//  _data |= (1 << _dig);
// }
// else
// {
     
//  _data ^= (1 << _dig);
// }
// SL(4, _data);
// return _data;
//}

void Run(t_delay* time)
{
     
 if(time->cnt++ < time->max);
 else
 {
     
  time->cnt = 0; 
  time->ok = 1;
 }
}

void NE555Init()
{
     
 AUXR |= 0x80;
 TMOD |= 0x05;
}

void NE555Read()
{
     
 if(delay_500.ok == 0)
 {
     
  TH0 = 0; TL0 = 0; TR0 = 1;
  delay_500.ok = 2;
 }
 if(delay_500.ok == 1)
 {
     
  delay_500.ok = 0;
  delay_500.cnt = 0;
  TR0 = 0;
  neVal = ((uint)TH0<<8) | TL0;
 }
}

uchar GetKey()
{
     
 uchar i;
 C1 = 1; C2 = 1;
 for(i = 0; i < 4; i++)
 {
     
  R1 = table[i][0];R2 = table[i][1];
  R3 = table[i][2];R4 = table[i][3];
  if(C1 == 0) return(2*i + 1);
  if(C2 == 0) return(2*i + 2);
 }
 //!!!!!!!
 return 0;
}

main.c

#include "init.h"

enum{
     LED=4,EXT,SEL,CODE};
uchar ledData = 0xff;

//显示
uchar buf[8];
uchar code CA[] = {
     0xc0, 0xf9, 0xa4, 0xb0, 0x99,
                   0x92, 0x82, 0xf8, 0x80, 0x90,
                   0xff, 0xbf};
uchar curDig = 0;
//按键
enum{
     KS_GT,KS_AS,KS_WA}keyState = KS_GT;
uchar key = 0, tmpKey = 0, keyCnt = 0;
                   
//变量
t_delay delay_200 = {
     200, 0, 0};    
t_delay delay_500 = {
     500, 0, 0};
t_delay delay_250 = {
     250, 0, 0};
uint neVal;
uint hlv[] = {
     2000,1000};
uchar chlv[] = {
     (2000 >> 8), 2000, (1000 >> 8), 1000};
uchar timeDig = 250;
uchar volDig = 250;
uchar freDig = 0;     
uchar leiXing = 0;
uchar cxDig = 0;
uchar storetime[3] = {
     12, 12, 12};

//状态
enum{
     S_TIME, S_VOL, S_FRE, S_CX}gloSta = S_TIME;

void Timer1Handle() interrupt 3
{
     
 SL(CODE, 0xff); SL(SEL, 1<<curDig); SL(CODE, CA[buf[curDig]]);
 curDig = (curDig + 1)%8;
 //按键
 switch(keyState)
 {
     
  case KS_GT:
   keyCnt = 0; tmpKey = GetKey(); keyState = KS_AS;
  break;
  case KS_AS:
   if(keyCnt++ < 10);
   else if(tmpKey == GetKey())
   {
     
    if(key != tmpKey)
    {
     
     key = tmpKey;
     keyState = KS_WA;
    }
    else
     keyState = KS_GT;
   }
   else
   {
     
    keyState = KS_GT;
   }
  break;
 }
 //计时
 Run(&delay_200);
 if(delay_500.ok == 2)
 Run(&delay_500);
 Run(&delay_250);
}
//显示处理
void DisProcess()
{
     
 switch(gloSta)
 {
     
  //如果是时钟状态
  case S_TIME:
   //如果在时钟显示,则直接显示
   if(timeDig == 250)
   BF(FR(time[2], 1), FR(time[2], 0),F_SEP,
      FR(time[1], 1),FR(time[1], 0),F_SEP,FR(time[0], 1),FR(time[0], 0));
   //否则是在时钟设置状态
   else
   {
     
    //500ms闪烁
    if(delay_250.ok == 1)
    {
     
     delay_250.ok = 0;
     //根据设置的具体位置决定闪烁在哪
     switch(timeDig)
     {
     
      case 0:
       if(buf[0] == F_C)
       BF(FR(time[2], 1), FR(time[2], 0),F_SEP,
          FR(time[1], 1),FR(time[1], 0),F_SEP,FR(time[0], 1),FR(time[0], 0));
       else
       BF(F_C, F_C,F_SEP,
          FR(time[1], 1),FR(time[1], 0),F_SEP,FR(time[0], 1),FR(time[0], 0));
      break;
      
      case 1:
       if(buf[3] == F_C)
       BF(FR(time[2], 1), FR(time[2], 0),F_SEP,
          FR(time[1], 1),FR(time[1], 0),F_SEP,FR(time[0], 1),FR(time[0], 0));
       else
       BF(FR(time[2], 1), FR(time[2], 0),F_SEP,
          F_C,F_C,F_SEP,FR(time[0], 1),FR(time[0], 0));
      break;
      
      case 2:
       if(buf[6] == F_C)
       BF(FR(time[2], 1), FR(time[2], 0),F_SEP,
          FR(time[1], 1),FR(time[1], 0),F_SEP,FR(time[0], 1),FR(time[0], 0));
       else
       BF(FR(time[2], 1), FR(time[2], 0),F_SEP,
          FR(time[1], 1),FR(time[1], 0),F_SEP,F_C,F_C);
      break;
     }
    }
   }
  break;
   
 case S_VOL:
   if(volDig == 250)
    BF(F_SEP, 1,F_SEP,
       F_C,FR(adcVal, 3),FR(adcVal, 2),FR(adcVal, 1),FR(adcVal, 0));
   //如果是电压触发阈值设置
   else
   {
     
    if(delay_250.ok == 1)
    {
     
     delay_250.ok = 0;
     //根据设置的位置闪烁
     switch(volDig)
     {
     
      case 0:
       if(buf[0] == F_C)
        BF(FR(hlv[0], 3), FR(hlv[0], 2),FR(hlv[0], 1),FR(hlv[0], 0),
          FR(hlv[1], 3), FR(hlv[1], 2),FR(hlv[1], 1),FR(hlv[1], 0));
       else
        BF(F_C, F_C,F_C,F_C,
          FR(hlv[1], 3), FR(hlv[1], 2),FR(hlv[1], 1),FR(hlv[1], 0));
      break;
      
      case 1:
       if(buf[4] == F_C)
        BF(FR(hlv[0], 3), FR(hlv[0], 2),FR(hlv[0], 1),FR(hlv[0], 0),
          FR(hlv[1], 3), FR(hlv[1], 2),FR(hlv[1], 1),FR(hlv[1], 0));
       else
        BF(FR(hlv[0], 3), FR(hlv[0], 2),FR(hlv[0], 1),FR(hlv[0], 0),
           F_C, F_C,F_C,F_C);
      break;
          
    }
   }
  }
  break;
  case S_FRE:
   if(freDig == 0)
   BF(F_SEP, 2, F_SEP,FR(neVal, 4),
      FR(neVal, 3), FR(neVal, 2),FR(neVal, 1),FR(neVal, 0));
   //如果是周期显示,则显示周期
   else if(freDig == 1)
   {
     
    float m;
    m = 1000000/neVal; //周期
    BF(F_SEP, 2, F_SEP,FR(m, 4),
       FR(m, 3), FR(m, 2),FR(m, 1),FR(m, 0));
   }
  break;
  case S_CX:
   //如果是查询状态
   if(cxDig == 0)
    BF(F_C, F_C, F_C,F_C,
       F_C, F_C,FR(leiXing, 1),FR(leiXing, 0));
   else if(cxDig == 1)
   {
     
    BF(FR(storetime[2], 1), FR(storetime[2], 0), F_SEP,
       FR(storetime[1], 1), FR(storetime[1], 0), F_SEP,
       FR(storetime[0], 1), FR(storetime[0], 0));
   }
  break;
 }
}

//传感器
void SensorProcess()
{
     
  if(delay_200.ok == 1)
  {
     
   static uchar chufa = 1;
   delay_200.ok = 0;
   //如果没有设置时间才读取ds1302
   if(timeDig == 250)
   Time_Read();
   adcVal = Adc_Read(0x43, 250);
   //如果大于阈值并且没有触发
    if((adcVal > hlv[0]) && (chufa == 0))
    {
     
     chufa = 1;
     leiXing = 1;
     //存一次失败了,多加了一次
     memcpy(storetime, time, 3);
     Code_Write(1, &leiXing, 1);
     Code_Write(2, storetime, 3);
     Code_Write(1, &leiXing, 1);
     Code_Write(2, storetime, 3);
    }
    //如果小于阈值且之前没有触发
    else if((adcVal < hlv[1]) && (chufa == 0))
    {
     
     chufa = 2;
     leiXing = 0;
     memcpy(storetime, time, 3);
     Code_Write(1, &leiXing, 1);
     Code_Write(2, storetime, 3);
     Code_Write(1, &leiXing, 1);
     Code_Write(2, storetime, 3);
    }
    //如果已经触发,且处于正常状态
    if((adcVal < hlv[0]) && ((chufa == 1) || (chufa == 2)) && (adcVal > hlv[1]))
    chufa = 0;
  }
}
//按键处理
void keyProcess()
{
     
 if(key == 3)
 {
     
  gloSta = S_VOL;//电压
 }
 if(key == 1)
 {
     
  gloSta = S_TIME;//时钟
 }
 if(key == 5)
 {
     
  gloSta = S_FRE;//频率
  freDig = 0;
 }
 if(key == 6)
 {
     
  gloSta = S_CX; //查询
  cxDig = 0;
 }
 switch(gloSta)
 {
     
  case S_TIME:
   if(key == 7)
   {
     
    //如果是时钟状态,按下功能按键,则开始设置时间,而设置时间是根据timeDig来的
    if(timeDig == 250)
     timeDig = 0;
    else
    timeDig = (timeDig + 1)%3;
   }
   else if(key == 1)
   {
     
    //如果在设置状态按下时钟,保存时钟,并且开始时钟状态
    TimeInit(time[2],time[1],time[0]);
    timeDig = 250;
   }
   else if(key == 2)
   {
     
    //对相应的时钟位置+1
    switch(2-timeDig)
    {
     
     case 0:
       if(time[0] < 59)
        time[0] = time[0] + 1;
     break;
     case 1:
       if(time[1] < 59)
        time[1] = time[1] + 1;
     break;
     
     case 2:
       if(time[2] < 23)
        time[2] = time[2] + 1;
     break;
    }
   }
   else if(key == 4)
   {
     
    //对相应的时钟位置-1
    switch(2-timeDig)
    {
     
     case 0:
       if(time[0] > 0)
        time[0] = time[0] - 1;
     break;
     case 1:
       if(time[1] > 0)
        time[1] = time[1] - 1;
     break;
     
     case 2:
       if(time[2] > 0)
        time[2] = time[2] - 1;
     break;
    }
   }
   /****************下面的按键基本同理************************/
  break;
  case S_VOL:
   if(key == 7)
   {
     
    if(volDig == 250)
     volDig = 0;
    else
    volDig = (volDig + 1)%2;
   }
   else if(key == 3)
   {
     
    chlv[0] = (hlv[0] >> 8);
    chlv[1] = hlv[0];
    chlv[2] = (hlv[1] >> 8);
    chlv[3] = hlv[1];  
    Code_Write(0, chlv, 4);
    volDig = 250;
   }
   else if(key == 2)
   {
     
    switch(volDig)
    {
     
     case 0:
       if(hlv[0] < 5000)
        hlv[0] = hlv[0] + 500;
     break;
     case 1:
       if(hlv[1] < 5000)
        hlv[1] = hlv[1] + 500;
     break;
    }
   }
   else if(key == 4)
   {
     
    switch(volDig)
    {
     
     case 0:
       if(hlv[0] > 0)
        hlv[0] = hlv[0] - 500;
     break;
     case 1:
       if(hlv[1] > 0)
        hlv[1] = hlv[1] - 500;
     break;
    }
   }
  break;
  case S_FRE:
   if(key == 7)
   freDig = (freDig + 1)%2;
  break;
  case S_CX:
   if(key == 7)
   cxDig = (cxDig + 1)%2;
  break;
 }
}
void main()
{
     
 //初始化
  uchar tmpVal[3];
  BPOFF;RLOFF;
  SL(LED, 0xff);
  Timer1Init();
  memset(buf, F_C, 8);
  NE555Init();
  TimeInit(23,59,55);
//  Code_Write(0, chlv, 4);
//  Code_Write(1, &leiXing, 1);
//  Code_Write(2, storetime, 3);
 //读取eeprom中保存的数据
  Code_Read(0, chlv, 4);
  hlv[0] = ((uint)chlv[0] << 8) | chlv[1];
  hlv[1] = ((uint)chlv[2] << 8) | chlv[3]; 
  Code_Read(1, &tmpVal, 1);
  Code_Read(1, &leiXing, 1);
  while(tmpVal[0] != leiXing)
  {
     
   Code_Read(1, &tmpVal, 1);
   Code_Read(1, &leiXing, 1);
  }
  Code_Read(1, &storetime, 3);
  Code_Read(1, &tmpVal, 3);
  while(memcmp(storetime, tmpVal, 3) != 0)
  {
     
   Code_Read(1, &storetime, 3);
   Code_Read(1, &tmpVal, 3);
  }
  Code_Read(2, storetime, 3);
  while(1)
  {
     
   NE555Read(); 
   DisProcess();
   SensorProcess();
   if(keyState == KS_WA)
   {
     
    keyProcess();
    keyState = KS_GT;
   }
  }
}

ds1302.c

/*
  程序说明: DS1302驱动程序
  软件环境: Keil uVision 4.10 
  硬件环境: CT107单片机综合实训平台 8051,12MHz
  日    期: 2011-8-9
*/

#include 
#include 
#include "type.h"

sbit SCK=P1^7;		
sbit SDA=P2^3;		
sbit RST = P1^3;   // DS1302复位												

uchar time[3];

void Write_Ds1302(unsigned  char temp) 
{
     
	unsigned char i;
	for (i=0;i<8;i++)     	
	{
      
		SCK=0;
		SDA=temp&0x01;
		temp>>=1; 
		SCK=1;
	}
}   

void Write_Ds1302_Byte( unsigned char address,unsigned char dat )     
{
     
 	RST=0;	_nop_();
 	SCK=0;	_nop_();
 	RST=1; 	_nop_();  
 	Write_Ds1302(address);	
 	Write_Ds1302(dat);		
 	RST=0; 
}

//unsigned char Read_Ds1302_Byte ( unsigned char address )
//{
     
// 	unsigned char i,temp=0x00;
// 	RST=0;	_nop_();
// 	SCK=0;	_nop_();
// 	RST=1;	_nop_();
// 	Write_Ds1302(address);
// 	for (i=0;i<8;i++) 	
// 	{		
//		SCK=0;
//		temp>>=1;	
// 		if(SDA)
// 		temp|=0x80;	
// 		SCK=1;
//	} 
// 	RST=0;	_nop_();
// 	SCK=0;	_nop_();
//	SCK=1;	_nop_();
//	SDA=0;	_nop_();
//	SDA=1;	_nop_();
//	return (temp);			
//}


uchar Ds1302_Read()
{
     
 unsigned char i,temp=0x00;
  	for (i=0;i<8;i++) 	
 	{
     		
		SCK=0;
		temp>>=1;	
 		if(SDA)
 		temp|=0x80;	
 		SCK=1;
	}
  return (temp);
}

uchar covert(uchar _data)
{
     
 return(_data = ((_data/10%10) << 4) | (_data%10));
}
uchar covertback(uchar _data)
{
     
 return((_data >> 4)*10 + (_data & 0x0f));
}
void TimeInit(uchar _h, uchar _m, uchar _s)
{
     
 uchar i;
 _h = covert(_h);
 _m = covert(_m);
 _s = covert(_s);
 Write_Ds1302_Byte(0x8e, 0);
 RST=0;	_nop_();
 SCK=0;	_nop_();
 RST=1; 	_nop_();  
 Write_Ds1302(0xbe);	
 Write_Ds1302(_s);
 Write_Ds1302(_m);
 Write_Ds1302(_h);
 i = 5;
 while(i--)
 {
     
  Write_Ds1302(0);
 }		
 RST=0; 
 Write_Ds1302_Byte(0x8e, 0x80);
}
void Time_Read()
{
     
 uchar i;
 Write_Ds1302_Byte(0x8e, 0);
 RST=0;	_nop_();
 SCK=0;	_nop_();
 RST=1;	_nop_();
 Write_Ds1302(0xbf);
 for(i = 0; i < 3; i++)
 {
      
  time[i] = Ds1302_Read();
 }
 time[2] = covertback(time[2]);
 time[1] = covertback(time[1]);
 time[0] = covertback(time[0]);
 RST=0;	_nop_();
 SCK=0;	_nop_();
 SCK=1;	_nop_();
	SDA=0;	_nop_();
	SDA=1;	_nop_();
 Write_Ds1302_Byte(0x8e, 0x80);
}

iic.c

/*
  程序说明: IIC总线驱动程序
  软件环境: Keil uVision 4.10 
  硬件环境: CT107单片机综合实训平台 8051,12MHz
  日    期: 2011-8-9
*/

#include "reg52.h"
#include "intrins.h"
#include "type.h"
#define DELAY_TIME 5

#define SlaveAddrW 0xA0
#define SlaveAddrR 0xA1

//总线引脚定义
sbit SDA = P2^1;  /* 数据线 */
sbit SCL = P2^0;  /* 时钟线 */

float adcVal;
void IIC_Delay(unsigned char i)
{
     
    do{
     _nop_();}
    while(i--);        
}
//总线启动条件
void IIC_Start(void)
{
     
    SDA = 1;
    SCL = 1;
    IIC_Delay(DELAY_TIME);
    SDA = 0;
    IIC_Delay(DELAY_TIME);
    SCL = 0;	
}

//总线停止条件
void IIC_Stop(void)
{
     
    SDA = 0;
    SCL = 1;
    IIC_Delay(DELAY_TIME);
    SDA = 1;
    IIC_Delay(DELAY_TIME);
}

//发送应答
void IIC_SendAck(bit ackbit)
{
     
    SCL = 0;
    SDA = ackbit;  					// 0:应答,1:非应答
    IIC_Delay(DELAY_TIME);
    SCL = 1;
    IIC_Delay(DELAY_TIME);
    SCL = 0; 
    SDA = 1;
    IIC_Delay(DELAY_TIME);
}

//等待应答
bit IIC_WaitAck(void)
{
     
    bit ackbit;
	
    SCL  = 1;
    IIC_Delay(DELAY_TIME);
    ackbit = SDA;
    SCL = 0;
    IIC_Delay(DELAY_TIME);
    return ackbit;
}

//通过I2C总线发送数据
void IIC_SendByte(unsigned char byt)
{
     
    unsigned char i;

    for(i=0; i<8; i++)
    {
     
        SCL  = 0;
        IIC_Delay(DELAY_TIME);
        if(byt & 0x80) SDA  = 1;
        else SDA  = 0;
        IIC_Delay(DELAY_TIME);
        SCL = 1;
        byt <<= 1;
        IIC_Delay(DELAY_TIME);
    }
    SCL  = 0;  
}

//从I2C总线上接收数据
unsigned char IIC_RecByte(void)
{
     
    unsigned char i, da;
    for(i=0; i<8; i++)
    {
        
    	SCL = 1;
	IIC_Delay(DELAY_TIME);
	da <<= 1;
	if(SDA) da |= 1;
	SCL = 0;
	IIC_Delay(DELAY_TIME);
    }
    return da;    
}


float Adc_Read(uchar _addr, uchar _data)
{
     
 uchar tmpVal;
 IIC_Start();
 IIC_SendByte(0x90);
 IIC_WaitAck();
 IIC_SendByte(_addr);
 IIC_WaitAck();
 IIC_SendByte(_data);
 IIC_WaitAck();
 IIC_Stop();
 IIC_Start();
 //adc的读特殊一点
 IIC_SendByte(0x91);
 IIC_WaitAck();
 tmpVal = IIC_RecByte();
 IIC_SendAck(0);
 return((float)IIC_RecByte()*1000/51.0);
}
void Code_Write(uchar _addr, uchar* _data, uchar _dig)
{
     
 IIC_Start();
 IIC_SendByte(0xa0);
 IIC_WaitAck();
 IIC_SendByte(_addr*8);
 IIC_WaitAck();
 while(_dig--)
 {
     
  IIC_SendByte(*_data++);
  IIC_WaitAck();
 }
 IIC_Stop();
}
void Code_Read(uchar _addr, uchar* _data, uchar _dig)
{
     
 IIC_Start();
 IIC_SendByte(0xa0);
 IIC_WaitAck();
 IIC_SendByte(_addr*8);
 IIC_WaitAck();
 IIC_Start();
 IIC_SendByte(0xa1);
 IIC_WaitAck();
 _dig--;
 while(_dig--)
 {
     
  *_data++ = IIC_RecByte();
  IIC_SendAck(0);
 }
 *_data++ = IIC_RecByte();
 IIC_Stop();
}

init.h

#ifndef _INIT_H
#define _INIT_H

#include "stc15f2k60s2.h"
#include "stdio.h"
#include "string.h"
#include "intrins.h"
#include "type.h"

#define SEL(x) P2=P2&0x1f|x<<5; P2=P2&0x1f
sbit BP=P0^6; sbit RL=P0^4;
sbit C1 = P4^4; sbit C2 = P4^2;
sbit R1 = P3^0; sbit R2 = P3^1; sbit R3 = P3^2; sbit R4 = P3^3;
#define BPON BP=1;SEL(5)
#define RLON RL=1;SEL(5)  
#define BPOFF BP=0;SEL(5)
#define RLOFF RL=0;SEL(5)
#define F_C 10
#define F_SEP 11

typedef struct delay
{
     
 uint max;
 uint cnt;
 uchar ok;
}t_delay;

extern uchar buf[8];
extern t_delay delay_500;
extern uint neVal;
extern uchar time[3];
extern float adcVal;




//函数
void SL(uchar _dev, uchar _data);
void Timer1Init(void);  
void BF(_0, _1, _2, _3, 
        _4, _5, _6, _7);
uchar FR(float _data, uchar _dig);
//uchar LedChange(uchar _data, uchar _dig, uchar _en);
void Run(t_delay* time);
void NE555Init();
void NE555Read();
void TimeInit(uchar _h, uchar _m, uchar _s);
void Time_Read();
float Adc_Read(uchar _addr, uchar _data);
uchar GetKey();
void Code_Read(uchar _addr, uchar* _data, uchar _dig);
void Code_Write(uchar _addr, uchar* _data, uchar _dig);
#endif

type.h

#ifndef _TYPE_H
#define _TYPE_H

#define uchar unsigned char
#define uint unsigned int
  
#endif

蓝桥杯单片机第七届国赛题目-电压、频率采集设备_第5张图片

你可能感兴趣的:(蓝桥杯单片机,单片机,蓝桥杯,第七届,国赛,电压-频率)