Microcontroller › 8051 › Automatic Bidirectional Visitor Counter
- This topic has 14 replies, 9 voices, and was last updated 8 years, 8 months ago by jani.
-
AuthorPosts
-
April 6, 2012 at 12:31 pm #1522SindujaaParticipantI’m currently trying Automatic Bidirectional Visitor Counter project given in your site.I request you to explain the program flow of the C coding given.And also please do let me know asap whether the 7-segment display used here is a Common Anode configuration or a Common Cathode Configuration and whether we can do the project with AT89S52 instead of AT89C51.April 16, 2012 at 6:10 am #7460hari krishnaParticipant
Hi Sindujaa
Displays are common anode.
you can use AT89s52 insted of AT89c51 differences only memory size and one timer added extra in 52.
Regards,
Hari krishna k
April 18, 2012 at 12:32 pm #7477AJISH ALFREDParticipantFrom the circuit, it can be found that the seven segment is switched to +5V using a transistor. So I think it is common anode
September 25, 2012 at 6:26 pm #8610hariom jangidParticipantThere are a problem occuring with up key and down key. If we press up key for few second then counter increse no of visitor.suppose that a men stop at position of up sensor for few second then counter count the many people in room.
October 29, 2012 at 12:04 pm #8699kangibnuParticipantI‘ve tried make visitor counter circuit and successful, and I want to combine it with articel read write eeprom (I tried it and succeeded), but when I try to combine both methods the program does not work, please help, I want to store data in the eeprom at24c16 count, and show on seven segment display,
here the code…
#include<reg51.h>
#include<intrins.h>
#define msec 50
#define lcd_data_str_pin P0
bit ack;
sbit rs = P3^6; //Register select (RS) pin
sbit rw = P3^5; //Read write(RW) pin
sbit en = P3^7; //Enable(EN) pin
sbit sda=P3^1; //sda
sbit scl=P3^0; //sck
sbit led=P1^0;
sbit led1=P1^1;sbit sensor_1=P3^1; //sensor1
int max = 0;
int carry = 0;
int arr[4];
//inisialissi varibel eeprom
unsigned char reead,write,write2,b,k;
unsigned int temp;//
int count_amt[7],j;
unsigned int count_1,count_2;
/*
void delay(int delay_time) // Time delay function
{
int j,k;
for(j=0;j<=delay_time;j++)
for(k=0;k<=1275;k++);
}
*/
void delay(unsigned int count) // Function to provide time delay in msec.
{
int i,j;
for(i=0;i<count;i++)
for(j=0;j<500;j++);
}void lcd_cmd(unsigned char cmd_addr) //Function to send command to LCD
{
lcd_data_str_pin = cmd_addr;
en = 1;
rs = 0;
rw = 0;
delay(1);
en = 0;
return;
}void lcd_data_str(char str[50]) //Function to send string
{
int p;
for (p=0;str[p]!=’