Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this lab, you are to c onnect the 8051 trainer to a PC and write a assembly l

ID: 1979934 • Letter: I

Question

In this lab, you are to c onnect the 8051 trainer to a PC and write a assembly language program that will both transmit and receive data as specified below.When the 8051 receives the character “N” from the PC, it transmits your name. When the 8051 receives any character besides “N”, it transmits the name of your favorite song. Use name, Greg and favorite song, Buy me a Boat.

ORG        0H

                MOV TMOD,#20H

                MOV TH1,#0FDH

                MOV SCON,#50H

                SETB TR1

KATIE:     JNB RI,KATIE

                MOV A,SBUF

                CLR RI

                CJNE A,#"N",FSU

                MOV DPTR,#RAM

PAUL:     CLR A

                MOVC A,@A+DPTR

                JZ DONE

                MOV SBUF,A

TYLER:    JNB TI,TYLER

                CLR TI

                INC DPTR

                SJMP PAUL

FSU:        MOV DPTR,#GOAT

JOHN:     CLR A

                MOVC A,@A+DPTR

                JZ DONE

                MOV SBUF,A

JAMIE:    JNB TI,JAMIE

                CLR TI

                INC DPTR

                SJMP JOHN

DONE:    SJMP KATIE

GOAT:    DB "BUY ME A BOAT",0DH,0AH,0

RAM:      DB "GREG",0DH,0AH,0

                END

Explanation / Answer

High-select functions output whichever input signal has the greatest value. Low-select functions do just the opposite: output whichever input signal has the least value. “Greater-than” and “Less than” symbols mark these two selector functions, respectively, and each type may be equipped to receive more than two input signals.

Sometimes you will see these relays represented in P&IDs simply by an inequality sign in the middle of the large bubble, rather than off to the side in a square. You should bear in mind that the location of the input lines has no relationship at all to the direction of the inequality symbol – e.g., it is not as though a high-select relay looks for the input on the left side to be greater than the input on the right. Note the examples shown below, complete with sample signal values:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote