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.

Serial Communication using ARM LPC2148

Status
Not open for further replies.

Twisted_transistor

Member level 1
Joined
Sep 13, 2012
Messages
32
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,478
Hi.. I've written a code to transmit a character to PC using UART0. But, however, the hyperterminal is blank.
Why is this happening?
My code is as follows:


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
#include "LPC214x.h"
void init(void);
 
 int main()
{   int i=0;
    init();
    
   while(i<=10){
    
            U0THR='D';
            while(!(U0LSR && 0x60));
               i++;
               
    }
}   
 
void init()
{
    PINSEL0=0x00050005;
    U0FCR=0x07;     //enable and clear FIFOs
    U0LCR=0x83;     //8-N-1, enable divisors
    U0DLL=0x62;     //9600 baud (9615)
    U0DLM=0x00;
    U0LCR=0x03;     //8-N-1, disable divisors
}

 
Last edited by a moderator:

But if I modify d same code for UART1 it works fine.. Its only giving a problem with UART0..
 

I've tried your program on Proteus. It's working
Here is the project file of Kei & proteus on which you can check.
I've take it from the examples of MDK-ARM & just replace the main program with yours & it works.
 

Attachments

  • Desktop.rar
    97.2 KB · Views: 87

Hey.. Hyperterminal is still blank.. Do you think its because I'm using UART0 as ISP port to program my chip? I use flash magic & use the DTR & RTS to control the RST & ISP pins. So is it possible that my port is stuck in ISP mode & is that the reason why its not functioning as a normal UART?

I'm really confused..
 

In proteus it's displaying the o/p on virtual terminal, So I guess there should not be any problem in code.
Don't give any delay while using hyperterminal. If you've give any delay then remove it.
There is no problem whatever you've used to control RST & ISP pins.
Is it your first attempt in hyperterminal ?
If yes then do let me know I (& others also) can help to start with hyperterminal.
Are you getting the proper functioning with uart 1?? (I am asking at hardware & software both side).
 

    Jait

    Points: 2
    Thank you Jigar Bhaiyya (P.S. Nahi degi)
Yea.. this is the first time I'm using hyperterminal. Everything functions properly using UART1(hardware & software). I get the correct output on hyperterminal using UART1.
 

    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top