Design of multi-channel answering machine based on single chip microcomputer

Publisher:Serendipitous33Latest update time:2016-01-06 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Circuit function:

The circuit can realize the function of 9-way buzzer. After one person presses it, it will be invalid for others to press it. They need to be reset before they can answer again.

The following figure is a Proteus simulation diagram:

Design of multi-channel answering machine based on single chip microcomputer
The following figure is the schematic diagram:

Design of multi-channel answering machine based on single chip microcomputer

The following figure is the PCB diagram:

Design of multi-channel answering machine based on single chip microcomputer

The picture below is a real picture, taken with a mobile phone, so it is not very clear

Design of multi-channel answering machine based on single chip microcomputer

The following is the source program:

#include
#define uint unsigned int
#define uchar unsigned char
uchar code table[]={             //Nude tube coding without decimal point
0xc0,0xf9,0xa4,0xb0,
0x99,0x92,0x82,0xf8,
0x80,0x90};
uchar num;
sbit beep=P3^6;
sbit k1=P1^0;
sbit k2=P1^1;
sbit k3=P1^2;
sbit k4=P1^3;
sbit k5=P1^4;
sbit k6=P1^5;
sbit k7=P1^6;
sbit k8=P1^7;
sbit k9=P3^0;
void keyscan();
void delay(uint z)
{
 uint x,y;
 for(x=z;x>0;x--)
 for(y=5000;y>0;y--);
}

 

void main()
{
 while(1)
 {
  keyscan();
 }
}

 


void keyscan()

 P0=0xc0;
 P2=0xfe;
 if(k1==0)
 {
  beep=0;
  delay(5);
  beep=1;
  P0=table[1];
  delay(10000);
 }
 else if( k2==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[2];
  delay(10000);
 }
 else if(k3==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[3];
  delay(10000);
 }
 else if(k4==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[4];
  delay(10000) ;
 }
 else if(k5==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[5];
  delay(10000);
 }
 else if(k6==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[6];
  delay(10000);
 }
 else if(k7==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[7] ;
  delay(10000);
 }
 else if(k8==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[8];
  delay(10000);
 }
 else if(k9==0)
 
  beep=0;
  delay(5);
  beep=1;
  P0=table[9];
  delay(10000);
 }

Reference address:Design of multi-channel answering machine based on single chip microcomputer

Previous article:Super Flowing Light Made by Single Chip Microcomputer
Next article:Design of DS18B20 Thermometer Based on Single Chip Microcomputer

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号