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 / 89c51 interfacing with rs232 as well as 16×2 LCD

89c51 interfacing with rs232 as well as 16×2 LCD

|

Microcontroller › 8051 › 89c51 interfacing with rs232 as well as 16×2 LCD

  • This topic has 5 replies, 5 voices, and was last updated 12 years, 7 months ago by raj.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 25, 2013 at 11:09 am #2137
    ronakpatel
    Participant

    i w’d like to show my hyperterminal data in MY 16*2 LCD via  89c51.i.e what i m wrting in hyper terminal or inside 89c51 that wyd like to dispay on lcd it is possible??

    i have done  interface lcd ans max 232 with 89c51 on the hardware basis.but when i write my code for interfacing that was not working.

     

    February 26, 2013 at 1:47 pm #9187
    AJISH ALFRED
    Participant

    Please postyour code, we will try to figure out the mistake.

    March 10, 2013 at 4:10 am #9286
    ronakpatel
    Participant

     

    #include “reg51.h”
     
     
    void inici_serie (void)
    {
     
     
     
    PCON |= 0x80; // SMOD = 1; => transmition rate x2
     
    SCON = 0x50; // Serial port in mode 1
     
     
    TMOD |= 0x20; // Timer 1, in mode 2
    // i. e., timer of 8 bits with autoreload
     
    //TH1 = 256 – (((smod + 1) * f_xtal) / (384 * baud)); TH1 = 0xFA; // for baud = 9600
    TL1 = TH0;
     
    // Activa timer0
    TR1 = 1;
    }
     
    char receive_char (void)
    {
    RI = 0;
     
    return SBUF;
    }
     
    void send_char (char chr)
    {
    TI = 0; 
    SBUF = chr 
    while(!TI) 
    TI = 0;
    }
     
    void send_msg (char *msg)
    {
    TI = 0;
     
    while(*msg)
    {
    SBUF = *(msg++);
    while (!TI); TI = 0;
    }
    }
     
     
    void main (void)
    {
    char chr;
     
    inici_serie();
     
    send_msg (“Hello!n”);
     
    while (1)
    {
    if (RI) // do echo of the character received
    {
    character = receive_char ();
    send_char (chr);
    }
    }
    }
     
    April 15, 2013 at 12:43 pm #9493
    RUBEN KURIAKOSE
    Participant

    Code show here has some error. You will get correct code from various sites

    June 9, 2013 at 7:44 am #9919
    arisan
    Participant

    how to validate a number for gsm based notice board?

     

    June 15, 2013 at 5:48 am #9969
    raj
    Participant

    hii u need to have proper baud rate,

     

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

RSS Recent Posts

  • Wien bridge oscillator January 19, 2026
  • Silicone insulated wire January 19, 2026
  • Op amp shock January 19, 2026
  • Is the input voltage selectable ? January 19, 2026
  • Unable To Get Advertised Op-Amp Slew Rate January 19, 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