Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Issue successfully resolved

???
03/01/04 20:19
Read: times


 
#65769 - What is wrong in my serial comm prog
The program is supposed to display OPEN on pressing O and CLOSE on pressing C on the terminal screen

$mod51
ORG 0000H ;Origin address
LJMP MAIN ; Jump to intialisation
ORG 000BH

ORG 0023H ;Serial interupt
LJMP SERIAL ; Jump to serial action routine


ORG 30H
MAIN: MOV P1,#0FFH ;Make P1 input port
MOV TMOD,#20H ; Timer1 8 bit auto reload
MOV TH1,#0FDH ;Set TH1 for 9600 bps
MOV SCON,#50H ;8 bit data mode with 1 start and stop bit and receive enable
MOV IE,#90H ;Global interrupt, serial interrupt enable,TIMER OVERFLOW ET0 INTERRUPT
CLR P1.0 ;led Glows
SETB TR1 ; Start timer for serial transmission
CLR TI


LOOP:SJMP LOOP

;-----------------END OF MAIN------------------------
ORG 350H

SERIAL: JB TI,CLEAR

MOV A,SBUF

CJNE A,#'S',RET_OPEN
MOV SBUF,#'K'
SJMP RET_END

RET_OPEN:CJNE A,#'O',RET_CLOSE
CLR P1.0
CLR P1.1
MOV SBUF,#'O'
MOV SBUF,#'P'
MOV SBUF,#'E'
MOV SBUF,#'N'
SJMP RET_END

RET_CLOSE:CJNE A,#'C',RET_END
SETB P1.0
SETB P1.1
MOV SBUF,#'C'
MOV SBUF,#'L'
MOV SBUF,#'O'
MOV SBUF,#'S'
MOV SBUF,#'E'

RET_END:
CLR RI
RETI

CLEAR: CLR TI
RETI

END

List of 61 messages in thread
TopicAuthorDate
What is wrong in my serial comm prog            01/01/70 00:00      
   RE: What is wrong in my serial comm prog            01/01/70 00:00      
      RE: What is wrong in my serial comm prog            01/01/70 00:00      
         RE: What is wrong in my serial comm prog            01/01/70 00:00      
         RE: What is wrong in my serial comm prog            01/01/70 00:00      
            RE: What is wrong in my serial comm prog            01/01/70 00:00      
            You mean the ISR?            01/01/70 00:00      
   RE: What is wrong in my serial comm prog            01/01/70 00:00      
   RE: What is wrong in my serial comm prog            01/01/70 00:00      
      Deepak disappeared            01/01/70 00:00      
         RE: Deepak (dis)appeared            01/01/70 00:00      
            RE: Deepak (dis)appeared            01/01/70 00:00      
               The problem continues            01/01/70 00:00      
                  What I have understood till now            01/01/70 00:00      
                     RE: What I have understood till now            01/01/70 00:00      
                        RE: What I have understood till now            01/01/70 00:00      
                           Hans van Pelt & patrick de groote            01/01/70 00:00      
                           RE: What I have understood till now            01/01/70 00:00      
                           What is the problem now            01/01/70 00:00      
                           What is the problem now            01/01/70 00:00      
                              RE: What is the problem now            01/01/70 00:00      
                        Is this okay            01/01/70 00:00      
                           RE: Is this okay            01/01/70 00:00      
                              RE: Is this okay            01/01/70 00:00      
                              RE: Is this okay            01/01/70 00:00      
                                 RE: Is this okay            01/01/70 00:00      
                                    re:is this okay            01/01/70 00:00      
                                       RE: re:is this okay            01/01/70 00:00      
                                       RE: re:is this okay            01/01/70 00:00      
                                          I think this should be okay            01/01/70 00:00      
                                             RE: I think this should be okay            01/01/70 00:00      
                                                RE: I think this should be okay            01/01/70 00:00      
                                                   RE: I think this should be okay            01/01/70 00:00      
                                                   RE: I think this should be okay            01/01/70 00:00      
                                                      RE: I think this should be okay            01/01/70 00:00      
                                                      RE: I think this should be okay            01/01/70 00:00      
                                                         RE: I think this should be okay            01/01/70 00:00      
                                                            I will wait for my victory            01/01/70 00:00      
                                                               RE: I will wait for my victory            01/01/70 00:00      
                                                                  RE: I will wait for my victory            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                                        RE: I will wait for my victory            01/01/70 00:00      
                                                                           RE: your hardware            01/01/70 00:00      
                                                                        RE: I will wait for my victory            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                               RE: I will wait for my victory            01/01/70 00:00      
                                                                  RE: I will wait for my victory            01/01/70 00:00      
                                                                     I will be the victor soon            01/01/70 00:00      
                                                                        Protect dptr            01/01/70 00:00      
                                                                           RE: Protect dptr            01/01/70 00:00      
                                                                        RE: I will be the victor soon            01/01/70 00:00      
                                                                     RE: I will wait for my victory            01/01/70 00:00      
                                                                        RE: I will wait for my victory            01/01/70 00:00      
                                 RE: Is this okay            01/01/70 00:00      
                                    RE: Is this okay            01/01/70 00:00      
                                       RE: Is this okay            01/01/70 00:00      
                                    RE: Is this okay            01/01/70 00:00      
                                       RE: Is this okay            01/01/70 00:00      
                                       RE: Is this okay            01/01/70 00:00      
   close this discussion            01/01/70 00:00      

Back to Subject List