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 / #include void

#include void

|

Projects › Projects › 4bit lcd program for 2148…..i am getting perfectly output in kiel but in proteus nothing is displaying on lcd..can you tell me › #include void

June 10, 2013 at 12:55 am #9923
ANJUSHA
Participant

#include <LPC21xx.H>
void delay(int count ) ;
void lcddata(int c);
void lcdcmd(int t);

void delay(int count)
        {
        int j=0, i=0;
        for (j=0;j<count;j++)
        for (i=0;i<250;i++);
        }

void lcdcmd(int t)
{
 
int s=0;
s=(t>>4) & 0x0f;
s=s << 16;
 
IO0CLR=0x10000000;    // rs =0 p0.28
IO0CLR=0x20000000;    // rw =0 p0.29
IO0SET=0x40000000;

IO1CLR=0X000F0000;
IO1SET = s;
delay(1000);
IO0CLR=0x40000000; //en=0 p0.30
 
s = t & 0x0f;
s=s<<16;

IO0CLR=0x10000000;    // rs =1 p0.28
IO0CLR=0x20000000;    // rw =0 p0.29
IO0SET=0x40000000;

IO1CLR=0X000F0000;
IO1SET = s;
delay(1000);
IO0CLR=0x40000000; //en=0 p0.30
}

void lcddata(int c)
{
int d=0;
d=((c>>4) & 0x0f);
d= d<<16;
 
IO0SET=0x10000000;    // rs =1 p0.28
IO0CLR=0x20000000;    // rw =0 p0.29
IO0SET=0x40000000;

IO1CLR=0X000F0000;
IO1SET = d;
delay(1000);
IO0CLR=0x40000000; //en=0 p0.30
 
d= c & 0x0f;
d=d<<16;

IO0SET=0x10000000;    // rs =1 p0.28
IO0CLR=0x20000000;    // rw =0 p0.29
IO0SET=0x40000000;

IO1CLR=0X000F0000;
IO1SET = d;
delay(1000);
IO0CLR=0x40000000; //en=0 p0.30
}

void msgdisplay(unsigned char k[])
{
int i;
for(i=0; k!=’’; i++)
{
lcddata(k
);
delay(1000);
}
}

int main( )
{
PINSEL1=0X00000000;
PINSEL2=0X00000000;
IO0DIR=0X70000000;
IO1DIR=0X000f0000;
delay(100);

lcdcmd(0x02);
lcdcmd(0x28);
lcdcmd(0x0c);
lcdcmd(0x06);
lcdcmd(0x01);

 

while(1)
{

msgdisplay(“INFORMATION”);
delay(1000);
//lcdcmd(0xc0);
//msgdisplay(“HYDERABAD”);
//delay(1000);
}

}

RSS Recent Posts

  • Why aren’t the power windows in my 2006 Volkswagen Polo 2006 working despite repairing the control unit circuit board? May 20, 2026
  • Relay question May 20, 2026
  • Battery discharger May 20, 2026
  • Difference between TTL, RS232 and RS485 May 20, 2026
  • Phone Charger 5v to 12v May 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