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.

help with arm7 uart ( receiving data from pc)

Status
Not open for further replies.

5282604

Full Member level 4
Joined
Dec 19, 2009
Messages
194
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
egypt
Activity points
2,404
help in this code

Code:
			 int uart_get_value(void){
while(!(U1LSR & 0x01));
return(U1RBR);
}

the mcu endless loop in while why?
 
Last edited:

clear the interrupt falg.. otherwise again &again enters .... check the setting check for flag one....
 
where i can find interrupt falg ? to clear it
 

see check the datasheet receive interrupt flag....in datasheet go to uart in that check the sfr ......

---------- Post added at 09:10 ---------- Previous post was at 09:08 ----------

you need to clear this flag only u1lsr&0x00.... because you are checking this flag getting one right .. when it becomes one you need to clear the flag ..
 
but u1lsr is read only how i can make it u1lsr=u1slr&0x00;

here is the u1lsr register in the datasheet user manual.

lpc eda.png
 

then infinite loop means your flag is not become one 1......... check uart settings.. pls send me the configuration...
 

Code:
PINSEL0 = 0x00050000;    // Enable RxD1 and TxD1                     
U1LCR = 0x83;        // 8 bits, no Parity, 1 Stop bit           
U1DLL = 82;     // 9600 Baud Rate @ 10MHz VPB Clock      
U1LCR = 0x03;       // DLAB = 0
 

pleassssssssssssssssssss help meeeeeee
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top