Everything

debugger.PseudoTimer.Set


This function sets pseudo-timers. [RL78 instruction simulator]

[Specification format]

debugger.PseudoTimer.Set(pseudoTimerNumber, PseudoTimerCondition)

[Argument(s)]

Argument

Caution 1.

Description

pseudoTimerNumber

Specify the pseudo-timer number to be set (numerical value: 1 to 61).

PseudoTimerCondition

Specify the pseudo-timer condition.

See the PseudoTimerCondition class for creating pseudo-timer conditions.

[Return value]

If pseudo-timers were set successfully :True

If there was an error when setting pseudo-timers :False

[Detailed description]

-

A pseudo-timer with the specified pseudo-timer number is set and counting is started according to the description specified by PseudoTimerCondition.

-

When counting reaches the interval time specified in PseudoTimerCondition, an interrupt is generated with the specified priority in the specified interrupt vector address.

-

If "Reset" or 0x0 is specified for the interrupt vector address, a reset will be generated.

-

An interrupt is generated in the interrupt enable (EI) state. It is reserved in the interrupt disable (DI) state and generated when the state next becomes interrupt enable (EI).

-

Setting registers for the interrupt functions is not required. Among such registers, only the PSW is changed by an interrupt.

-

If a reset is generated, counting by the pseudo-timer will be stopped and all pseudo-timers which have been set will be deleted.

-

The pseudo-timer continues counting in the halt and stop modes.

-

If the pseudo-timer number which has already been set is specified, the given pseudo-timer will be enabled and setting of the new pseudo-timer will fail.

[Example of use]

>>>ptc1 = PseudoTimerCondition()
>>>ptc1.VectorAddr = 0x40
>>>ptc1.Priority = 3
>>>ptc1.IntervalTime = 1
>>>ptc1.IntervalTimeUnit = IntervalTimeUnit.Ms
>>>ptc1.Periodic = False
>>>debugger.PseudoTimer.Set(1, ptc1)
True
>>>