ARM Technical Support Knowledge Articles

SIMULATING INT0 INTERRUPT

Applies to: uVision Debugger

Answer


Information in this article applies to:


QUESTION

How can I generate an INT0 when I'm simulating my program using the uVision Debugger?

ANSWER

On the 8051, INT0 is triggered whenever P3.2 goes low (if INT0 is configured for level-sensitive) or on the falling edge of P3.2.

To trigger the INT0 interrupt when you're simulating your program, all you have to do is set P3.2 (the input pin) low or toggle it low and back high again.

The debugger supports VTREGs which allow you to manipulate the simulated pins of PORT3.

So, to set P3.2 to a 0, in the Command Window enter the following:

PORT3 &= ~0x04

To toggle P3.2 low and back high, enter the following:

PORT3 &= ~0x04

// Delay for at least one clock cycle

PORT3 |=  0x04

Article last edited on: 2004-06-28 10:47:04

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential