UI Robot Technology Co. Ltd.
M4220170607EN
Page 55
Miniature Integrated Stepper Motor Controller(
Closed-loop
)
10.0
TTL OUTPUT CONTROL
UIM2842 controller has an optional TTL Output Control Module (sold separately) that
supports 1 channel of TTL level output. This output port (P4) is capable of providing 20mA
sourcing or sinking current. In practice, please keep the current as low as possible to
prevent overheating the controller. Port P4 also can output setting level when detects
events list below (pre-configuration):
1. Run/Stop status. The output voltage level is determined by if the speed is zero or
not.
2. Direction change. The output voltage level is determined by if the current motor
direction is forward or reverse.
3. Origin point hit. The output voltage level is determined by if current position is zero
point or just crosses over the zero point.
10.1 Introduction to TTL Output Control Instructions
There are 3 instructions related to the TTL output control.
1)
MCF
The P4IE bit (MCFG<3>) of the master configuration register enables/disables
the P4 real-time change notification (RTCN). For details, please refer to section 5.1.
2)
SCF
is used to configure the register S34CON. S34CON is shared by Sensor 3 and
TTL output. When it works as TTL output, it definds the relationship between events
and outpult level.
3)
DOU
is used to directly control the TTL output voltage level as well as check current
voltage level.
10.2 TTL Output Control Register S34CON
For TTL output control, the upper byte of S34CON defines the binding between a certain
event and the output voltage level. S34CON is a 16-bit register inside the controller, and
can be configured using the instruction SCF. When writing to it user needs to affix a 4bits
suffix-code to point to this register. The suffix-code for S34CON is 0001 (binary).
In addition, S34CON is also used for sensor input control. In this chapter, only the TTL
output control related configuration is described.
S34CON Structure
Bit
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Defination
STALL
P4LVL
P4EVENT
S3RACT
S3FACT
Bit 15-12
Blocked alarm