Question

Write an asssembly languaage (805l) code that takes the input from the # keypad to and...

Write an asssembly languaage (805l) code that takes the input from the # keypad to and output to the liquid crystal display.

Homework Answers

Answer #1

keypad is interfaced to port 1 and LCD is interfaced to port 0 of the microcontroller.

Program.

ORG 00H
MOV DPTR,#LUT // moves starting address of LUT to DPTR
MOV A,#11111111B // loads A with all 1's
MOV P0,#00000000B // initializes P0 as output port

BACK:MOV P1,#11111111B // loads P1 with all 1's
     CLR P1.0  // makes row 1 low
     JB P1.4,NEXT1  // checks whether column 1 is low and jumps to NEXT1 if not low
     MOV A,#0D   // loads a with 0D if column is low (that means key 1 is pressed)
     ACALL DISPLAY  // calls DISPLAY subroutine
NEXT1:JB P1.5,NEXT2 // checks whether column 2 is low and so on...
      MOV A,#1D
      ACALL DISPLAY
NEXT2:JB P1.6,NEXT3
      MOV A,#2D
      ACALL DISPLAY
NEXT3:JB P1.7,NEXT4
      MOV A,#3D
      ACALL DISPLAY
NEXT4:SETB P1.0
      CLR P1.1
      JB P1.4,NEXT5
      MOV A,#4D
      ACALL DISPLAY
NEXT5:JB P1.5,NEXT6
      MOV A,#5D
      ACALL DISPLAY
NEXT6:JB P1.6,NEXT7
      MOV A,#6D
      ACALL DISPLAY
NEXT7:JB P1.7,NEXT8
      MOV A,#7D
      ACALL DISPLAY
NEXT8:SETB P1.1
      CLR P1.2
      JB P1.4,NEXT9
      MOV A,#8D
      ACALL DISPLAY
NEXT9:JB P1.5,NEXT10
      MOV A,#9D
      ACALL DISPLAY
NEXT10:JB P1.6,NEXT11
       MOV A,#10D
       ACALL DISPLAY
NEXT11:JB P1.7,NEXT12
       MOV A,#11D
       ACALL DISPLAY
NEXT12:SETB P1.2
       CLR P1.3
       JB P1.4,NEXT13
       MOV A,#12D
       ACALL DISPLAY
NEXT13:JB P1.5,NEXT14
       MOV A,#13D
       ACALL DISPLAY
NEXT14:JB P1.6,NEXT15
       MOV A,#14D
       ACALL DISPLAY
NEXT15:JB P1.7,BACK
       MOV A,#15D
       ACALL DISPLAY
       LJMP BACK

DISPLAY:MOVC A,@A+DPTR // gets digit drive pattern for the current key from LUT
        MOV P0,A       // puts corresponding digit drive pattern into P0
        RET

