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 / Topics / AT89c4051 Programming

AT89c4051 Programming

|

Microcontroller › 8051 › AT89c4051 Programming

  • This topic has 0 replies, 1 voice, and was last updated 11 years, 2 months ago by Jayaram.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 4, 2015 at 4:01 pm #3426
    Jayaram
    Participant

    Hi, Getting problem with programming AT89c4051 serial port.

    Doubt about configuration.

        void setup()
        {
                    TMOD = 0x20;
                    SCON = 0x50;
                    TH1 = 0xFD;
                    TR1 = 1;
                    IE = 0x90;
                

        }
      

        if(send == 0)
                    {
                          while(send == 0);
                          SBUF = tx_val1;
                          while(TI==0);
                          TI=0;

                          SBUF = tx_val2;
                          while(TI==0);
                         TI=0;
                    }

     

        void serial() interrupt SIO_VECTOR
        {
                unsigned int val1,val2;
                    if(RI)
                    {
                            while(RI == 0);
                            val1 = SBUF;
                            rx_val1 =val1;
                            RI = 0;
                            
                            while(RI == 0);
                            val2 = SBUF;
                            rx_val2 = val2;
                            RI = 0;
                            
                    
                        
                    }
                    else
                    {
                        
                        TI = 0;
                    }
                    
              

  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Beginner Questions About CNC Machines – G-code, Control Systems & Accuracy April 21, 2026
  • S1MJ ? April 20, 2026
  • timing delay code statements using Swordfish April 20, 2026
  • Selection Criteria and Safe Usage of Cable Ties in Electronics Applications April 20, 2026
  • properly producing TDR on PNA network analyzer N5224B April 20, 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