3. Add 16-pin Package Dimension. 1. Add the Electrical Characteristics specs in the Features section. V1.4 Jan, 2012 2. Add description in Reset section. 4. Merge the information about LVR Circuit Characteristics into DC Characteristics table. tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
VDD, VSS Power Voltage input pin and ground PROM programming high voltage input INT0–INT2 External interrupt input PWM0–PWM1 PWM output IN0-, IN1-, IN+ Comparator voltage input CMPO Comparator output Clock input to Timer0 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
FSR register (FSR is a pointer). The first half of F-Plane is bit-addressable, while the second half of F-Plane is not bit-addressable. R-Plane F-Plane Bit Addressable MOVWR Instruction Write Only SRAM Bit Addressable SRAM tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
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. Note: /Borrow represents inverted of Borrow register. /Digit Borrow represents inverted of Digit Borrow register. tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
0: no carry result occurs C: Carry Flag or /Borrow Flag ADD instruction SUB instruction 1: a carry occurs from the MSB 1: no borrow 0: no carry 0: a borrow occurs from the MSB tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
An interrupt event will set its individual pending flag; no matter its interrupt enable control bit is 0 or 1. Because TM57PE10 has only 1 vector, there is not an interrupt priority register. The interrupt priority is determined by F/W.
UM-TM57PE10_E Advance Information 8-Bit Microcontroller 2. Chip Operation Mode 2.1 Reset The TM57PE10 can be RESET in four ways. - Power-On-Reset - Low Voltage Reset (LVR) - External Pin Reset (PA7) - Watchdog Reset (WDT) After Power-On-Reset, all system and peripheral control registers are then set to their default hardware Reset values.
WDT/WKT Timer is working or not depends on F/W setting. The Power down mode can be terminated by Reset, or enabled Interrupts (External pins and WKT interrupt) or PA1-6 and PB1-6 pins low level wake up. tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
SYSCFG[9:8] Fast Mode: After power on or reset, TM57PE10 enters fast mode. In fast mode, TM57PE10 can select FXT, XRC or FIRC as its CPU clock by SYSCFG bit9 and bit8 setting. Besides, firmware can also enable or disable the slow clock for the Timer2 system operating. In this mode, the program is executed using fast clock as CPU clock.
UM-TM57PE10_E Advance Information 8-Bit Microcontroller 2.6 Dual System Clock Modes Transition TM57PE10 is operated in one of four modes: Fast Mode, Slow Mode, Idle Mode, and Stop Mode. Modes Transition Diagram: SUBE= 0 or 1 SUBE=0 SELSUB=0 SELSUB=0 or 1...
If the user program needs the MCU totally shuts down for power conservation in sleep mode, the following setting of control bits should be followed. Mode WDTE WKTIE Watchdog RC Oscillator Stop Normal Mode Stop Sleep Mode Stop tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
PWM0DUTY to PWM0BUF, CLRPWM0 bit must be cleared so that the PWM0 counter can count. Figure shows the block diagram of PWM0. PWM0DUTY PA1O A<=B PWM0BUF PWM0O CLRPWM0 CLRPWM0 PWM0E CLRPWM0 PWM0PERIOD PWM0OVF PWM0I Fosc/1 Fosc/2 PWM0CNT Fosc/4 Fosc/8 PWM0IE PWM0PSC[1:0] CLRPWM0 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 23
Note: The div variable represents the prescale factor by PWM0PSC [1:0] select value (1, 2, 4, 8) div = PWM0PSC [1:0] when select 2’b00 = 1 When PWM0PERIOD = FFH, Fosc = 4 MHz, PWM0 output frequency = (4M)/1/256 = 15.625 KHz tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
8-Bit Microcontroller 3.6 Analog Comparator TM57PE10 includes an analog comparator. It can be enabled by CMPEN which is in R-Plane 17H Bit7. The analog comparator compares the input values on the positive pin Vin+ and negative pin Vin-. When the voltage on positive pin is higher than the voltage on the negative pin, the analog comparator out (CMPO) is set.
1 uF and 0.1 uF very close to VDD/VSS pins improves the stability of clock and the overall system. External Oscillator Circuit External RC Oscillator (Crystal or Ceramic) 0.1uF Internal RC Mode tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Drive Drive Drive Drive 4.3 PA7 PA7 can be only used in Schmitt-trigger input mode. The pull-up resistor is always connected to this pin. SYS_RESETn DATA pull-up Write WR_PAD DATA Read RD_PAD Read_Modify_Write tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
0: clear this flag; write 1: no action INT2 interrupt event pending flag, set by H/W at INT2 pin’s falling edge XINT2 09.2 write 0: clear this flag; write 1: no action tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 30
14.4 Reserved CMPST 14.3 Comparator output status CLRTM2 14.2 Write 1 to clear Timer2, auto cleared by H/W STOPTM0 14.1 Stop Timer0 counting CLRPWM0 14.0 PWM0 clear and hold SRAM 20~4F Internal RAM tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Destination selection field, 0: Working register, 1: Register file Working Register Zero Flag Carry Flag Decimal Carry Flag Program Counter Top Of Stack Global Interrupt Enable Flag (i-Flag) Option Field Contents Bit Field Before After ← Assign direction tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 34
RETLW Return with Literal in W 01 1000 kkkk kkkk Go into standby mode, Clock SLEEP TO,PD 00 0000 0000 0011 oscillation stops XORLW 01 1111 kkkk kkkk XOR Literal "k" with W tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 35
If 'd' is 1, the result is stored back in register 'f'. Cycle Example ANDWF FSR, 1 B : W = 0x17, FSR = 0xC2 A : W = 0x17, FSR = 0x02 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 36
1 or 2 Example LABEL1 BTFSS FLAG, 1 B : PC = LABEL1 TRUE GOTO SUB1 A : if FLAG.1 = 0, PC = TRUE FALSE if FLAG.1 = 1, PC = FALSE tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 37
WDT/WKT Timer ← 00h Operation Status Affected TO, PD OP-Code 00 0000 0000 0100 Description CLRWDT instruction clears the Watchdog/Wakeup Timer Cycle Example CLRWDT B : WDT counter = ? A : WDT counter = 0x00 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 38
GOTO is an unconditional branch. The 12-bit immediate value is loaded into PC bits <11:0>. GOTO is a two-cycle instruction. Cycle Example LABEL1 GOTO SUB1 B : PC = LABEL1 A : PC = SUB1 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 39
W register. If 'd' is 1, the result is placed back in register 'f'. Cycle Example IORWF RESULT, 0 B : RESULT = 0x13, W = 0x91 A : RESULT = 0x13, W = 0x93, Z = 0 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 40
00 0000 00rr rrrr Description Move data from W register to register 'r'. Cycle Example MOVWR REG1 B : REG1 = 0xFF, W = 0x4F A : REG1 = 0x4F, W = 0x4F tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 41
(the return address). This is a two-cycle instruction. Cycle Example CALL TABLE B : W = 0x07 A : W = value of k8 TABLE ADDWF PCL, 1 RETLW k1 RETLW k2 RETLW kn tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 42
SLEEP Go into standby mode, Clock oscillation stops Syntax SLEEP Operands Operation Status Affected TO, PD OP-Code 00 0000 0000 0011 Description Go into SLEEP mode with the oscillator stopped. Cycle Example SLEEP tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 43
If the content of register 'f' is 0, Zero flag is set to 1. Cycle Example TESTZ REG1 B : REG1 = 0, Z = ? A : REG1 = 0, Z = 1 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 44
W register. If 'd' is 1, the result is stored back in register 'f'. Cycle Example XORWF REG, 1 B : REG = 0xAF, W = 0xB5 A : REG = 0x1A, W = 0xB5 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Output current high per all PIN Output current low per 1 PIN Output current low per all PIN +150 Maximum Operating Voltage Operating temperature -40 to +85 °C Storage temperature -65 to +150 tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
= 5V, WKTPSC = 00 – – WDT wakeup time = 3V, WKTPSC = 00 – – CPU start up time = 5V – – 6. Characteristic Graphs WDT/WKT TimeOut vs. Voltage -40℃ 0℃ 25℃ 50℃ 85℃ tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 49
UM-TM57PE10_E Advance Information 8-Bit Microcontroller WDT/WKT TimeOut vs. Temperature 2.5V 5.5V ℃ LVR vs. Temperature LV 2.3V LV 1.5V ℃ FIRC Freq vs. Voltage -40℃ 0℃ 25℃ 50℃ 85℃ tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Page 50
UM-TM57PE10_E Advance Information 8-Bit Microcontroller FIRC Freq vs. Temperature 2.5V 3.0V 4.0V 5.0V 5.5V ℃ tenx technology inc. Preliminary Rev 1.4, 2012/01/19...
Need help?
Do you have a question about the TM57PE10 and is the answer not in the manual?
Questions and answers