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.

data from hyperterminal is not displaying in lcd

Status
Not open for further replies.

syedabutahir8

Newbie level 4
Newbie level 4
Joined
Jan 13, 2014
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
49
i cant able to display the data comming from the hyper terminal so please help me
here the code is


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
#include<REGx51.h>
    sbit rs=P3^5;
    sbit rw=P3^6;
    sbit en=P3^7;
        void init_lcd();
    void cmd_lcd(unsigned char a);
    void dat_lcd(unsigned char a);
    void delay(unsigned int val);
    void wrt_lcd(unsigned *p);
        void init_lcd()
    {
    cmd_lcd(0x38);
    cmd_lcd(0x0c);
    cmd_lcd(0x80);
    cmd_lcd(0x01);
    }
    void cmd_lcd(unsigned char a)
    {
    P2=a;
    rs=0;
    en=1;
    delay(3);
    en=0;
    delay(3);
    }
    void dat_lcd(unsigned char a)
    {
    P2=a;
    rs=1;
    en=1;
    delay(3);
    en=0;
    delay(3);
    }
    void delay(unsigned int val)
    {
    int b,A;
    for(b=0;b<val;b++)
    for(A=0;A<1275;A++);
    }
    void wrt_lcd(unsigned char *p)
    {
    while(*p!='\0')
    {
    dat_lcd(*p);
    p++;
    }
    }
 
 
void main()
{
unsigned char mybyte;
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
while(1)
{
while(RI==0);
mybyte=SBUF;
dat_lcd(mybyte);
RI=0;
}
}

 
Last edited by a moderator:

Is your LCD code working correctly? Have checked displaying some characters on LCD? Have you checked the serial protocol code by sending back whatever it receives so that you see whatever you type back on the hyperterminal? Answering these questions gives some clues on where the problem is.


Regards,
Raj Gunaseelan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top