FEELING
TECHNOLOGY
Devices Included in this Data Sheet:
‧
FM8P51E : EPROM device
‧
FM8P51 : Mask ROM device
FM8P51
EPROM/ROM-Based 8-Bit Microcontroller
FEATURES
‧
Only 47 single word instructions
‧
All instructions are single cycle except for program branches which are two-cycle
‧
13-bit wide instructions
‧
8-bit wide data path
‧
5-level deep hardware stack
‧
4K x 13 bits on chip EPROM/ROM
‧
140 x 8 bits on chip general purpose registers (SRAM)
‧
Operating speed: DC-20 MHz clock input
DC-100 ns instruction cycle
‧
Direct, indirect addressing modes for data accessing
‧
One 8-bit real time clock/counter (Timer0) with 8-bit programmable prescaler
‧
Three 8-bit real time clock/counter (Timer1, Timer2, and Timer3) with period setting
‧
Internal Power-on Reset (POR)
‧
Built-in Low Voltage Detector (LVD) for Brown-out Reset (BOR)
‧
Power-up Reset Timer (PWRT) and Oscillator Start-up Timer(OST)
‧
On chip Watchdog Timer (WDT) with internal oscillator for reliable operation and soft-ware watch-dog
enable/disable control
‧
Five I/O ports (38 I/O pins) with independent direction control
‧
32 programmable pull-high input pins
‧
12 wake-up pins
‧
2 open-drain pins
‧
2 R-option pins
‧
Clock output with high driving ability
‧
19 channels of 15-bit resolution Resistor to Frequency Converter (RFC) output
‧
2 channels of maximum 10-bit resolution Pulse Width Modulation (PWM) output
‧
Built-in 8-bit data comparator
‧
Seven internal interrupt source: Timer0 overflow, Timer1 match, Timer2 match, Timer3 match, SPI module
(Receive & Transmit), RFC module; One external interrupt source: INT pin change
‧
Wake-up from SLEEP by port input change
‧
Power saving SLEEP mode
‧
Programmable Code Protection
‧
Built-in RC oscillator with external resistor
‧
Selectable oscillator options:
- ERC: External Resistor/Capacitor Oscillator
- ERIC: External Resistor/Internal Capacitor Oscillator
- HF: High Frequency Crystal/Resonator Oscillator
- LF: Low Frequency Crystal Oscillator
‧
Wide-operating voltage range:
- EPROM : 2.3V to 5.5V
- ROM : 2.3V to 5.5V
This datasheet contains new product information. Feeling Technology reserves the rights to modify the product specification without notice.
No liability is assumed as a result of the use of this product. No rights under any patent accompany the sales of the product.
Rev1.2 Mar 15, 2005
P.1/FM8P51
FEELING
TECHNOLOGY
GENERAL DESCRIPTION
FM8P51
The FM8P51 series is a family of low-cost, high speed, high noise immunity, EPROM/ROM-based 8-bit CMOS
microcontrollers. It employs a RISC architecture with only 47 instructions. All instructions are single cycle except
for program branches which take two cycles. The easy to use and easy to remember instruction set reduces
development time significantly.
The FM8P51 series consists of Power-on Reset (POR), Brown-out Reset (BOR), Power-up Reset Timer (PWRT),
Oscillator Start-up Timer(OST), Watchdog Timer, EPROM/ROM, SRAM, tri-state I/O port, I/O pull-high/open-drain
control, Power saving SLEEP mode, 4 real time programmable clock/counter, Interrupt, SPI, RFC, data compare,
Wake-up from SLEEP mode, and Code Protection for EPROM products. There are four oscillator configurations to
choose from, including the power-saving LP (Low Power) oscillator and cost saving RC oscillator.
The FM8P51 series address 4K×13 of program memory.
The FM8P51 series can directly or indirectly address its register files and data memory. All special function
registers including the program counter are mapped in the data memory.
BLOCK DIAGRAM
Oscillator
Circuit
5-level
STACK
SRAM
Watchdog
Timer
Program
Counter
FSR
PORTE
PORTD
ALU
EPROM
/ ROM
Instruction
Decoder
PORTC
PORTB
Interrupt
Control
Timer 0 ~ 3
Accumulator
PORTA
PWM
RFC
SPI
Rev1.2 Mar 15, 2005
P.2/FM8P51
FEELING
TECHNOLOGY
PIN CONNECTION
PDIP
Vss
INT
DATA/RFC17
CLK/RFC18
IOE0
IOE1
IOE2/SDI
IOE3/SDO
IOE4/SCK
IOE5/SSB
IOA0/PWM0
IOA1/CX
IOA2/RFC0
IOA3/RFC1
IOA4/RFC2
IOA5/RFC3
IOA6/RFC4
IOA7/RFC5
IOD0/RFC6
IOD1/RFC7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
OSCO
OSCI
Vdd
IOC0/PWM1
IOC1/RFC16
IOC2/RFC15
IOB7/RFC14
IOB6/RFC13
IOB5/RFC12
IOB4/RFC11
IOB3/RFC10
IOB2/RFC9
IOB1/RFC8
IOB0/T23CKI
IOD7
IOD6
IOB5
IOD5
IOD4
IOD3
IOD2
FM8P51
FM8P51
FM8P51E
31
30
29
28
27
26
25
17
24
23
22
21
IOE7/CKOUT
DATA/RFC17
IOC0/PWM1
CLK/RFC18
QFP
OSCO
OSCI
IOC3
IOE6
Vdd
Vss
INT
42
44
43
41
40
39
38
37
36
35
34
IOE0
IOE1
IOE2/SDI
IOE3/SDO
IOE4/SCK
IOE5/SSB
IOA0/PWM0
IOA1/CX
IOA2/RFC0
IOA3/RFC1
IOA4/RFC2
1
2
3
4
5
6
7
8
9
10
11
33
32
31
30
29
28
27
26
25
24
23
IOC1/RFC16
IOC2/RFC15
IOB7/RFC14
IOB6/RFC13
IOB5/RFC12
IOB4/RFC11
IOB3/RFC10
IOB2/RFC9
IOB1/RFC8
IOB0/T23CKI
IOD7
FM8P51
FM8P51E
22
21
12
IOA5/RFC3
13
IOA6/RFC4
14
IOA7/RFC5
15
IOD0/RFC6
16
IOD1/RFC7
17
RSTB
18
IOD2
19
IOD3
20
IOD4
IOD5
IOD6
Rev1.2 Mar 15, 2005
P.3/FM8P51
FEELING
TECHNOLOGY
PIN DESCRIPTIONS
Name
IOA0 ~ IOA7
I/O
I/O
Description
FM8P51
Bi-direction I/O port
Software controlled pull-high for all pins
Bi-direction I/O port with system wake-up function
IOB0 ~ IOB7 I/O
Software controlled pull-high for all pins
IOC0 ~ IOC2 I/O Bi-direction I/O pins with driving ability selection
IOC3
I/O Bi-direction I/O pin
By connecting IOC4 and IOC6 together
IOC4 is a bi-direction I/O pin with system wake-up and software controlled pull-high function
CLK
I/O
IOC6 is a bi-direction I/O pin with software controlled open-drain output
Note : Both IOC4 and IOC6 should not be defined as output pins at the same time.
By connecting IOC5 and IOC7 together
IOC5 is a bi-direction I/O pin with system wake-up and software controlled pull-high function
DATA
I/O
IOC7 is a bi-direction I/O pin with software controlled open-drain output
Note : Both IOC5 and IOC7 should not be defined as output pins at the same time.
Bi-direction I/O port
IOD0 ~ IOD7 I/O Software controlled pull-high for all pins
IOD0 and IOD1 are R-option pins
Bi-direction I/O pins with system wake-up function
IOE0 ~ IOE1 I/O
Software controlled pull-high for all pins
Bi-direction I/O pins
IOE2 ~ IOE5 I/O
All pins can be pulled-high by software
IOE6 ~ IOE7 I/O Bi-direction I/O pins
INT
I External interrupt input triggered by falling edge
SDI
I Serial data in for SPI
SDO
O Serial data out for SPI
SCK
I/O Serial clock for SPI
SSB
I Slave select (active low) for SPI
PWM0 ~ PWM1 O PWM output pins
RFC0 ~ RFC18 O The RC oscillator network output of RFC module
CX
I The RC oscillator network input of RFC module
X’tal type: Oscillator crystal input
OSCI
I
RC type: Clock input of RC oscillator
X’tal type: Oscillator crystal output.
OSCO
O
RC mode: Outputs with 1/4 the frequency of OSCI to denotes the instruction cycle rate
CKOUT
O Oscillator frequency output with high driving ability and output phase selection
System clear (RESET) input. This pin is an active low RESET to the device. Internal weak
RSTB
I
pull-high.
Vdd
- Positive supply
Vss
- Ground
Legend: I=input, O=output, I/O=input/output
Rev1.2 Mar 15, 2005
P.4/FM8P51
FEELING
TECHNOLOGY
1.0 MEMORY ORGANIZATION
FM8P51 series memory is organized into program memory and data memory.
FM8P51
1.1 Program Memory Organization
The FM8P51 series have an 12-bit Program Counter capable of addressing a 4K×13 program memory space.
The RESET vector for the FM8P51 series is at FFFh.
The H/W interrupt vector is at 001h. And the S/W interrupt vector is at 002h.
FM8P51 series has program memory size greater than 1K words, but the CALL and GOTO instructions only have a
10-bit address range. This 10-bit address range allows a branch within a 1K program memory page size. To allow
CALL and GOTO instructions to address the entire 4K program memory address range for FM8P51 series, there is
another two bits to specify the program memory page. This paging bit comes from the PG<1:0> bits (STATUS<6:5>).
When doing a CALL or GOTO instruction, the user must ensure that page bit PG<1:0> are programmed so that the
desired program memory page is addressed. When one of the return instructions is executed, the entire 12-bit PC is
POPed from the stack. Therefore, manipulation of the PG <1:0> is not required for the return instructions.
FIGURE 1.1: Program Memory Map and STACK
PC<11:0>
Stack 1
Stack 2
Stack 3
Stack 4
Stack 5
FFFh
Reset Vector
:
:
002h S/W Interrupt Vector
001h H/W Interrupt Vector
000h
FM8P51 Series
Rev1.2 Mar 15, 2005
P.5/FM8P51