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 / Check whether the following program for AT89c51 to display on LCD is write or wrong?

Check whether the following program for AT89c51 to display on LCD is write or wrong?

|

Projects › Projects › Check whether the following program for AT89c51 to display on LCD is write or wrong?

  • This topic has 2 replies, 2 voices, and was last updated 13 years, 2 months ago by pradeep.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 2, 2013 at 6:32 am #2156
    pradeep
    Participant

    I have been doing a project on GSM based Motor Control.
    I have written a program for the project i.e. to display some data on 16×2 LCD (JH 162A) & to have 1 or 0 on ports P2.0 for motor speed control.

    So please let me know whether it is write or wrong?

     

    $large
    Dim A As Byte
    Dim Text As String * 16
    Dim Sms As String * 6
    Dim S As Byte
    Cursor Off
    P2 = 0
    S = 0
    Cls
    Lcd ” GSM Based “
    Lowerline
    Lcd ” Motor Control”
    Wait 2
    Cls
    Lcd “college name”
    Lowerline Lcd ” “
    Wait 2
    Cls
    Lcd ” Guided By:Prof”
    Lowerline Lcd “Prof name”
    Wait 2
    Print “AT+CMGF=1”
    Wait 1
    Print “AT+CMGD=1”
    Wait 1
    A1:
    Print “AT+CMGR=1”
    Cls
    Do
    A = Inkey
    If A = 34 Then
    Cls
    Text = “”
    End If
    If A > 47 And A < 123 Then
    Lcd Chr(a)
    Text = Text + Chr(a)
    End If
    If A = 79 Then
    Sms = “”
    Sms = Mid(text , 1 , 5)
    If Sms = “234D0” Then
    P2 = 0
    End If
    If Sms = “234D1” Then
    P2 = 0
    P2.0 = 1
    S = 1
    Call Sms
    End If
    If Sms = “234D2” Then
    P2 = 0
    P2.1 = 1
    S = 2
    Call Sms
    End If
    If Sms = “234D3” Then
    P2 = 0
    P2.2 = 1
    S = 3
    Call Sms
    End If
    If Sms = “234D4” Then
    P2 = 0
    P2.3 = 1
    S = 4
    Call Sms
    End If
    If Sms = “234D5” Then
    Call Sms
    End If
    Print “AT+CMGD=1”
    Wait 5
    Goto A1
    End If
    Loop
    Sub Sms
    Cls
    Lcd Sms
    Print “AT+CMGD=1”
    Wait 1
    Text = “”
    Print “AT+CMGS=” ; Chr(34) ;
    “09702614387” ; Chr(34)
    Wait 1
    Print “SMS: ” ; Sms ; ” Speed
    Level:” ; S;
    Print Chr(26)
    Wait 5
    End Sub
    March 2, 2013 at 5:21 pm #9221
    AJISH ALFRED
    Participant

    Hi Pradeep,

    “please let me know whether it is write or wrong?”

     

    Suggest you to check it yourself. If there is any issue, please let us know in detail. We will surely help you.

    March 3, 2013 at 6:48 am #9223
    pradeep
    Participant

    This is the diagram I’m working on. But I’m not getting any output.
    wysiwyg_imageupload:7686:

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

RSS Recent Posts

  • Phone Charger 5v to 12v May 14, 2026
  • Difference between TTL, RS232 and RS485 May 14, 2026
  • Wall Radiator Heating: Efficiency and Placement Questions May 14, 2026
  • Assistance locating a 'trail' camera gadget, please ? May 14, 2026
  • Projector focus circuit May 14, 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