EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / Hey Pavithra, I tried

Hey Pavithra, I tried

|

Electronics › Electronics › Read a character from serial port and send back › Hey Pavithra, I tried

March 9, 2013 at 2:35 pm #9284
Savio
Participant

Hey Pavithra,

 

I tried simulating your code and there are some points you should note.

 

1. Use ‘ ACALL r ‘ to make a recieve function and end it with ‘ RET ‘. In your code ‘SJMP r’ will loop forever in the ‘r’ subroutine and never execute the sending subroutine.

 

2. The data you are recieving is on ‘P1’ , but you are transmitting data from ‘P2’ .

 

3. If you are simulating, check that the clock is set to 11.0592MHz only.

 

This is your code which I made some changes to, hope it helps.

 

ORG 000H
MOV TMOD,#20H
MOV TH1,#0FDH
MOV SCON,#50H
SETB TR1
ACALL r
ACALL t

r:JNB RI,R
    MOV A,SBUF
    MOV P1,A
    CLR RI
    RET

t:    MOV P1, A
    MOV SBUF, A
w:    JNB TI,w
    CLR TI
    
    RET
END

 

Regards.

RSS Recent Posts

  • isolating S-params in of PCB board without connectors April 11, 2026
  • Assistance locating a 'trail' camera gadget, please ? April 10, 2026
  • Raise your hand if your car had one of these: April 10, 2026
  • Some opamp advice please April 10, 2026
  • Voltage comparator circuit verification April 10, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise