Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

proteus working but hardware circuit not working

Status
Not open for further replies.

binto

Newbie level 5
Joined
Dec 23, 2010
Messages
10
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,371
friends my code for displaying in LCD is working in proteus but not in real hardware...plz help
 

In order to get a proper reply you need to be more clear and specific.
Which microcontroller you are using?
Post the code...
When you programmed the mcu did you study the data sheet and configured config bits / fuses properly, what have you done with the MCLR/RST circuit (depending upon the mcu)
 

what kind of micro(processor or controller) you are using?is it atmel,pic,8085?are you using adc,some kind of serial communication or keypad?please answer this and post your code.
binto You are the guy having problem with PROTEUS (https://www.edaboard.com/threads/201300/ )is this an after effect of that problems?
"COME TOGETHER WE WILL LEARN "
 
Last edited:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include <REG52.H> /* special function register declarations */
/* for the intended 8051 derivative */
sbit RS = P2^0; // Control signal RESET of the LCD connected to pin P2.0
sbit RW = P2^1; // Write (RW) Signal pin connected to pin P2.1
sbit EN = P2^2; // Enable (EN) LCD control signal connected to pin P2.2
//sbit T = P2^3; 
int i,event;
 
void delay(void); // Delay function
void INIT(void); // Function for the commands to Initialization of the LCD
void ENABLE(void); // Function for the commands to enable the LCD
void LINE(int); /* Function for the commands to choose the line for displaying the characters on the LCD */
 
void LINE(int i) // start of LINE function
{
    if (i==1)
    {
        RS=0; // first make the reset signal low
        RW=0; // make RW low to give commands to the LCD
        P1=0x80; // force cursor to beginning of the first line
        ENABLE(); // enable the LCD
        RS=1;
    }
    else
    {
        RS=0;
        RW=0;
        P1=0xC0; // force cursor to beginning of the second line
        ENABLE();
        RS=1;
    }
}
 
void delay() // Invoking the delay function.
{
    int j,i;
    for (j=0;j<10;j++)
    {
        for (i=0;i<100;i++);
    }
}
 
void ENABLE(void) // Invoking the enable function
{ 
        EN=1; // Give high to low pulse to Enable the LCD.
        delay();
        EN=0;
        delay();
}
 
void INIT(void) // Initialization of the LCD by giving the proper commands.
{ 
    RS=0;
    RW=0;
    EN=0;
    P1 = 0x38; // 2 lines and 5.7 matrix LCD.
    ENABLE();
    ENABLE();
    ENABLE();
    ENABLE();
    P1 = 0x06; //Shift cursor to left 
                ENABLE();
    P1 = 0x0E; // Display ON, Cursor Blinking
    ENABLE();
    P1 = 0x01; // Clear display Screen.
    ENABLE();
}
 
 
void main (void)
{
//char code dis[11] = "KALYANA RAO";
//char code dis2[7] = "IMS/RMD"; // Array of characters to be display
//char *p; // Pointer to point the data in the array.
int j;
 
 
 
while(1)
{
       
        INIT();
       //event=0;
       // scan();
        LINE(1); // Display on the line 1 of the LCD.
    //  p=&dis; // point the character address from the array ¡°dis¡± whereit is stored.
        for (j=0;j<11;j++)
        { 
            P1=0X31; //*p++; 
            ENABLE();
        } 
    //  p=&dis2; // Point the Character address from the ¡°dis2¡± where it is stored/
    //  LINE(2); // Display the second array on the second line on the LCD.
    
        for (j=0;j<1000;j++);
 
        for (j=0;j<1000;j++);
    //  { 
        //  P1=*p++; 
        //  ENABLE();
    //  } 
 
    }//while(1)
}



i m using AT89c55.
 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top