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 / Serial Communication

Serial Communication

|

Microcontroller › 8051 › Serial Communication

  • This topic has 7 replies, 5 voices, and was last updated 13 years, 10 months ago by romel emperado.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • May 17, 2011 at 11:45 am #942
    Kunal
    Participant

     

    I m using at89s52 microcontroller, i want to send SMS using GSM. I have stored my SMS in memory starting from 30h to 50h. My SMS is like this :  “CO2,NO,C6H6,MICRON,SO2”

    I m using 11.0592Mhz crystal oscilator.

    I dont know which values to move in TMOD, TCON, TH1, SCON etc. for serial communication. I m sending SMS using AT COMMANDS, stored in internal memory of microcontroller.

     

    Please tell me about which SFRs to be used for this operation and which values to be moved in these SFRs??

    May 26, 2011 at 10:36 am #6300
    Anonymous
    Guest

    check out this link for various settings of serial port….

     

    http://www.engineersgarage.com/microcontroller/8051projects/interface-serialport-RS232-AT89C51-circuit

    June 21, 2011 at 7:17 am #6365
    SaLMAN Ahmed Khan
    Participant

    ok 

    use these values

     

    mov tmod,#20

    mov th1,#-3

    mov scon,#50

     

    while scon will be used to program start and stop bits and data bits of data framing

    June 22, 2011 at 11:03 am #6367
    romel emperado
    Participant

    hi rajsekhar nag,

     

    the value if sbuf is any data received from serial input or the RX pin..

     

    read about serial communication of 8051..

    June 26, 2011 at 9:28 am #6372
    rajsekhar nag
    Participant

    2 answers without reading my question properly. The link above shows a project in which the “receive()” function is called to receive a character in SBUF. Unless you make the following modification nothing will come in SBUF!

     

    The function should be like below:-

     

     //Function to receive serial data

     

    void recieve(unsigned char value) 
    {
    while(RI==0);
    SBUF=value;
    P1=SBUF;
    RI=0;
    }

     

    June 26, 2011 at 9:30 am #6364
    rajsekhar nag
    Participant

    http://www.engineersgarage.com/microcontroller/8051projects/interface-serialport-RS232-AT89C51-circuit

     

     

    In the above link, can anybody explain the following function:-

     

    void recieve()  //Function to receive serial data
    {
    unsigned char value;
    while(RI==0);
    SBUF=value;
    P1=SBUF;
    RI=0;
    }

     

    What will be the value of SBUF? :)

     

    Actually I want to say how come the project described in the above link suppose to run properly without getting a value in SBUF?

    June 26, 2011 at 6:21 pm #6390
    SaLMAN Ahmed Khan
    Participant

    simple is to put values that i mention above….

     

     

    regarding to SBUF WHEN U R SENDING TO PC 

     

    mov a, #22

    mov SBUF,A

     

     

     

    and when it recieve 

     

    mov a,sbuf

    July 8, 2011 at 9:13 pm #6441
    romel emperado
    Participant

    did you edit your question above?? hmm

     

    TMOD, — this is timer mode controll register

    TCON, — timer control register

    TH1, — MSB byt of timer

    SCON — serial register…

     

     

     

    search them all there are may article about this…

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

RSS Recent Posts

  • Developing DC UPS module May 16, 2025
  • An Update On Tarrifs May 16, 2025
  • Trying to use a L9110s motor driver chip May 16, 2025
  • I want to make a CRT with some modifications But i have no Idea where to start May 16, 2025
  • Funny Images Thread! May 16, 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