voting | Microcontroller › 8051 › voting This topic has 3 replies, 4 voices, and was last updated 10 years, 6 months ago by Ashutosh Bhatt. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts March 26, 2014 at 4:05 am #2985 vishakhaParticipant // Program to make a voting machine using LCD#include#define msec 50#define lcd_data_str_pin P2 sbit rs = P3^0; //Register select (RS) pinsbit rw = P3^1; //Read write(RW) pinsbit en = P3^6; //Enable(EN) pinsbit ini_pin = P1^0; // Start voting pinsbit stop_pin = P1^5; // Stop voting pinsbit candidate_1=P1^1; //Candidate1sbit candidate_2=P1^2; //Candidate2sbit candidate_3=P1^3; //Candidate3sbit candidate_4=P1^4; //Candidate4int max = 0;int carry = 0;int arr[4];int vote_amt[3],j;unsigned int vote_1,vote_2,vote_3,vote_4;void delay(int delay_time) // Timedelay function{ int j,k;for(j=0;j<=delay_time;j++) for(k=0;k<=1000;k++);}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]!=’