English
Language : 

STMPE2401 Datasheet, PDF (38/55 Pages) STMicroelectronics – 24-bit Enhanced port expander with Keypad and PWM controller Xpander logic
PWM commands
STMPE2401
Table 36. Instruction
Bit
Instruction
15 14 13 12 11 10 9 8 7
Timing in 2kHz
6 5 4321 0
RAMP
0 Prescale Step Time
0=16
0 - 63
1=512 0 = immediate action
Sign Increment
0=step- 1 – 126
up
1=step-
down
Increment value
of 0 is not
allowed.
prescale = 16 :-
Consumes
[(step
time)(1)(increme
nt)] cycles
prescale = 512 :-
Consumes
[(32)(1) (step
time)(1)(increme
nt)] cycles
SMAX 0 x(2)
0
0
127
Consumes 1
cycle
SMIN 0 x(2)
0
1
127
Consumes 1
cycle
GTS 0 0
0
0
0
Consumes 1
cycle
BRANCH 1 01
Loop Counter to Loop Count
use
0 – 15
0-3
0 = forever
loop
0=absol Step Size
ute step 0 – 63(1)
size
1=relativ
e step
size(1)
Consumes 1
cycle
Once the loop
count has been
reached, the
loop counter
resets.
END 1 10
Interr
upt to
host
Reset
instructi
on
counter
and
output
level to
zero
RESERVED
Consumes 1
cycle
TRIG 1 11
Wait for Trigger
on channel 0 – 2
Continues if all selected triggers
present.
Each bit signifies wait for the
corresponding channel.
Send Trigger
on channel 0 – 2
Continues if no Wait
for Trigger in this
instruction.
x Consumes 1 or
(2) more cycles
reserved 1 00
RESERVED
Reserved.
1. Absolute Branch jumps to the absolute address (relative to address 0x0) using the value of step size. The Relative Branch
jumps in a backward manner relative to the current address location, ie. 1 means jump to the previous instruction location
and 0 means NOP.
2. Don’t care.
38/55