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 / im using these codes#include

im using these codes#include

|

Microcontroller › 8051 › serial communication between pc and AT89c52 › im using these codes#include

May 10, 2012 at 8:10 am #7704
bll
Participant

im using these codes

#include <regx52.h>
unsigned char a ;

void main(void)
{

TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;

IE=0X00;

while(1)
{
while(RI==0);
a=SBUF;
P1=a;
RI=0;
}

}

 

 

 

 

 

but there is a problem at receiving data, i send numbers from 0 to 15, i got them properly at 89c52, but after 15 it doesnt work properly?, i cant see what is the problem.

RSS Recent Posts

  • LED circuit for 1/6 scale diorama May 14, 2025
  • Can I use this charger in every country? May 14, 2025
  • Electronic board faulty?!? May 13, 2025
  • using a RTC in SF basic May 13, 2025
  • An Update On Tarrifs May 13, 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