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, 6 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

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 Arrowfly 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 Arrowfly
Privacy Policy | Advertising

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