Showing posts with label Project. Show all posts
Showing posts with label Project. Show all posts

Sunday, February 16, 2014

SIMPLE INTERFACE STEPPER MOTOR TO 8051

SIMPLE INTERFACE STEPPER MOTOR TO 8051

In this Program we have interface Stepper motor to 8051. Stepper motor is Driven by L293D IC.

L293D IC need Vss = +12V and Vs = +5V and en1 and en2 are used to enable Push-Pull Driver.
In this method we have used A unipolar Stepper motor.
  • A unipolar stepper motor has one winding with centre tap per phase. Each section of windings is switched on for each direction of magnetic field. 


  • Since in this arrangement a magnetic pole can be reversed without switching the direction of current, the commutation circuit can be made very simple (e.g., a single transistor) for each winding. 
  • Typically, given a phase, the centre tap of each winding is made common: giving three leads per phase and six leads for a typical two phase motor. Often, these two phase commons are internally joined, so the motor has only five leads. 
















  • A micro controller or stepper motor controller can be used to activate the drive transistors in the right order, and this ease of operation makes unipolar motors popular with hobbyists; they are probably the cheapest way to get precise angular movements.

















It Work According to the Table given below:
 
A
B
C
D
De
1
0
0
0
45
1
1
0
0
90
0
1
0
0
135
0
1
1
0
180
0
0
1
0
225
0
0
1
1
270
0
0
0
1
315
1
0
0
1
360 or
0
A = in1
B = in2
C = in3
D = in4
De = Degree of rotation













FOR PROGRAM REFER LINK:Click on this link for code

For videos on above example : click on this link

Saturday, February 8, 2014

DISPLAYING CUSTOMIZED CHARACTER USING CGROM IN LCD DISPLAY LM016L


DISPLAYING CUSTOMIZED CHARACTER USING CGROM IN LCD DISPLAY LM016L

CGROM – Character Generator ROM
In LCD display we have seen that, when we send ASCII value it directly display.
Actually the CGROM has all ASCII value store in it. So when we send any ASCII value it compare it with CGROM and displays it.
A user defined Character Patterns can also be generated using mask-programmed ROM.
To Generate a Customized Character like Symbol, smiley etc.
We use 5x8 dot matrix to generate a symbol.


Don’t Care
    5 COLUMN
Hex value

R
O
W
0
0
0
0
X
X
X
0
0x0E
0
0
0
X
X
X
X
X
0x1F
0
0
0
X
0
0
0
X
0x11
0
0
0
X
0
0
0
X
0x11
0
0
0
X
0
0
0
X
0x11
0
0
0
X
0
0
0
X
0x11
0
0
0
X
X
X
X
X
0x1F
0
0
0
X
X
X
X
X
0x1F










X= 1;
0 = 0;



Higher 3-bit are don’t care because the data send is 8bit
So we use addition 3-bits a predefined 0 and rest of 5 bit are the 5 columns and 8 row are used to defined each row and column in the display.
X indicates that the bit is 1.
0 indicates the bit as 0.


In 5x8 matrix only the higher 3 bit are don’t care.















The symbol Created is a Battery symbol. We can generator many type of symbol using mask-programmed ROM (CGROM location that are unused)

The Hex value created for symbol must be place in CGROM location 40H.
The 40H memory has 8 addressable location from 00 to 07.





















And while displaying we should mention addressable location of 40H that are storing 8-byte data in each location from 0x00 to 0x07.

Each location i.e. 0x00 hold 8-byte data. 

Any Queries Do Comment...

For videos on the above example: click on the link


Friday, February 7, 2014

INTERFACING OF LCD DISPLAY TO MICRO-CONTROLLER 8051

INTERFACING OF LCD DISPLAY TO MICRO-CONTROLLER MC8051

The LCD used here is LM016L and Micro-controller is 8051(P89V51RD2).

It is 16 pin Lcd display in which 3 pin are dedicated as control pin and 8 pin for data transfer.


Here I had Connected the Port 0 of MC to LCD and P2(0,1,2) pin to control pin of LCD.


NOTE: 3 control pins are RS = Register Select, RW = Read/Write, and E = Enable.


The working of LCD main depends on this 3 control pin:
  • When RS = 0, Means Register selected is Command register and the data send are command for LCD.
  • When RS = 1, Means Register Selected is Data register and the data is directly send to DDRAM (Display Data RAM) for displaying the String.
  • RW pin is Read or Write enable pin. RW = 0, Means Write functions is select so that we can write data or command into LCD RAM.
  • RW pin when is set as 1, means Read function is selected. We only read the status of LCD DDRAM, i.e. whether it’s Busy or ready to accept the data.
  • E = Enable pin is used to latch the data send from Micro-controller to LCD.
  • When E get high to low pulse it latch the data into LCD RAM.
  • So for every data or command to be send to LCD display the E pin must have high to low pulse.


























Important Command of LCD:
  • Clear the display = 0x01;
  • Display on and cursor blinking = 0x0E;
  • Display on and cursor blinking off = 0x0C;
  • Cursor incrementing = 0x06;
  • 1st location in the 1st line of lcd display = 0x80;
  • 1st location in the 2nd line of lcd display = 0xC0;
  • For Left Shifting the data of lcd = 0x18;
  • For Right shifting the data of lcd = 0x1C;






In this method I have used the pointer to send of number string
This method is called as pass by Reference.

Any Queries Plz Do Comment.

For Video on this example: Click on this link for video