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 port not working with LCD

Status
Not open for further replies.

ronydc

Full Member level 3
Joined
Nov 17, 2005
Messages
166
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,298
Activity points
2,612
serial port not working

DEAR FRIENDS,

( i am using keil // USING "C" and doing this for 89c51 from ATMEL.)

I M working on a simple program for operating some relays and putting the status message on the LCD. the program is working so nicely.
now i need to ADD the SERIAL function in to the program so that with RS-232 link the messages can be seen on pc screen too with hyperterminal or any terminal immulator program.

BUT, with my surprize, i am unable to include the serial function in to the program.
I initiated serial port and put some printf commands to print some varialbles on the serial port , but its not working.

i cant understand why this happening.

is the probable reason is tht , DURING WRITING TO THE LCD, the controller is so busy that after finishing even, its unable to print the same on the serial port .?

wht could be the reason,,, freinds please point out the loop hole...!!

THANKS IN ADVANCE.

- Rony
 

working of lcd

Hi,

Post your code. When using printf u need to include stdio.h header file.

Regards,
M.Sukumar
 

lcd serial port

i already added the stdio.h file

but its not taking the printf command working at all.
when its debugged by keil, it shows the green marking but its not showing anything on the serial port.
i will shortly post the code here

note: i am able to transmit the SBUF but not the variable through printf command.

rony
 

lcd op seriele poort

Pls post ur code then only i can help u
 

seri port lcd

You’ll need to customize the ‘stdout’ (standard communication output) stream in order to have 'printf' doing what you want it to do.
Basically, you have to provide a customized version of the low-level ‘__write' function (may be different with different compilers) to suit your needs, and compile that in your project. Refer to your compiler’s reference manual for exact details.
Alternatively you can write your own serial communication routines and use them instead of ‘printf’.

If now communicating with the LCD really "takes too long" so that you don't have time for anything else, than you did something wrong or your comm routines are poorly implemented, because, as it seems, you don't have any hard-realtime requirements, so you decide how much time you have...

Arthur
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top