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 / Hi ajish thanks a lot for all

Hi ajish thanks a lot for all

|

Microcontroller › 8051 › 8051 keeps executing › Hi ajish thanks a lot for all

August 8, 2013 at 10:32 am #10303
Sandeep
Participant

Hi ajish thanks a lot for all ur replies 

 

I found the bug

 

the Tx of 8051 was getting connected to Tx of SIM900 and same with Rx , it happened because i was using a male to male connector.

 

now that is resolved

 

data recieved was seen on LCD when i used

 

         ch= SBUF;

         str[count++]=ch;    // used to store the data

         lcd_data(str[count-1]);   // directly showing wat ever i recieved

 

Now wrote a code to display the stored data in str[] , which is not happening

 

code is:

 

char str[20];

 

void lcd_data(char data1)
{
P0=data1;
RS=1;
RW=0;
E=1;
delay(10);
E=0;
}  
 
 
void serial_rx() interrupt 4 
{
 
char ch;
 
 
  if(RI==1)
{
              ch= SBUF;
              if(ch==0X0D)
              {
                  carr=1;
               }
 
               if(ch==0X0A)
               {
                       linefd=1;
                 }
               if(ch!=0x0D && ch!= 0x0A)
               {
                       str[count++]=ch;
                       lcd_data(str[count-1]);
                   }
               if(ch==0X0D && carr==1 )
               {
                       str[count]=’’;
                       carr=0;
                       linefd=0;
                       count=0;
                 }
 
          }
 
       RI = 0;
 
void main()
{
…
…
…
 
for(i=0;i!=’’;i++)
{
lcd_data(str);
delay(20);
}
…
…
…
 
}

 

RSS Recent Posts

  • Anyone In The US Ordered From AliExpress Recently? November 10, 2025
  • Calculation of A Class amplifier November 10, 2025
  • strange laptop problem November 10, 2025
  • restarting this Christmas project November 10, 2025
  • Anyone understand roaming SIM cards?. November 10, 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