LUT: DB 01100000B // Look up table starts here
     DB 11011010B
     DB 11110010B
     DB 11101110B
     DB 01100110B
     DB 10110110B
     DB 10111110B
     DB 00111110B
     DB 11100000B
     DB 11111110B
     DB 11110110B
     DB 10011100B
     DB 10011110B
     DB 11111100B
     DB 10001110B
     DB 01111010B
     END
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
IN JAVA: Write code (using ArrayLists) to read a line of input from the user and...
IN JAVA: Write code (using ArrayLists) to read a line of input from the user and print the words of that line in sorted order, without removing duplicates. For example, the program output might look like the following: Type a message to sort: to be or not to be that is the question Your message sorted: be be is not or question that the to to
In R- Studio : Write a function that takes as an input a positive integer and...
In R- Studio : Write a function that takes as an input a positive integer and uses the print() function to print out all the numbers less than the input integer. (Example: for input 5, the function should print the numbers 1,2,3,4 { for input 1, the function should not print a number.) Write a recursive function, do not use any of the loop commands in your code.
Given this input, write the python code that returns the specified output Input X= ["This is...
Given this input, write the python code that returns the specified output Input X= ["This is a wolf #scary",     "welcome to the jungle #missing",     "11132 the number to know",     "Remember the name s - John",     "I      love      you"] Output This is wolf scary welcome to the jungle missing the number to know Remember the name John I love you
Write a c++ trim function that takes an input of string and output the string by...
Write a c++ trim function that takes an input of string and output the string by trimming away all non-alphabetic letters.
Write a program that takes in a line of text as input, and outputs that line...
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text. Ex: If the input is: Hello there Hey quit the output is: ereht olleH yeH IN JAVA
Write a Java method that takes a String as Input and replaces the first two occurrencesof...
Write a Java method that takes a String as Input and replaces the first two occurrencesof a given character to another provided character.   For example, if the input String is “Java is Great” and asked to replace the letter a with x then the output would be: “Jxvx is Great” The method takes a String and two characters and returns the modified String. Please make your own assumptions if needed, you do not need to write the main.
Write a program that takes in an integer in the range 20-98 as input. The output...
Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. I already did the coding part:num = int(input()) if 20 <= num <= 98: while num % 11!=0: print(num) num -= 1 print(num) else: print('Input must be 20-98') Question: How do you know when to use %? Why is it %11 and why not %12 or %15? How do...
Write a program to do the following. JAVA CODE • Input an integer n. • Create...
Write a program to do the following. JAVA CODE • Input an integer n. • Create a BinarySearchTree S inserting the keys 1, 2, . . . , n in that order, which will result in a completely-skewed tree. • Measure the time to search for n + 1 in S. 4 • Display the time taken for search.
using matlab please present code for the following (ALL PARTS PLEASE AND THANK YOU) 1. No...
using matlab please present code for the following (ALL PARTS PLEASE AND THANK YOU) 1. No Input/No Output Write a function that has no input and no outputs. This function will simply display some text when it is called. (this is my code, are there suggestions for improvements?) function Display() disp('some text') end 2. 1 Input/No Outputs Write a function with one input and no outputs. This function will simply display a variable that is provided as an input argument....
Batch numeric conversion: Using the code from Pgm2, create a batch conversion process which reads input...
Batch numeric conversion: Using the code from Pgm2, create a batch conversion process which reads input data (input type, input data, and output type) from a file but still outputs to the console window. For MARS, the input files are expected in the same directory (folder) where MARS resides, by default. Since the input values are not naturally displayed in the console, this program needs to reflect the input from the file as well as outputting the converted value. Upload...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • I need to. Modify my mapper to count words after removing punctuation marks during mapping. mapper...
    asked 6 minutes ago
  • Following are the compression breaking loads (in unit of lb) for 10 concrete cylinder tests (500,...
    asked 6 minutes ago
  • Given an array of integers that is already sorted in ascending order, find two numbers such...
    asked 14 minutes ago
  • For the reaction 2Co3+(aq)+2Cl−(aq)→2Co2+(aq)+Cl2(g).   E∘cell=0.71 V2Co3+(aq)+2Cl−(aq)→2Co2+(aq)+Cl2(g).  Ecell∘=0.71 V what is the cell potential at 25∘C if the...
    asked 18 minutes ago
  • A 15000 N automobile travels at a speed of 45 km/h northward along a street, and...
    asked 23 minutes ago
  • Language C++ // For an input string of words, find the most frequently occuring word. In...
    asked 31 minutes ago
  • Java Programming Stacks Queues Linked List Programming Problems Stack - Implementation. You will be able to...
    asked 32 minutes ago
  • The United States federal personal income tax is calculated based on filing status and taxable income....
    asked 32 minutes ago
  • Using command prompt how would I send an acknowledgement to someone that will be using my...
    asked 32 minutes ago
  • Find the conditional formation (Kf') constant for Ba(EDTA)2- at pH 11.00 where log Kf is 7.88...
    asked 35 minutes ago
  • •Describe a typical person with Paranoid PD or Schizoid PD with the big 5 traits (high,...
    asked 36 minutes ago
  • Lab 03 This lab gives you exercises with using two dimensional arrays of Java and practices...
    asked 39 minutes ago