![]() | ![]() | ![]() |
| | |||||||
| Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi ALL, How to make assembly code AT89s51.My Project using Switch Button at P3.2 (INT 0) to start program.When start button pressed on lcd will shown messages "BEGIN TEST" and also use DIP Switch 2x8 pin at port 1 and LCD 2 x 16 line GDM 1602A at Port 0.After Swich Button execute I select one of DIP Switch is ON and begin to start test. When swich 1 is ON (connected to ground) on LCD will shown text ( e.g: TEST LCD 1 ). And next switch 2 is ON the LCD will shown text ( e.g: TEST LCD 2). It will happen looping until end switch (switch 8) . Can anyone help me in this.... thank you | |
| |
| | (permalink) |
| Anyone help me....plz | |
| |
| | (permalink) |
| Notice your question starts "My Project", this means you need to do it - if you can't do it your teacher needs to find out so he can help, cheating helps no one - least of all you!. | |
| |
| | (permalink) |
| This is my hobbies project not for the school I learn....is this wrong!!!! Sorry, guys Here I have piece of subroutine to shown character on LCD 2 x 16 line But if combine with Switch Button and DIP Switch what I means, my program can't shown text on LCD Anyone can complete my piece routine according my circuit???? Thank you http://microcontroller.fateback.com/...racter%202.htm ;----------------------------------------------------------------- org 0h start: call init_LCD mov R1,#80h call write_inst mov R1,#'H' call write_data mov R1,#'e' call write_data mov R1,#'l' call write_data mov R1,#'l' call write_data mov R1,#'o' call write_data mov R1,#' ' call write_data mov R1,#'W' call write_data mov R1,#'o' call write_data mov R1,#'r' call write_data mov R1,#'l' call write_data mov R1,#'d' call write_data EndChar: sjmp Endchar Init_lcd: mov r1,#00000001b ;Display clear acall write_inst ; mov r1,#00111000b ;Function set, ;Data 8 bit,2 line font 5x7 acall write_inst ; mov r1,#00001100b ;Display on, ;cursor off,cursor blink off acall write_inst mov r1,#00000110b ;Entry mode, Set increment acall write_inst ret ; Write_inst: clr P2.0 ; RS = P2.0 = 0, write mode instruction mov P0,R1 ; D7 s/d D0 = P0 = R1 setb P2.1 ; EN = 1 = P2.1 call delay; call delay time clr P2.1 ; EN = 0 = P2.1 ret ; Write_data: setb P2.0 ; RS = P2.0 = 1, write mode data mov P0,R1 ; D7 s/d D0 = P0 = R1 setb P2.1 ; EN = 1 = P2.1 call delay; call delay time clr p2.1 ; EN = 0 = P2.1 ret ; delay: mov R0,#0 delay1:mov R7,#0fh djnz R7,$ djnz R0,delay1 ret ; end | |
| |