Your SlideShare is downloading. ×
  • Like
lb instruments by using microcontroller , Rabi Moirangthem
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

lb instruments by using microcontroller , Rabi Moirangthem

  • 277 views
Published

get idea from slide. please don't miss used this.

get idea from slide. please don't miss used this.

Published in Education , Business , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
277
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
10
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Designing of Langmuir-Blodgett film deposition set-up using AT89C51 microcontroller Name of the guide: Dr. Gangineni Ramesh Babu Name of the student: Moirangthem Rabi Singh
  • 2. Langmuir-blodgett set-up (block diagram)
  • 3. Mechanism
  • 4. Procedure we followed • Making power supply and circuit board for microcontroller. • Writing program for one stepper motor then verify it with simulation software as well as hardware experiment. • Writing program for two stepper motor with different time delay by using single port and verified. • Writing program for ADC with two stepper motor one having constant speed and another motor ‘s speed will be manipulate by ADC reading and verified. • Writing final program for ADC, LCD, stepper motors in which the pressure value read by ADC will be displayed on LCD screen and verified.
  • 5. Flow charts Flow chart for main program
  • 6. Flow chart for stepper motor
  • 7. Flow chart for timer0 ISR
  • 8. Flow chart for timer1 ISR
  • 9. Circuit diagram for the set-up
  • 10. Photo of experiment
  • 11. • PROGRAM: • • $MOD51 • ;DEFINITIONS • MOTOR EQU P1 ;1ST 4 PIN TO MOTOR1 AND 2ND 4 PIN TO MOTOR2 • LCDD EQU P0 ;PORT 0 IS CONNECTED TO LCD DISPLAY • EN EQU P3.4 ;ENABLE CONTROL OF LCD MODULE CONTROLLED BY P3.7 • RW EQU P3.3 ;RW CONTROL OF LCD MODULE CONTROLLED BY P3.6 • RS EQU P3.5 ;RS CONTROL OF LCD MODULE CONTROLLED BY P3.5 • ARD EQU P3.7 ;READ PIN FOR ADC • AWR EQU P3.6 ;WRITE PIN FOR ADC • CS EQU P3.1 ; CHIP SELECT PIN FOR ADC • INTR EQU P3.2 ;INTERRUPT PIN FOR ADC • ADC_PORT EQU P2 ;ADC DATA PIN CONNECTED TO PORT2 • ADC_VAL EQU R4 ;MOVE ADC POUTPUT VALUE TO R4 • • ORG 0000H • JMP MAIN ;JUMP TO MAIN • ORG 0003H • RETI ; NO ACTION FOR EXT.INTERRUPT • ORG 000BH • JMP TIMER0ISR ; JUMP TO TIMER0ISR • ORG 0013H • RETI ; NO ACTION FOR EXT.INTERRUPT1
  • 12. • ORG 001BH • JMP TIMER1ISR ;JUMP TO TIMER1ISR • ORG 0023H • RETI ; NO ACTION FOR SERIAL COMM INTERRUPT • • • ORG 0030H • • MAIN: • MOV TMOD,#11H ;SELECT MODE 1 FOR TIMER1 AND TIMER0 BOTH • MOV P2,#0FFH ; SET PORT 2 FOR INPUT • MOV R7,#0CCH ; EXCITATION CODE FOR MOTOR2 • MOV R6,#0CCH ;EXCITATION COE FOR MOTOR1 • MOV TH0,#50H ;LOADING TIMER0 COUNTUP VALUE FOR 45MS • MOV TL0,#37H • MOV TH1,#3CH ;LOADING TIMER1 COUNTUP VALUE FOR 50MS • MOV TL1,#0AFH • SETB PT1 ;GIVE PRIORITY TO TIMER1 • SETB EA ; SET ALL INTERRUPTS ENABLE • SETB ET0 ; SET TIMER0 ENABLE • SETB ET1 ; SET TIMER1 ENABLE
  • 13. • CLR TF0 ;CLEAR TIMER FLAG OF TIMER0 • CLR TF1 ;CLEAR TIMER FLAG OF TIMER1 • SETB TR0 ;START TIMER0 • SETB TR1 ;START TIMER1 • LCALL INIT_LCD ;CALL LCD INITIALISATION • LCALL CLEAR_LCD ;CLEAR LCD • LCALL DISPLAY1 ;DISPLAY "PRESSURE=" • • MAINPRO: • ACALL CONV ;CALL ANALOG TO DIGITAL CONVERSION SUBROUTINE • ACALL READ ;CALL SUBROUTINE TO READ CONVERTED DIGITAL SIGNAL • LCALL DISPLAY2 ; DISPLAY PRESSURE VALUE • SJMP MAINPRO • TIMER0ISR: • PUSH ACC • CLR TR0 ;STOP TIMER0 • MOV TH0,#50H ;LOAD TIMER0 COUNTUP DATA FOR 45MS • MOV TL0,#37H • MOV A,R4 • MOV R2,A • INC R2 • POP ACC • LOOP0: • MOV R3,#0FFH ;ADDING DELAY ACCORDING TO THE CHANGE OF ADC
  • 14. • VALUE FOR ADJUSTING CONSTANT PRESSURE • LOOP1: • DJNZ R3,LOOP1 • DJNZ R2,LOOP0 • ACALL MOTOR1 ; CALL MOTOR1 ROTATING SUBROUTINE • CLR TF0 ; CLEAR TIMER FLAG 0 • SETB TR0 ; START TIMER 0 • RETI ;RETURNED INTERRUPT • TIMER1ISR: • CLR TR1 ;STOP TIMER1 • MOV TH1,#3CH ;LOAD TIMER1 COUNTUP DATA FOR 50MS • MOV TL1,#0AFH • ACALL MOTOR2 ; CALL MOTOR2 ROTATING SUBROUTINE • CLR TF1 ;CLEAR TIMER FLAG1 • SETB TR1 ;START TIMER1 • RETI ;RETURNED INTERRUPT • MOTOR1: • PUSH ACC PUSH ACCUMULATOR CONTENT • MOV A,R6 ;TAKE FIRST EXCITATION CODE TO ACC • ANL A,#0FH ;MASK THE HIGHER NIBBLE OF MOTOR1 EXCITATION CODE • MOV R5,A MOVE THE MASKED DATA TO R5 • MOV A,R7 ;MOVE THE SECOND EXCITATION CODE TO ACCU
  • 15. • ANL A,#0F0H ;MASK THE LOWER NIBBLE OF MOTOR2 EXCITATION CODE • ORL A,R5 ;DO OR OPERATION OF THE TWO MASKED EXCITATION CODE • MOV MOTOR,A ;SEND EXCITATION CODE TO PORT1 • MOV A,R6 ;MOVE FIRST EXCITATION CODE TO ACCU • RR A ;ROTATE EXCITATION CODE RIGHT • MOV R6,A ;MOVE THE ROTATED DATA TO MOTOR1 EXCITATION CODE RESISTER • POP ACC ;POP BACK THE CONTAINS OF ACCUMULATOR • RET ;RETURN TO TIMER0 SUBROUTINE • • MOTOR2: • PUSH ACC ; PUSH THE CONTAINS OF ACCUMULATOR • MOV A,R7 ;MOVE EXCITATION CODE OF MOTOR2 TO ACCU • ANL A,#0F0H ;MASK THE LOWER NIBBLE OF THE EXCITATION CODE • MOV R5,A ;MOVE THE ACCU CONTAINS TO R5 • MOV A,R6 ;MOVE THE EXCITATION CODE OF MOTOR1 TO ACCU • ANL A,#0FH ;MASK THE HIGHER NIBBLE • ORL A, R5 ;DO OR OPERATION FO THE TWO MASKED DATA • MOV MOTOR,A ;SEND THE RESULT TO PORT2 • MOV A,R7 ;MOVE SECOND EXCITATION CODE TO ACCU
  • 16. • RR A ;ROTATE THE EXCITATION CODE OF MOTOR2 RIGHT • MOV R7,A ;MOVE THE ACCU CONTAINS TO EXCITATION CODE RESISTER • POP ACC ;POP BACK THE ACCUMULATOR VALUE • RET ;RETURN TO TIMER1 SUBROUTINE • • CONV: • CLR CS ;CLEAR THE CHIP SELECT PIN • CLR AWR ;CLEAR THE WRITE PIN • NOP ; NO OPERATION • SETB AWR ;SET THE WRITE PI TO 1 • SETB CS ;SET THE CHIP SELECT PIN TO 1 • JB INTR,WAIT1 ; WAIT UNTILL INTERRUPT COMES • RET ;RETURN TO MAIN PROGRAM • READ: • PUSH ACC ;PUSH THE ACCU CONTENT • CLR CS ;CLEAR CHIPSELECT RESISTER • CLR ARD ;CLEAR READ RESISTER • MOV A,ADC_PORT ;MOVE P2 VALUE TO ACCU • MOV ADC_VAL,A ;MOVE ACC TO R4 • WAIT1: • SETB ARD ;SET THE READ PIN 1 • SETB CS ; SET CHIP SELECT PIN 1
  • 17. • POP ACC ; POP THE CONTAINS OF ACCUMULATOR • RET ; RETURN TO THE MAIN PROGRAM • INIT_LCD: • CLR RS ; REGISTER SELECT LINE IS CLEARED • MOV LCDD, #38H ; CONFIGURATION FOR 2 X 16 • SETB EN ; ENABLE PIN PULSED • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; DELAY TO REGISTER COMMAND TO REGISTER • CLR RS • MOV LCDD, #38H ; CONFIGURATION FOR 2 X 16 • SETB EN ; SET ENABLE FOR HIGH PULSE • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY • • CLR RS ; SIGNAL FOR SENDING COMMAND TO DATA REGISTER • MOV LCDD, #38H ; CONFIGURATION FOR 2 X 16 • SETB EN ; SET ENABLE FOR HIGH PULSE • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY • • CLR RS ; COMMAND MODE • MOV LCDD, #0EH ; COMMAND • SETB EN ; PULSE EN TO STORE COMMAND • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE
  • 18. • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY • • CLR RS ; SIGNAL FOR SENDING COMMAND TO DATA REGISTER • MOV LCDD, #06H ; COMMAND • SETB EN ; SET ENABLE FOR HIGH PULSE • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY • RET ; RETURN • WAIT_LCD: • CLR EN ; START LCD COMMAND • CLR RS ; COMMAND MODE SET • SETB RW ; READ COMMAND • MOV LCDD, #0FFH ; SET ALL PINS TO FF INITIALLY • SETB EN ; CLOCK OUT COMMAND TO LCD • LCALL LDELAY ; ALLOW SETTLING TIME • CLR EN ; FINISH THE COMMAND • CLR RW ; TURN OFF RW FOR FUTURE COMMANDS • RET ; RETURN • ; LCD DISPLAY CLEARED IN THIS BLOCK • CLEAR_LCD: • CLR RS ; COMMAND MODE • MOV LCDD, #01H ; DISPLAY CLEAR AND SET CURSOR TO L1-C1 • SETB EN ; SET ENABLE FOR HIGH PULSE • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY • RET ; RET
  • 19. • ; ROUTINE TO SEND DATA FOR LCD • WRITE_TEXT: • SETB RS ; DATA MODE • MOV LCDD, A ; MOVE A TO LCD PORT • SETB EN ; SET ENABLE FOR HIGH PULSE • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY • RET ; RETURN • • ; DELAY ROUTINE TO ALLOW SETTLING TIME • LDELAY: • MOV R0, #20H ; LOAD R6 WITH DELAY COUNT • LOOP3: • MOV R1, #0FFH ; LOAD R7 WITH ANOTHER DELAY COUNT • DJNZ R1, $ ; DECREMENT UNTIL IT BECOMES ZERO • DJNZ R0, LOOP3 ; DECREMENT AND JUMP TO LOOP1 LABEL • RET ; RETURN • • ; THIS BLOCK DISPLAYS THE PRESENT VALUE OF CURRENT AS READ BY ADC WHILE IN ;OPERATION • DISPLAY1: • CLR RS ; SIGNAL FOR SENDING COMMAND TO DATA REGISTER • MOV LCDD, #80H ; USE LINE 1 LOCATION 0 FOR DISPLAY • SETB EN ; SET ENABLE FOR HIGH PULSE • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY •
  • 20. • MOV A, #'P' ; ASCII CODE FOR ‘P’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • • MOV A, #'R' ; ASCII CODE FOR SIGN ‘R’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • MOV A, #'E' ; ASCII CODE FOR SIGN ‘E’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • MOV A, #'S' ; ASCII CODE FOR SIGN ‘S’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • MOV A, #'S' ; ASCII CODE FOR SIGN ‘S’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • MOV A, #'U' ; ASCII CODE FOR SIGN ‘U’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • MOV A, #'R' ; ASCII CODE FOR SIGN ‘R’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • MOV A, #'E' ; ASCII CODE FOR SIGN ‘E’ • MOV LCDD, A ; MOVE IT TO LCD PORT
  • 21. • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • MOV A, #'=' ; ASCII CODE FOR SIGN ‘=’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • RET • DISPLAY2: • • CLR RS ; SIGNAL FOR SENDING COMMAND TO DATA REGISTER • MOV LCDD, #8AH ; USE LINE 1 LOCATION 10 FOR DISPLAY • SETB EN ; SET ENABLE FOR HIGH PULSE • CLR EN ; CLEAR ENABLE FOR HIGH-TO-LOW PULSE • LCALL WAIT_LCD ; WAIT FOR LCD TO GET READY • • MOV A, R4 ; ADC DATA TO BE READ HERE LATER • MOV B, #64H ; LOAD B WITH VALUE #100 • DIV AB ; DIVIDE A AND B TO GET 100S COUNT • MOV 45H, A ; STORE IT • MOV A, B ; MOVE THE REMAINDER TO A • MOV B, #0AH ; LOAD B WITH VALUE #10 • DIV AB ; DIVIDE A AND B TO GET 10S COUNT • MOV 46H, A ; STORE IT • MOV 47H, B ; STORE THE REMAINDER, GIVES 1S COUNT
  • 22. • • MOV A, 45H ; LOAD A WITH 100S COUNT VALUE • CJNE A, #00H, NOZEROR ; CHECK 100S COUNT VALUE EQUALS ZERO • MOV A, #70H ; IF ZERO, LOAD A WITH 70H • NOZEROR: • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL DO ; CALL FOR CONVERSION HEX TO DECIMAL • MOV A, 46H ; LOAD A WITH 10S COUNT VALUE • LCALL DO ; CALL FOR CONVERSION HEX TO DECIMAL • MOV A, #2EH ; ASCII CODE FOR SIGN ‘.’ • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • • MOV A, 47H ; LOAD A WITH 1S COUNT VALUE • LCALL DO ; CALL FOR CONVERSION HEX TO DECIMAL • LCALL LDELAY ; CALL A DELAY • • RET ; RETURN • DO: ADD A, #30H ; ADD 30H TO GET ASCII EQUIVALENT • MOV LCDD, A ; MOVE IT TO LCD PORT • LCALL WRITE_TEXT ; WRITE THE TEXT IN DISPLAY • RET ; RETURN • END
  • 23. Summary • Design of the Langmuir-blodgett film deposition set-up has been executed successfully using the microcontroller by interfacing stepper motors and potentiometer. The potentiometer is used to substitute the LVDT. Initially, the output of all the components had been verified by the Topview Simulator as well as Edsim51 simulator and later preceded with the hardware design.
  • 24. REFERENCES • [1] The 8051 Microcontroller Architecture, Programming and Applications by Kenneth J. Ayala. • [2] www.engineersgarage.com • [3] Sadhana, Vol. 26, Part 3, June 2001, pp. 213–225. © Printed in India
  • 25. THANK YOU