Advance Information
GENERAL DESCRIPTION
DS-TMU3102MS
The TMU3102MS is an 8-bit microprocessor embedded device tailored to the USB general purpose
application. It includes an 8-bit RISC CPU core, 192-byte SRAM, Low Speed USB Interface and a 4K x 14
internal ROM.
FEATURES
Compliance with the Universal Serial Bus specification v1.1
Built-in USB Transceiver without external pull-up resister and 3.3V regulator
Support USB Suspend and Resume function
One Control IN/OUT and one Interrupt IN endpoints
PS2 compatible mouse interface share with USB interface
192 byte internal SRAM
4K x 14 internal Mask ROM
8-bit RISC CPU core with only 36 instruction
Internal Oscillator 6MHz±1.5% operation without external components.
3MHz instruction rate with 6MHz crystal oscillation.
Support internal wake up timer for power saving.
Dice form or 18/20/24 PDIP/SOP package
BLOCK DIAGRAM
USB
Transceiver
USB
SIE
Input
Interface
4K x 14
Input
Interface
4K x 14
Program
8-bit RISC
CPU
192 Bytes
SRAM
1
tenx technology, inc.
Rev.1.3, 2009/03/27
Preliminary
Advance Information
FUNCTIONAL DESCRIPTION
DS-TMU3102MS
1. CPU Core
1.1
Clock Scheme and Instruction Cycle
The clock input (X1) is internally divided by two to generate Q1 state and Q2 state for each instruction cycle.
The Programming Counter (PC) is updated at Q1 and the instruction is fetched from program ROM and
latched into the instruction register in Q2. It is then decoded and executed during the following Q1-Q2 cycle.
1.2
Programming Counter (PC) and Stack
The Programming Counter is 13-bit wide capable of addressing a 4K x 14 program ROM. As a program
instruction is executed, the PC will contain the address of the next program instruction to be executed. The
PC value is normally increased by one except the followings. The Reset Vector (0) and the Interrupt Vector
(1) are provided for PC initialization. For CALL/GOTO instructions, PC loads its lower 12 bits from instruction
word and the MSB from STATUS’s bit 6. For RET/RETI/RETLW instructions, PC retrieves its content from
the top level STACK. For the other instructions updating PC[7:0], the PC[12:8] keeps unchanged.
The STACK is 13-bit wide and 6-level in depth. The CALL instruction and Hardware interrupt will push
STACK level in order, While the RET/RETI/RETLW instruction pops the STACK level in order.
1.3
Addressing Mode
There are two Data Memory Plane in CPU, R-Plane and F-Plane. The registers in R-Plane are write-only.
The “MOVWR” instruction copy the W-register’s content to those registers by direct addressing mode.
Registers in F-Plane can be addressed directly or indirectly. Indirect Addressing is made by address “0”,
where FSR points to an actual address. The first half of F-Plane is also bit-addressable.
Program
0000
0001
Reset Vector
Interrupt Vector
Program ROM Page 0
STATUS.6=0
0fff
3f
00
R-Plane
00
MOVWR Instruction
Write Only
F-Plane
Registers, STATUS.4=0/1
Bit addressable
1f
20
RAM, STATUS.4=0 RAM, STATUS.4=1
Bit addressable
Bit addressable
3f
40
RAM, STATUS.4=0 RAM, STATUS.4=1
7f
3
tenx technology, inc.
Rev.1.3, 2009/03/27
Preliminary
Advance Information
DS-TMU3102MS
1.4
ALU and Working (W) Register
The ALU is 8 bits wide and capable of addition, subtraction, shift and logical operations. In two-operand
instructions, typically one operand is the W register, which is an 8-bit non-addressable register used for ALU
operations. The other operand is either a file register or an immediate constant. In single operand
instructions, the operand is either W register or a file register.
Depending on the instruction executed, the ALU may affect the values of Carry(C), Digit Carry(DC), and
Zero(Z) Flags in the STATUS register. The C and DC flags operate as a /Borrow and /Digit Borrow,
respectively, in subtraction.
1.5
STATUS Register
This register contains the arithmetic status of ALU and the page select for Program ROM and Data RAM.
The STATUS register can be the destination for any instruction, as with any other register. If the STATUS
register is the destination for an instruction that affects the Z, DC or C bits, then the write to these three bits
is disabled. These bits are set or cleared according to the device logic. It is recommended, therefore, that
only BCF, BSF and MOVWF instructions be used to alter the STATUS Register because these instructions
do not affect those bits.
1.6
Interrupt
Each interrupt source has its own enable control bit. An interrupt event will set its individual flag. If the
corresponding interrupt enable bit has been set, it would trigger CPU to service the interrupt. CPU accepts
interrupt in the end of current executed instruction cycle. In the mean while, A “CALL 0001” instruction is
inserted to CPU, and the I-flag is set to prevent recursive interrupt nesting. The I-flag is cleared in the
instruction after the “RETI” instruction. That is, at least one instruction in main program is executed before
service the pending interrupt. The interrupt event is level trigged. F/W must clear the interrupt event register
while serves the interrupt routine.
1.7
Instruction Set
Each instruction is a 14-bit word divided into an OPCODE, which specified the instruction type, and one or
more operands, which further specify the operation of the instruction. The instructions can be categorized as
byte-oriented, bit-oriented and literal operations list in the following table.
For byte-oriented instructions, “f” represents address designator and “d” represents destination designator.
The address designator is used to specify which address in F-Plane is to be used by the instruction. The
destination designator specifies where the result of the operation is to be placed. If “d” is “0”, the result is
placed in the W register. If “d” is “1”, the result is placed in the address specified in the instruction.
For bit-oriented instructions, “b” represents a bit field designator, which selects the number of the bit affected
by the operation, while “f” represents the address designator.
For literal operations, “k” represents the literal or constant value.
For “MOVWR” instruction, “r” specifies which address in R-Plane is to be used by the instruction.
All instructions are single cycle except for program branches, which are two-cycle.
4
tenx technology, inc.
Rev.1.3, 2009/03/27
Preliminary