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 / this is the code i have for

this is the code i have for

|

Microcontroller › 8051 › Anyway to convert assembly code in to C code? › this is the code i have for

March 10, 2011 at 7:12 am #5695
G Thomas
Participant

this is the code i have for serial connection. How do i insert this into my main code for controller:

ORG 30H
 
INI:
MOV TMOD,#21H
MOV TH1,#0A0H ;9600 BAUD
MOV SCON,#50H ;8 BIT UART MODE
MOV TH0,#HIGH(-50000)
MOV TL0,#LOW(-50000)
 
SETB TR1
 
MAIN:
JB RI,SERIAL
JMP MAIN
 
;==================
SERIAL:
CLR RI
 
MOV A,SBUF
 
JMP MAIN

the code for microcontroller is:

 

RSS Recent Posts

  • Faulty heat air gun (dc motor) - problem to locate fault due to Intermittent fault July 19, 2025
  • Fun with AI and swordfish basic July 19, 2025
  • Does US electric code allow branching ? July 19, 2025
  • Sump pit water alarm - Kicad 9 July 19, 2025
  • turbo jet fan - feedback appreciated. July 19, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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