Posts

Showing posts from 2014

Digital Lock using 8051

Image
Source Code & Simulation file: Click Here

How to Interface Stepper Motor with 8051

Image
Stepper motor is a variable reluctance DC motor. When correct input sequence of signal is given to the motor, it starts rotation in steps. ULN2003 is high voltage, high current Darlington arrays each containing seven open collector Darlington pairs with common emitters. Here it is used as a current driving IC. This IC is required because stepper motor require more than 60mA current and since controller doesn’t work at this current rating so this IC provides high current to the stepper motor. In the circuit port P2 as output port which provide input sequence to four input pins of ULN3003 and output of ULN2003 drives the motor. Input sequences : Simplest sequence 0001 0010 0100 1000 And for half step size 0001 0011 0010 0110 0100 1100 1000 1001 Circuit : Code:   #include<reg51.h> sfr stepper = 0xA0 ; void delay ( unsigned int count) { int i; for (i = 0 ;i < count;i ++ ); } void main () { while ( 1...

How to make Quiz Buzzer using 8051

Image
About: This is simple buzzer which can used in any type of Quiz program. Maximum 8 Participants can use this. Once a participant pressed the button it will show who pressed it in the 7 Segment display. it will remains there until reset is pressed. Circuit : Source Code and Simulation file: Click Here  

Simple Digital Thermometer using 8051

Image
Source Code, Simulation , Circuit Diagram:   Click Here Circuit Diagram:  

8051 Based Digital Clock with alarm using DS1307

Image
This Project show a simple demo to interface DS1307 with 8051 Source Code and Simulation File Download: Click Here

Car Parking System Using 8051

Image
This Project show a sample demonstration of Car Parking System. It supports max 4 cars. This is a prototype. C ircuit Diagram: For Source Code , Proteus Simulation File : Click Here

How to Interface Analog to Digital Converter with 8051

Image
This Project shows how to interface an Analog to Digital Converter (ADC0808) with 8051. I have attached the all Source code and Proteus Simulation File in the Drive Required Components: 16X2 LCD Display AT89C51 (8051) Module Power Supply Module ADC 0808 Downloads:    Source Code: Click here Proteus Simulation: Click Here

Interfacing Seven segment display using 8051

Description: The Below code will display numbers in the Two Seven Segment Displays connected to 8051.The increment will happen using Timer Interrupt. #include<reg51.h> sbit a = P1 ^ 0 ; sbit b = P1 ^ 1 ; sbit c = P1 ^ 2 ; sbit d = P1 ^ 3 ; unsigned char seg = 0 ; int e; int f; int g; int h; char arr[ 10 ] = { 0x40 , 0xF9 , 0x24 , 0x30 , 0x19 , 0x12 , 0x02 , 0xF8 , 0x00 , 0x10 }; void delay () // Function to provide time delay using Timer 1. { int i; for (i = 0 ;i < 25000 ;i ++ ); } void display() interrupt 1 // Function to display the four digit number using multiplexing on seven segment. It uses Timer 0 interrupt to display the four digits one by one after a time delay of 2.5 milli second { TL0 = 0x36 ; TH0 = 0xf6 ; P2 = 0xFF ; d = b = c = a = 0 ; seg ++ ; seg = seg % 4 ; switch (seg) { case 0 : P2 = arr[h]; d = 1 ; break ; case 1 : ...

Temperature to Voltage Converter

Image
This is a simple circuit which is used to Measure the Temperature by means of voltage levels.There are lot of temperature sensors in the market , this circuit is similar to that. Conversion factor depends on the type of thermistor (NTC) resistance used. If you want to read the temperature directly on an universal measurement device then the value of R9 must be choosed, so that the desired sensitivity is achieved (R8 must be equal with R9). The power supply voltage level is not critical; D1 zener voltage can be between 4.7 V and 8.2 V. The current consumption is about 12 mA.  

Interfacing GPS with 8051

Here is the sample code to interface GPS with 8051. #include<reg51.h> #define port2 P2 sbit rs = P1 ^ 0 ; sbit rw = P1 ^ 1 ; sbit e = P1 ^ 2 ; char info[ 70 ]; char test[ 6 ] = { "$GPGGA" }; char comma_position[ 15 ]; unsigned int check = 0 ,i; unsigned char a; void receive_data (); void lcd_latitude (); void lcd_longitude (); //DELAY FUNCTION void delay ( unsigned int msec) { int i,j ; for (i = 0 ;i < msec;i ++ ) for (j = 0 ;j < 1275 ;j ++ ); } // LCD COMMAND SENDING FUNCTION void lcd_cmd ( unsigned char item) { port2 = item; rs = 0 ; rw = 0 ; e = 1 ; delay( 1 ); e = 0 ; return ; } // LCD DATA SENDING FUNCTION void lcd_data ( unsigned char item) { port2 = item; rs = 1 ; rw = 0 ; e = 1 ; delay( 1 ); e = 0 ; return ; } // LCD STRING SENDING FUNCTION void lcd_string ( unsigned char * str) { int i = 0 ; while (str[i] != '\0' ) { lcd_data(str[i]); i ++ ; delay( 10 ); } ...