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.

Why the interrupts in 8051 slow down the code?

Status
Not open for further replies.

nvd

Full Member level 2
Joined
Jan 17, 2005
Messages
129
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Location
Solar System
Activity points
1,219
I used interrupts in my code and the code seems to run a bit slower in the microcontroller. I used Keil compiler for that purpose. I a reading the scan codes of a standard IBM keyboard. With serial interrupt ES=1, the code run slower.

Isn't interrupt raised when there is any serial data. No data is sent but still the performance is slower. Does the microcontroller pool the interrupts or what?

Regards.
 

Re: 8051 Interrupt

microcontrollers dont poll for the interrupts as polling decreases the efficency of the cpu.. ur polling only to see whether a key as been pressed r not.....
 

Re: 8051 Interrupt

Without knowing your code it is difficult to judge what may cause slowing it down ..
Post it here and someone may give you a hand in solving this problem ..

Regards,
IanP
 

Re: 8051 Interrupt

I am reading the scan codes of a standard IBM keyboard. With serial interrupt ES=1, the code run slower.
The IBM keyboard signal is similar with UART signal, but it isn't! The key board need external clock to transmit scan code, but UART is running without separate clock!
Don't use UART to capture that signal.

Do you ever receive the scan code even the processor run slower?
 

8051 Interrupt

I think the interrupt response time is related with the MCU clock and the data transmit frequency of keyboard.I interfaced 8051 to a keyboard in a project before. The response time is ok.
 

Re: 8051 Interrupt

8052.com good ref.
 

Re: 8051 Interrupt

The interruption rutines mustn't be with large code.

The interruptions have to modify only global variables and use those global variables in the main function to do what you want to.

I don't know if it'll be usefull in this case but is a good idea to program
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top