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.

For 8051 & Keil C51 programmers ?

Status
Not open for further replies.

SphinX

Advanced Member level 3
Joined
Jan 25, 2002
Messages
822
Helped
58
Reputation
116
Reaction score
29
Trophy points
1,308
Location
EGYPT
Activity points
7,045
Salam,

My main function update always a lcd display with message1.
There is external interrupt to detect if a card is detected.
If a card is detected, then disable all interrupts, clear the lcd and display message2 for 2 seconds.

The problem, when it return from interrupt to the main function to continue update the lcd with message1, i notice there strange characters appear on the lcd display !!!

What is the solution ?

Thanks
 

shannings post is very useful for you :-(

I think your problem is that the interrupt can be anywhere while you print message1 even in the middle (if you are using 4 bit mode) of a character.

Best solution is to only set a flag when your interrupt occurs and do the rest in the routine where you print message1.

hope this helps
 

Salam,

shanning wrote,

Good Luck!

It's very usefull solution thanks very very much hahahaha


C-Man wrote,

I think your problem is that the interrupt can be anywhere while you print message1 even in the middle (if you are using 4 bit mode) of a character.

Thanks C-Man that i guess too.

C-Man wrote,

Best solution is to only set a flag when your interrupt occurs and do the rest in the routine where you print message1.

I will try it and tell you the results, and if there are any other solutions will be welcome.

SphinX
 

Re: For 8051 & ke*il C51 programmers ?

SphinX said:
Salam,
The problem, when it return from interrupt to the main function to continue update the lcd with message1, i notice there strange characters appear on the lcd display !!!
Thanks

Hi,

How about clearing the display at the end of interrupt ? :)

Cheers !
 

For 8051 & ke*il C51 programmers ?

Hi. Look at your ISR do you save and restore all changed registers.

Best Regards.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top