欢迎访问ic37.com |
会员登录 免费注册
发布采购
所在地: 型号: 精确
  • 批量询价
  •  
  • 供应商
  • 型号
  • 数量
  • 厂商
  • 封装
  • 批号
  • 交易说明
  • 询价
  •  
  • 北京元坤伟业科技有限公司

         该会员已使用本站17年以上

  • W78L365A24PL
  • 数量-
  • 厂家-
  • 封装-
  • 批号-
  • -
  • QQ:857273081QQ:857273081 复制
    QQ:1594462451QQ:1594462451 复制
  • 010-62104931、62106431、62104891、62104791 QQ:857273081QQ:1594462451
更多
  • W78L365A24PL图
  • 深圳市拓亿芯电子有限公司

     该会员已使用本站12年以上
  • W78L365A24PL 现货库存
  • 数量21000 
  • 厂家WINBOND/华邦 
  • 封装PLCC44 
  • 批号23+ 
  • 代理原装现货,价格优势
  • QQ:1774550803QQ:1774550803 复制
    QQ:2924695115QQ:2924695115 复制
  • 0755-82777855 QQ:1774550803QQ:2924695115
  • W78L365A24PL图
  • 深圳市世鹏电子科技有限公司

     该会员已使用本站13年以上
  • W78L365A24PL 现货库存
  • 数量5378 
  • 厂家华邦WINBOND 
  • 封装PLCC44 
  • 批号2022+ 
  • 热卖产品!
  • QQ:80034248QQ:80034248 复制
    QQ:100633298QQ:100633298 复制
  • 0755-83987638 88877298 QQ:80034248QQ:100633298
  • W78L365A24PL图
  • 上海磐岳电子有限公司

     该会员已使用本站11年以上
  • W78L365A24PL 现货库存
  • 数量9000 
  • 厂家Winbond 
  • 封装 
  • 批号2024+ 
  • 全新原装现货,全网最低价
  • QQ:3003653665QQ:3003653665 复制
    QQ:1325513291QQ:1325513291 复制
  • 021-60341766 QQ:3003653665QQ:1325513291
  • W78L365A24PL图
  • 深圳市芯福林电子有限公司

     该会员已使用本站15年以上
  • W78L365A24PL
  • 数量98500 
  • 厂家NUVOTON 
  • 封装原厂封装 
  • 批号23+ 
  • 真实库存全新原装正品!代理此型号
  • QQ:2881495751QQ:2881495751 复制
  • 0755-88917743 QQ:2881495751
  • W78L365A24PL图
  • 深圳市羿芯诚电子有限公司

     该会员已使用本站7年以上
  • W78L365A24PL
  • 数量183 
  • 厂家WINBOND/华邦 
  • 封装PLCC44 
  • 批号21+ 
  • 羿芯诚只做原装 原厂渠道 价格优势
  • QQ:2881498351QQ:2881498351 复制
  • 0755-22968581 QQ:2881498351
  • W78L365A24PL图
  • 深圳市毅创腾电子科技有限公司

     该会员已使用本站16年以上
  • W78L365A24PL
  • 数量3195 
  • 厂家WINBOND 
  • 封装PLCC44 
  • 批号22+ 
  • ★只做原装★正品现货★原盒原标★
  • QQ:2355507168QQ:2355507168 复制
    QQ:2355507169QQ:2355507169 复制
  • 86-755-83219286 QQ:2355507168QQ:2355507169
  • W78L365A24PL图
  • 深圳市金嘉锐电子有限公司

     该会员已使用本站14年以上
  • W78L365A24PL
  • 数量28620 
  • 厂家Nuvoton 
  • 封装44-LCC 
  • 批号24+ 
  • 【原装优势★★★绝对有货】
  • QQ:2643490444QQ:2643490444 复制
  • 0755-22929859 QQ:2643490444
  • W78L365A24PL图
  • 深圳市晶美隆科技有限公司

     该会员已使用本站14年以上
  • W78L365A24PL
  • 数量18583 
  • 厂家WINBOND/华邦 
  • 封装PLCC44 
  • 批号23+ 
  • 全新原装正品现货热卖
  • QQ:2885348339QQ:2885348339 复制
    QQ:2885348317QQ:2885348317 复制
  • 0755-82519391 QQ:2885348339QQ:2885348317
  • W78L365A24PL图
  • 深圳市赛尔通科技有限公司

     该会员已使用本站12年以上
  • W78L365A24PL
  • 数量84500 
  • 厂家WINBOND代 
  • 封装PLCC 
  • 批号NEW(原装正品) 
  • WINBOND代理商,现货热卖
  • QQ:1134344845QQ:1134344845 复制
    QQ:847984313QQ:847984313 复制
  • 86-0755-83536093 QQ:1134344845QQ:847984313
  • W78L365A24PL图
  • 深圳市华芯盛世科技有限公司

     该会员已使用本站13年以上
  • W78L365A24PL
  • 数量853500 
  • 厂家WINBOND 
  • 封装原厂封装 
  • 批号最新批号 
  • 一级代理,原装特价现货!
  • QQ:2881475757QQ:2881475757 复制
  • 0755-83225692 QQ:2881475757
  • W78L365A24PL图
  • 深圳市惊羽科技有限公司

     该会员已使用本站11年以上
  • W78L365A24PL
  • 数量9328 
  • 厂家NUVOTON 
  • 封装44-PLCC 
  • 批号▉▉:2年内 
  • ▉▉¥18.3元一有问必回一有长期订货一备货HK仓库
  • QQ:43871025QQ:43871025 复制
  • 131-4700-5145---Q-微-恭-候---有-问-秒-回 QQ:43871025
  • W78L365A24PL图
  • 深圳市和谐世家电子有限公司

     该会员已使用本站13年以上
  • W78L365A24PL
  • 数量5248 
  • 厂家Nuvoton Technology Corporation of Americ 
  • 封装
  • 批号最新批号 
  • 只做进口原装
  • QQ:1158840606QQ:1158840606 复制
  • 0755+84501032 QQ:1158840606
  • W78L365A24PL图
  • 深圳市斌腾达科技有限公司

     该会员已使用本站9年以上
  • W78L365A24PL
  • 数量5860 
  • 厂家Nuvoton Technology Corporation of Americ 
  • 封装44-LCC(J 形引线) 
  • 批号18+ 
  • 100%进口原装!长期供应!绝对优势价格(诚信经营
  • QQ:2881704051QQ:2881704051 复制
    QQ:2881704535QQ:2881704535 复制
  • 0755-82815082 QQ:2881704051QQ:2881704535
  • W78L365A24PL图
  • 上海意淼电子科技有限公司

     该会员已使用本站14年以上
  • W78L365A24PL
  • 数量20000 
  • 厂家华邦 
  • 封装PLCC44 
  • 批号23+ 
  • 原装现货热卖!请联系吴先生 13681678667
  • QQ:617677003QQ:617677003 复制
  • 15618836863 QQ:617677003
  • W78L365A24PL图
  • 深圳市世鹏电子科技有限公司

     该会员已使用本站13年以上
  • W78L365A24PL
  • 数量
  • 厂家WINBOND 
  • 封装 
  • 批号2022+ 
  • 原装常用现货,订货4-6周
  • QQ:80034248QQ:80034248 复制
    QQ:100633298QQ:100633298 复制
  • 0755-83987638 88877298 QQ:80034248QQ:100633298
  • W78L365A24PL图
  • 万三科技(深圳)有限公司

     该会员已使用本站2年以上
  • W78L365A24PL
  • 数量660000 
  • 厂家Nuvoton Technology Corporation of Americ 
  • 封装原厂原装 
  • 批号23+ 
  • 支持实单/只做原装
  • QQ:3008961398QQ:3008961398 复制
  • 0755-21006672 QQ:3008961398
  • W78L365A24PL图
  • 深圳市卓越微芯电子有限公司

     该会员已使用本站12年以上
  • W78L365A24PL
  • 数量5300 
  • 厂家WINBOND 
  • 封装PLCC44 
  • 批号20+ 
  • 百分百原装正品 真实公司现货库存 本公司只做原装 可开13%增值税发票,支持样品,欢迎来电咨询!
  • QQ:1437347957QQ:1437347957 复制
    QQ:1205045963QQ:1205045963 复制
  • 0755-82343089 QQ:1437347957QQ:1205045963
  • W78L365A24PL图
  • 深圳市特拉特科技有限公司

     该会员已使用本站2年以上
  • W78L365A24PL
  • 数量6000 
  • 厂家WB 
  • 封装PLCC 
  • 批号22+ 
  • 原厂直供现货价优十年信誉保证每一片都来自原厂
  • QQ:709809857QQ:709809857 复制
  • 0755-82531732 QQ:709809857
  • W78L365A24PL图
  • 深圳市隆鑫创展电子有限公司

     该会员已使用本站15年以上
  • W78L365A24PL
  • 数量30000 
  • 厂家TI 
  • 封装TO-220 
  • 批号2022+ 
  • 电子元器件一站式配套服务QQ:122350038
  • QQ:2355878626QQ:2355878626 复制
    QQ:2850299242QQ:2850299242 复制
  • 0755-82812278 QQ:2355878626QQ:2850299242
  • W78L365A24PL图
  • 北京力通科信电子有限公司

     该会员已使用本站10年以上
  • W78L365A24PL
  • 数量1000 
  • 厂家WINBOND 
  • 封装PLCC44 
  • 批号06+07+ 
  • 北京深圳原装现货热卖特价
  • QQ:2355365902QQ:2355365902 复制
    QQ:2355365899QQ:2355365899 复制
  • 010-82625766 QQ:2355365902QQ:2355365899
  • W78L365A24PL图
  • 万三科技(深圳)有限公司

     该会员已使用本站2年以上
  • W78L365A24PL
  • 数量6500000 
  • 厂家新唐 
  • 封装原厂原装 
  • 批号22+ 
  • 万三科技 秉承原装 实单可议
  • QQ:3008962483QQ:3008962483 复制
  • 0755-23763516 QQ:3008962483
  • W78L365A24PL图
  • 深圳市一线半导体有限公司

     该会员已使用本站11年以上
  • W78L365A24PL
  • 数量15000 
  • 厂家Nuvoton Technology Corporation of Americ 
  • 封装 
  • 批号 
  • 全新原装部分现货其他订货
  • QQ:2881493920QQ:2881493920 复制
    QQ:2881493921QQ:2881493921 复制
  • 0755-88608801多线 QQ:2881493920QQ:2881493921
  • W78L365A24PL/FL图
  • 深圳市一线半导体有限公司

     该会员已使用本站11年以上
  • W78L365A24PL/FL
  • 数量15000 
  • 厂家原厂品牌 
  • 封装原厂外观 
  • 批号 
  • 全新原装部分现货其他订货
  • QQ:2881493920QQ:2881493920 复制
    QQ:2881493921QQ:2881493921 复制
  • 0755-88608801多线 QQ:2881493920QQ:2881493921
  • W78L365A24PL图
  • 深圳市凯信扬科技有限公司

     该会员已使用本站7年以上
  • W78L365A24PL
  • 数量7800 
  • 厂家WINBOND/华邦 
  • 封装PLCC44 
  • 批号21+ 
  • 主营品牌,代理渠道,价格优势
  • QQ:872328909QQ:872328909 复制
  • 0755-82518059 QQ:872328909
  • W78L365A24PL图
  • 深圳市瑞天芯科技有限公司

     该会员已使用本站7年以上
  • W78L365A24PL
  • 数量20000 
  • 厂家WINBOND 
  • 封装PLCC44 
  • 批号22+ 
  • 深圳现货库存,保证原装正品
  • QQ:1940213521QQ:1940213521 复制
  • 15973558688 QQ:1940213521
  • W78L365A24PL图
  • 深圳市科雨电子有限公司

     该会员已使用本站9年以上
  • W78L365A24PL
  • 数量56800 
  • 厂家WINBOND 
  • 封装PLCC44 
  • 批号21+ 
  • PLCC44
  • QQ:97877807QQ:97877807 复制
  • 171-4755-1968(微信同号) QQ:97877807
  • W78L365A24PL图
  • 深圳市科雨电子有限公司

     该会员已使用本站9年以上
  • W78L365A24PL
  • 数量240 
  • 厂家NUVOTON 
  • 封装IC 
  • 批号21+ 
  • ★体验愉快问购元件!!就找我吧!单价:51元
  • QQ:1415691092QQ:1415691092 复制
  • 133-5299-5145(微信同号) QQ:1415691092

产品型号W78L365A24PL的概述

芯片 W78L365A24PL 概述 W78L365A24PL 是一款集成电路芯片,属于微控制器(Microcontroller,MCU)系列产品。这款芯片以其低功耗、高性能和易于使用的特性,广泛应用于各种嵌入式系统中。其设计目标是为开发者提供一种简单而有效的解决方案,以满足快速设计和开发的需求。 W78L365A24PL 的详细参数 W78L365A24PL 具有以下主要技术参数: 1. 核心架构:基于 8 位微处理器架构,具有成熟的指令集,支持多种编程语言。 2. 工作频率:该芯片通常在 24MHz 的频率下运行,能够有效处理复杂的计算任务。 3. 内存容量: - RAM:256 字节 - ROM:8KB,支持用户程序和数据存储。 4. 输入输出端口:提供了多个可编程 I/O 端口,可以灵活地连接外部设备。 5. 定时器功能:内置多达两个 16 位定时器,用于精确的时间...

产品型号W78L365A24PL的Datasheet PDF文件预览

W78LE365/W78L365A Data Sheet  
8-BIT MICROCONTROLLER  
Table of Contents-  
1.  
2.  
3.  
4.  
5.  
GENERAL DESCRIPTION ......................................................................................................... 3  
FEATURES................................................................................................................................. 3  
PIN CONFIGURATIONS ............................................................................................................ 4  
PIN DESCRIPTION..................................................................................................................... 5  
FUNCTIONAL DESCRIPTION ................................................................................................... 6  
5.1  
5.2  
RAM................................................................................................................................ 6  
Timers 0, 1 and 2............................................................................................................ 7  
5.2.1 Timer 2 Output .................................................................................................................7  
5.3  
5.4  
Clock............................................................................................................................... 7  
5.3.1 Crystal Oscillator ..............................................................................................................7  
5.3.2 External Clock ..................................................................................................................7  
Power Management........................................................................................................ 8  
5.4.1 Idle Mode..........................................................................................................................8  
5.4.2 Power-down Mode............................................................................................................8  
5.4.3 Reduce EMI Emission ......................................................................................................8  
5.5  
5.6  
Reset............................................................................................................................... 9  
5.5.1 W78L365A Special Function Registers (SFRs) and Reset Values...................................9  
Port 4 ............................................................................................................................ 10  
5.6.1 Port Options Register .....................................................................................................10  
5.6.2 INT2 /INT3 ..................................................................................................................10  
5.6.3 Port 4 Base Address Registers ......................................................................................13  
Pulse Width Modulated Outputs (PWM)....................................................................... 14  
Watchdog Timer ........................................................................................................... 17  
In-System Programming (ISP) Mode............................................................................ 19  
5.9.1 In-System Programming Control Register (CHPCON) ...................................................20  
5.7  
5.8  
5.9  
5.10 Software Reset ............................................................................................................. 21  
5.11 H/W Reboot Mode (Boot from LDROM)....................................................................... 21  
SECURITY................................................................................................................................ 24  
6.  
7.  
6.1  
6.2  
6.3  
6.4  
Lock Bit ......................................................................................................................... 24  
MOVC Inhibit................................................................................................................. 24  
Encryption..................................................................................................................... 25  
Oscillator Control .......................................................................................................... 25  
ELECTRICAL CHARACTERISTICS......................................................................................... 26  
Publication Release Date: January 10, 2007  
- 1 -  
Revision A7  
W78LE365/W78L365A  
7.1  
7.2  
7.3  
Absolute Maximum Ratings.......................................................................................... 26  
D.C. Characteristics...................................................................................................... 26  
A.C. Characteristics...................................................................................................... 28  
8.  
TIMING WAVEFORMS............................................................................................................. 29  
8.1  
8.2  
8.3  
8.4  
Program Fetch Cycle.................................................................................................... 29  
Data Read Cycle........................................................................................................... 30  
Data Write Cycle........................................................................................................... 31  
Port Access Cycle......................................................................................................... 32  
9.  
TYPICAL APPLICATION CIRCUIT........................................................................................... 33  
9.1  
9.2  
External Program Memory and Crystal ........................................................................ 33  
Expanded External Data Memory and Oscillator ......................................................... 34  
10.  
PACKAGE DIMENSIONS......................................................................................................... 35  
10.1 40-pin DIP..................................................................................................................... 35  
10.2 44-pin PLCC ................................................................................................................. 35  
10.3 44-pin PQFP ................................................................................................................. 36  
10.4 48-pin LQFP.................................................................................................................. 36  
APPLICATION NOTE ............................................................................................................... 37  
11.1 In-system Programming Software Examples ............................................................... 37  
REVISION HISTORY................................................................................................................ 42  
11.  
12.  
- 2 -  
W78LE365/W78L365A  
1. GENERAL DESCRIPTION  
The W78L365A is an 8-bit microcontroller which has an in-system programmable Flash EPROM for  
firmware updating. The instruction set of the W78L365A is fully compatible with the standard 8052.  
The W78L365A contains a 64K bytes of main ROM and a 4K bytes of auxiliary ROM which allows the  
contents of the 64KB main ROM to be updated by the loader program located at the 4KB auxiliary  
ROM; 256+1K bytes of on-chip RAM; four 8-bit bi-directional and bit-addressable I/O ports; an  
additional 4-bit port P4; three 16-bit timer/counters; a serial port. These peripherals are supported by a  
eight sources two-level interrupt capability. To facilitate programming and verification, the ROM inside  
the W78L365A allows the program memory to be programmed and read electronically. Once the code  
is confirmed, the user can protect the code for security.  
The W78L365A microcontroller has two power reduction modes, idle mode and power-down mode,  
both of which are software selectable. The idle mode turns off the processor clock but allows for  
continued peripheral operation. The power-down mode stops the crystal oscillator for minimum power  
consumption. The external clock can be stopped at any time and in any state without affecting the  
processor.  
2. FEATURES  
Fully static design 8-bit CMOS microcontroller  
64K bytes of in-system programmable Flash EPROM for Application Program (APROM)  
4K bytes of auxiliary ROM for Loader Program (LDROM)  
256+1K bytes of on-chip RAM. (Including 1K bytes of AUX-RAM, software selectable)  
Four 8-bit bi-directional ports  
One 4-bit multipurpose programmable port (I/O, interrupt, Chip select function)  
Three 16-bit timer/counters  
One full duplex serial port  
Watchdog timer  
Software Reset  
P1.0 T2 programmable clock out  
Eight-sources, two-level interrupt capability  
Up to 20 MHz  
Built-in power management  
Code protection  
Packaged in  
Lead Free (RoHS) DIP 40:  
W78L365A24DL  
Lead Free (RoHS) PLCC 44: W78L365A24PL  
Lead Free (RoHS) QFP 44: W78L365A24FL  
Lead Free (RoHS) LQFP 48: W78L365A24LL  
Publication Release Date: January 10, 2007  
Revision A7  
- 3 -  
W78LE365/W78L365A  
3. PIN CONFIGURATIONS  
44-pin PLCC  
/
T
2
E
X
,
I
40-pin DIP  
A
D
1
,
A
D
2
,
A
D
3
,
N
T
3
,
A
D
0
,
T
2
,
P
1
.
P
1
.
P
0
.
P
0
.
P
0
.
P
1
.
P
1
.
P
1
.
P
0
.
P
4
.
1
VDD  
40  
39  
38  
37  
36  
35  
34  
33  
32  
31  
30  
29  
28  
27  
26  
25  
24  
23  
22  
21  
T2, P1.0  
T2EX, P1.1  
V
D
D
2
3
4
5
6
7
8
9
P0.0, AD0  
P0.1, AD1  
P0.2, AD2  
P0.3, AD3  
P0.4, AD4  
P0.5, AD5  
P0.6, AD6  
P0.7, AD7  
EA  
ALE  
PSEN  
P2.7, A15  
P2.6, A14  
P2.5, A13  
P2.4, A12  
P2.3, A11  
P2.2, A10  
P2.1, A9  
4
3
2
1
0
1
2
3
2
0
P1.2  
P1.3  
40  
39  
6
5
4
3
2
1
44 43 42  
41  
P1.4  
P1.5  
P1.6  
P1.7  
7
8
9
P1.5  
P1.6  
P1.7  
RST  
P0.4, AD4  
P0.5, AD5  
P0.6, AD6  
P0.7, AD7  
EA  
P4.1  
ALE  
PSEN  
P2.7, A15  
38  
37  
36  
35  
34  
33  
32  
31  
10  
11  
12  
13  
14  
15  
RST  
RXD, P3.0  
INT2, P4.3  
TXD, P3.1  
INT0, P3.2  
INT1, P3.3  
T0, P3.4  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
RXD, P3.0  
TXD, P3.1  
INT0, P3.2  
INT1, P3.3  
T0, P3.4  
T1, P3.5  
30  
16  
17  
P2.6, A14  
P2.5, A13  
29  
T1, P3.5  
WR, P3.6  
18 19 20 21 22 23 24 25 26 27 28  
RD, P3.7  
XTAL2  
XTAL1  
VSS  
P
3
.
P
3
.
X
T
A
L
2
X
T
A
L
1
V
S
S
P
2
.
P
2
.
P
2
.
P
2
.
P
2
.
P
4
.
6
,
7
,
0
,
1
,
2
,
3
,
4
,
0
P2.0, A8  
/
/
A
8
A
9
A
1
1
A
1
2
A
1
0
W R  
R
D
44-pin PQFP  
/
T
2
E
X
,
I
48-pin LQFP  
A
D
1
,
A
D
2
,
A
D
3
,
A
D
0
,
N
T
3
,
T
2
,
P
1
.
P
P
1
.
P
1
.
P
1
.
P
0
.
P
0
.
P
0
.
P
0
.
P
4
.
1
.
V
D
D
4
3
2
1
0
1
2
3
0
2
P1.5  
P1.6  
P1.7  
RST  
P3.0  
P4.3  
P3.1  
P3.2  
P3.3  
P3.4  
P3.5  
NC  
1
36  
35  
34  
33  
32  
31  
30  
29  
28  
27  
26  
25  
NC  
2
P0.4  
P0.5  
P0.6  
P0.7  
EA  
34  
43 42 41 40 39 38 37 36 35  
44  
1
2
3
4
5
6
7
8
9
33  
P0.4, AD4  
P0.5, AD5  
P0.6, AD6  
P0.7, AD7  
EA  
P4.1  
ALE  
PSEN  
P2.7, A15  
P2.6, A14  
P2.5, A13  
P1.5  
P1.6  
P1.7  
3
32  
31  
30  
29  
28  
27  
26  
25  
4
5
RST  
6
RXD, P3.0  
INT2, P4.3  
TXD, P3.1  
INT0, P3.2  
INT1, P3.3  
T0, P3.4  
7
P4.1  
ALE  
PSEN  
P2.7  
P2.6  
P2.5  
8
9
10  
11  
12  
10  
11  
24  
23  
T1, P3.5  
12 13 14 15 16 17 18 19 20 21 22  
P
3
.
P
3
.
X
T
A
L
2
X
T
A
L
1
V
S
S
P
2
.
P
2
.
P
2
.
P
2
.
P
2
.
P
4
.
6
,
7
,
0
,
1
,
3
,
4
,
2
,
0
/
/
A
8
A
9
A
1
1
A
1
2
A
1
0
W R  
R
D
- 4 -  
W78LE365/W78L365A  
4. PIN DESCRIPTION  
SYMBOL  
TYPE  
DESCRIPTIONS  
EXTERNAL ACCESS ENABLE: This pin forces the processor to execute the  
external ROM. The ROM address and data will not be presented on the bus if  
I
EA  
the EA pin is high.  
PROGRAM STORE ENABLE: PSEN enables the external ROM data in the  
Port 0 address/data bus. When internal ROM access is performed, no PSEN  
strobe signal outputs originate from this pin.  
O H  
PSEN  
ALE  
ADDRESS LATCH ENABLE: ALE is used to enable the address latch that  
O H separates the address from the data on Port 0. ALE runs at 1/6th of the  
oscillator frequency.  
RESET: A high on this pin for two machine cycles while the oscillator is  
RST  
I L  
running resets the device.  
CRYSTAL 1: This is the crystal oscillator input. This pin may be driven by an  
XTAL1  
I
external clock.  
XTAL2  
VSS  
O
I
CRYSTAL 2: This is the crystal oscillator output. It is the inversion of XTAL1.  
GROUND: ground potential.  
VDD  
I
POWER SUPPLY: Supply voltage for operation.  
I/O D PORT 0: Function is the same as that of standard 8052.  
I/O H PORT 1: Function is the same as that of standard 8052.  
PORT 2: Port 2 is a bi-directional I/O port with internal pull-ups. This port also  
P0.0P0.7  
P1.0P1.7  
provides the upper address bits for accesses to external memory. The P2.6  
I/O H  
P2.0P2.7  
and P2.7 also provide the alternate function REBOOT which is H/W reboot  
from LD flash.  
I/O H PORT 3: Function is the same as that of the standard 8052.  
P3.0P3.7  
P4.0P4.7  
PORT 4: A bi-directional I/O. The P4.3 also provide the alternate function  
I/O H  
REBOOT which is H/W reboot from LD flash.  
* Note: TYPE I: input, O: output, I/O: bi-directional, H: pull-high, L: pull-low, D: open drain  
Publication Release Date: January 10, 2007  
Revision A7  
- 5 -  
W78LE365/W78L365A  
5. FUNCTIONAL DESCRIPTION  
The W78L365A architecture consists of a core controller surrounded by various registers, four general  
purpose I/O ports, one special purpose programmable 4-bits I/O port, 256+1K bytes of RAM, three  
timer/counters, a serial port. The processor supports 111 different opcodes and references both a 64K  
program address space and a 64K data storage space.  
5.1  
RAM  
The internal data RAM in the W78L365A is 256+1K bytes. It is divided into two banks: 256 bytes of  
scratchpad RAM and 1K bytes of AUX-RAM. These RAMs are addressed by different ways.  
RAM 0H7FH can be addressed directly and indirectly as the same as in 8051. Address pointers  
are R0 and R1 of the selected register bank.  
RAM 80HFFH can only be addressed indirectly as the same as in 8051. Address pointers are  
R0, R1 of the selected registers bank.  
AUX-RAM 0H3FFH is addressed indirectly as the same way to access external data memory  
with the MOVX instruction. Address pointer are R0 and R1 of the selected register bank and  
DPTR register. An access to external data memory locations higher than 3FFH will be performed  
with the MOVX instruction in the same way as in the 8051. The AUX-RAM is enable after a reset.  
Setting the bit 4 in CHPCON register will enable the access to AUX-RAM. When executing from  
internal program memory, an access to AUX-RAM will not affect the Ports P0, P2, WR and RD.  
Example:  
CHPENR  
CHPCON  
XRAMAH  
REG  
REG  
REG  
F6H  
BFH  
A1H  
MOV  
MOV  
ORL  
MOV  
MOV  
MOV  
MOV  
MOVX @R0, A  
MOV  
MOV  
CHPENR, #87H  
CHPENR, #59H  
CHPCON, #00010000B ; enable AUX-RAM  
CHPENR, #00H  
XRAMAH, #01H  
R0, #23H  
; internal high address  
A, #55H  
; Write 55h data to 0123h AUX-RAM address.  
; Read data from 02FFh AUX-RAM address.  
XRAMAH, #02H  
R1, #FFH  
MOVX  
MOV  
MOV  
A, @R1  
DPTR, #0134H  
A, #78H  
MOVX  
MOV  
MOVX  
@DPTR,A  
DPTR, #7FFFH  
A, @DPRT  
; Write 78h data to 0134h AUX-RAM address.  
; Read data from the external 7FFFh address SRAM  
- 6 -  
W78LE365/W78L365A  
5.2  
Timers 0, 1 and 2  
Timers 0, 1, and 2 each consist of two 8-bit data registers. These are called TL0 and TH0 for Timer 0,  
TL1 and TH1 for Timer 1, and TL2 and TH2 for Timer 2. The TCON and TMOD registers provide  
control functions for timers 0, 1. The T2CON register provides control functions for Timer 2. RCAP2H  
and RCAP2L are used as reload/capture registers for Timer 2. The operations of Timer 0 and Timer 1  
are the same as in the W78C51. Timer 2 is a 16-bit timer/counter that is configured and controlled by  
the T2CON register. Like Timers 0 and 1, Timer 2 can operate as either an external event counter or  
as an internal timer, depending on the setting of bit C/T2 in T2CON. Timer 2 has three operating  
modes: capture, auto-reload, and baud rate generator. The clock speed at capture or auto-reload  
mode is the same as that of Timers 0 and 1.  
5.2.1 Timer 2 Output  
If set T2OE (T2MOD.1) bit and clear C/T2 (T2CON.1) bit at auto-reload mode, P1.0 will be toggled  
once overflow.  
TIMER 2 Mode  
Bit:  
7
6
5
4
3
2
1
0
T2OE  
Mnemonic: T2MOD  
Address: C9H  
T2OE: Enable this bit to toggle P1.0 pin while Timer2 has been overflowed.  
5.3  
Clock  
The W78L365A is designed with either a crystal oscillator or an external clock. Internally, the clock is  
divided by two before it is used by default. This makes the W78L365A relatively insensitive to duty  
cycle variations in the clock.  
5.3.1 Crystal Oscillator  
The W78L365A incorporates a built-in crystal oscillator. To make the oscillator work, a crystal must be  
connected across pins XTAL1 and XTAL2. In addition, a load capacitor must be connected from each  
pin to ground.  
5.3.2 External Clock  
An external clock should be connected to pin XTAL1. Pin XTAL2 should be left unconnected. The  
XTAL1 input is a CMOS-type input, as required by the crystal oscillator.  
Publication Release Date: January 10, 2007  
- 7 -  
Revision A7  
W78LE365/W78L365A  
5.4  
Power Management  
5.4.1 Idle Mode  
Setting the IDL bit in the PCON register enters the idle mode. In the idle mode, the internal clock to  
the processor is stopped. The peripherals and the interrupt logic continue to be clocked. The  
processor will exit idle mode when either an interrupt or a reset occurs.  
5.4.2 Power-down Mode  
When the PD bit in the PCON register is set, the processor enters the power-down mode. In this  
mode all of the clocks are stopped, including the oscillator. To exit from power-down mode is by a  
hardware reset or external interrupts INT0 to INT1 when enabled and set to level triggered.  
5.4.3 Reduce EMI Emission  
The W78L365A allows user to diminish the gain of on-chip oscillator amplifier by using programmer to  
clear the B7 bit of security register. Once B7 is set to 0, a half of gain will be decreased. Care must be  
taken if user attempts to diminish the gain of oscillator amplifier, reducing a half of gain may affect the  
external crystal operating improperly at high frequency. The value of C1 and C2 may need some  
adjustment while running at lower gain.  
ALE OFF Function  
Auxiliary Register  
Bit:  
7
-
6
-
5
-
4
-
3
-
2
-
1
-
0
ALEOFF  
Mnemonic: AUXR  
Address: 8EH  
ALEOFF : Set this bit to disable ALE output.  
- 8 -  
W78LE365/W78L365A  
5.5  
Reset  
The external RESET signal is sampled at S5P2. To take effect, it must be held high for at least two  
machine cycles while the oscillator is running. An internal trigger circuit in the reset line is used to  
deglitch the reset line when the W78L365A is used with an external RC network. The reset logic also  
has a special glitch removal circuit that ignores glitches on the reset line. During reset, the ports are  
initialized to FFH, the stack pointer to 07H, PCON (with the exception of bit 4) to 00H, and all of the  
other SFR registers except SBUF to 00H. SBUF is not reset.  
5.5.1 W78L365A Special Function Registers (SFRs) and Reset Values  
F8  
+B  
00000000  
CHPENR  
00000000  
F0  
E8  
E0  
D8  
D0  
C8  
C0  
B8  
B0  
A8  
A0  
98  
90  
88  
+ACC  
00000000  
+P4  
PWMP  
00000000  
PWM0  
00000000  
PWM1  
00000000  
PWMCON1  
00000000  
PWM2  
00000000  
PWM3  
00000000  
11111111  
+PSW  
00000000  
+T2CON  
00000000  
+XICON  
00000000  
+IP  
T2MOD  
00000000  
RCAP2L  
00000000  
P4CONA  
00000000  
RCAP2H  
00000000  
P4CONB  
00000000  
TL2  
00000000  
SFRAL  
00000000  
TH2  
00000000  
SFRAH  
00000000  
PWMCON2  
00000000  
SFRFD  
PWM4  
00000000  
SFRCN  
00000000  
CHPCON  
0xx00000  
00000000  
00000000  
+P3  
00000000  
+IE  
P43AL  
00000000  
P42AL  
P43AH  
00000000  
P42AH  
P4CSIN  
00000000  
00000000  
00000000  
00000000  
+P2  
XRAMAH  
00000000  
SBUF  
11111111  
+SCON  
00000000  
+P1  
11111111  
+TCON  
00000000  
+P0  
xxxxxxxx  
P41AL  
00000000  
TH0  
00000000  
P40AL  
P41AH  
00000000  
TH1  
00000000  
P40AH  
TMOD  
00000000  
SP  
TL0  
00000000  
DPL  
00000000  
TL1  
00000000  
DPH  
00000000  
AUXR  
00000000  
POR  
WDTC  
00000000  
PCON  
80  
11111111  
00000111  
00000000  
00000000  
00000000  
00110000  
Notes:  
1. The SFRs marked with a plus sign(+) are both byte- and bit-addressable.  
2. The text of SFR with bold type characters are extension function registers.  
Publication Release Date: January 10, 2007  
Revision A7  
- 9 -  
W78LE365/W78L365A  
5.6  
Port 4  
Port 4, address D8H, is a 8-bit multipurpose programmable I/O port. Each bit can be configured  
individually by software. The Port 4 has four different operation modes.  
Mode 0: P4.0P4.3 is a bi-directional I/O port which is same as port 1. P4.2 and P4.3 also serve as  
PSEN  
external interrupt  
and INT2 if enabled.  
Mode 1: P4.0P4.3 are read strobe signals that are synchronized with RD signal at specified  
addresses. These signals can be used as chip-select signals for external peripherals.  
Mode 2: P4.0P4.3 are write strobe signals that are synchronized with WR signal at specified  
addresses. These signals can be used as chip-select signals for external peripherals.  
Mode 3: P4.0P4.3 are read/write strobe signals that are synchronized with RD or WR signal at  
specified addresses. These signals can be used as chip-select signals for external  
peripherals.  
When Port 4 is configured with the feature of chip-select signals, the chip-select signal address range  
depends on the contents of the SFR P4xAH, P4xAL, P4CONA and P4CONB. The registers P4xAH  
and P4xAL contain the 16-bit base address of P4.x. The registers P4CONA and P4CONB contain the  
control bits to configure the Port 4 operation mode.  
The high nibble of port4(P4.4 to P4.7) can be selected to serve to the direct LED display drive outputs  
by setting the HDx bit is set, the corresponding pin p4.x can sink about 20 mA current for driving LED  
display directly.  
5.6.1 Port Options Register  
Bit:  
7
6
5
-
4
3
2
1
0
-
-
HD47  
HD46  
HD45  
HD44  
P0UP  
Mnemonic: POR  
Address: 86H  
HD47-44: Enable pins P4.4 to P4.7 individually with high drive outputs.  
P0UP: Enable Port 0 weak up. The pins of Port 0 can be configured with either the open drain or  
standart port with internal pull-up. By the default, Port 0 is an open drain bi-directional I/O port. When  
the P0UP bit in the POR register is set, the pins of port 0 will perform a bi-directional I/O port with  
internal pull-up that is structurally the same Port2.  
5.6.2 INT2 /INT3  
Two additional external interrupts, INT2 and INT3 , whose functions are similar to those of external  
interrupt 0 and 1 in the standard 80C52. The functions/status of these interrupts are  
determined/shown by the bits in the XICON (External Interrupt Control) register. The XICON register is  
bit-addressable but is not a standard register in the standard 80C52. Its address is at 0C0H. To  
set/clear bits in the XICON register, one can use the "SETB ( CLR ) bit" instruction. For example,  
"SETB 0C2H" sets the EX2 bit of XICON.  
- 10 -  
W78LE365/W78L365A  
XICON - external interrupt control (C0H)  
PX3 EX3 IE3 IT3  
PX2  
EX2  
IE2  
IT2  
PX3: External interrupt 3 priority high if set  
EX3: External interrupt 3 enable if set  
IE3: If IT3 = 1, IE3 is set/cleared automatically by hardware when interrupt is detected/serviced  
IT3: External interrupt 3 is falling-edge/low-level triggered when this bit is set/cleared by software  
PX2: External interrupt 2 priority high if set  
EX2: External interrupt 2 enable if set  
IE2: If IT2 = 1, IE2 is set/cleared automatically by hardware when interrupt is detected/serviced  
IT2: External interrupt 2 is falling-edge/low-level triggered when this bit is set/cleared by software  
Eight-source interrupt information:  
POLLING  
ENABLE  
REQUIRED  
SETTINGS  
INTERRUPT  
TYPE  
VECTOR  
INTERRUPT SOURCE  
SEQUENCE WITHIN  
PRIORITY LEVEL  
ADDRESS  
EDGE/LEVEL  
External Interrupt 0  
Timer/Counter 0  
External Interrupt 1  
Timer/Counter 1  
Serial Port  
Timer/Counter 2  
External Interrupt 2  
External Interrupt 3  
03H  
0BH  
13H  
1BH  
23H  
2BH  
33H  
3BH  
0 (highest)  
IE.0  
IE.1  
IE.2  
IE.3  
IE.4  
TCON.0  
1
2
3
4
5
6
-
TCON.2  
-
-
-
IE.5  
XICON.2  
XICON.6  
XICON.0  
XICON.3  
7 (lowest)  
P4CONB (C3H)  
BIT  
NAME  
FUNCTION  
00: Mode 0. P4.3 is a general purpose I/O port which is the same as Port1.  
01: Mode 1. P4.3 is a Read Strobe signal for chip select purpose. The address  
range depends on the SFR P43AH, P43AL, P43CMP1 and P43CMP0.  
10: Mode 2. P4.3 is a Write Strobe signal for chip select purpose. The address  
range depends on the SFR P43AH, P43AL, P43CMP1 and P43CMP0.  
P43FUN1  
P43FUN0  
7, 6  
11: Mode 3. P4.3 is a Read/Write Strobe signal for chip select purpose. The  
address range depends on the SFR P43AH, P43AL, P43CMP1, and  
P43CMP0.  
Publication Release Date: January 10, 2007  
- 11 -  
Revision A7  
W78LE365/W78L365A  
P4CONB (C3H), continued  
BIT  
NAME  
FUNCTION  
Chip-select signals address comparison:  
00: Compare the full address (16 bits length) with the base address register  
P43AH, P43AL.  
01: Compare the 15 high bits (A15A1) of address bus with the base address  
P43CMP1  
P43CMP0  
register P43AH, P43AL.  
5, 4  
10: Compare the 14 high bits (A15A2) of address bus with the base address  
register P43AH, P43AL.  
11: Compare the 8 high bits (A15A8) of address bus with the base address  
register P43AH, P43AL.  
P42FUN1  
P42FUN0  
P42CMP1  
P42CMP0  
The P4.2 function control bits which are the similar definition as P43FUN1,  
P43FUN0.  
3, 2  
1, 0  
The P4.2 address comparator length control bits which are the similar definition  
as P43CMP1, P43CMP0.  
P4CONA (C2H)  
BIT  
NAME  
FUNCTION  
P41FUN1  
P41FUN0  
P41CMP1  
P41CMP0  
P40FUN1  
P40FUN0  
P40CMP1  
P40CMP0  
The P4.1 function control bits which are the similar definition as P43FUN1,  
P43FUN0.  
7, 6  
The P4.1 address comparator length control bits which are the similar definition  
as P43CMP1, P43CMP0.  
5, 4  
3, 2  
1, 0  
The P4.0 function control bits which are the similar definition as P43FUN1,  
P43FUN0.  
The P4.0 address comparator length control bits which are the similar definition  
as P43CMP1, P43CMP0.  
P4CSIN (AEH)  
BIT  
NAME  
FUNCTION  
The active polarity of P4.3 when pin P4.3 is defined as read and/or write strobe  
signal.  
7
P43CSINV  
= 1: P4.3 is active high when pin P4.3 is defined as read and/or write strobe signal.  
= 0: P4.3 is active low when pin P4.3 is defined as read and/or write strobe signal.  
6
5
4
3
2
1
0
P42CSINV The similarity definition as P43SINV.  
P41CSINV The similarity definition as P43SINV.  
P40CSINV The similarity definition as P43SINV.  
-
-
-
-
Reserve  
Reserve  
0
0
- 12 -  
W78LE365/W78L365A  
5.6.3 Port 4 Base Address Registers  
P40AH, P40AL:  
The Base address register for comparator of P4.0. P40AH contains the high-order byte of address,  
P40AL contains the low-order byte of address.  
P41AH, P41AL:  
The Base address register for comparator of P4.1. P41AH contains the high-order byte of address,  
P41AL contains the low-order byte of address.  
P42AH, P42AL:  
The Base address register for comparator of P4.2. P42AH contains the high-order byte of address,  
P42AL contains the low-order byte of address.  
P43AH, P43AL:  
The Base address register for comparator of P4.3. P43AH contains the high-order byte of address,  
P43AL contains the low-order byte of address.  
P4 (D8H)  
BIT  
7
6
5
4
3
2
1
0
NAME  
P47  
P46  
P45  
P44  
P43  
P42  
P41  
P40  
FUNCTION  
I/O pin  
I/O pin.  
I/O pin.  
I/O pin.  
Port 4 Data bit which outputs to pin P4.3 at mode 0.  
Port 4 Data bit. which outputs to pin P4.2 at mode 0.  
Port 4 Data bit. which outputs to pin P4.1at mode 0.  
Port 4 Data bit which outputs to pin P4.0 at mode 0.  
Here is an example to program the P4.0 as a write strobe signal at the I/O port address 1234H1237H  
and positive polarity, and P4.1P4.3 are used as general I/O ports. P4.4P4.7 is only available for 48  
pin package.  
MOV P40AH, #12H  
MOV P40AL, #34H  
; Base I/O address 1234H for P4.0  
MOV P4CONA, #00001010B  
MOV P4CONB, #00H  
MOV P2ECON, #10H  
; P4.0 a write strobe signal and address line A0 and A1 are masked.  
; P4.1P4.3 as general I/O port which are the same as PORT1  
; Write the P40SINV = 1 to inverse the P4.0 write strobe polarity  
; default is negative.  
Then any instruction MOVX @DPTR, A (with DPTR = 1234H1237H) will generate the positive  
polarity write strobe signal at pin P4.0. And the instruction MOV P4, #XX will output the bit3 to bit1 of  
data #XX to pin P4.3P4.1.  
Publication Release Date: January 10, 2007  
- 13 -  
Revision A7  
W78LE365/W78L365A  
P4xCSINV  
P4 REGISTER  
P4.x  
DATA I/O  
RD_CS  
MUX 4->1  
WR_CS  
READ  
WRITE  
RD/WR_CS  
PIN  
P4.x  
ADDRESS BUS  
P4xFUN0  
P4xFUN1  
EQUAL  
REGISTER  
P4xAL  
P4xAH  
Bit Length  
P4.x INPUT DATA BUS  
Selectable  
comparator  
REGISTER  
P4xCMP0  
P4xCMP1  
5.7  
Pulse Width Modulated Outputs (PWM)  
There are five pulse width modulated output channels to generate pulses of programmable length and  
interval. The repetition frequency is defined by an 8-bit prescaler PWMP, which supplies the clock for  
the counter. The prescaler and counter are common to both PWM channels. The 8-bit counter counts  
modular 255 (0254). The value of the 8-bit counter compared to the contents of five registers:  
PWM0, PWM1, PWM2, PWM3 and PWM4. Provided the contents of either these registers is greater  
than the counter value, the corresponding PWM0, PWM1, PWM2, PWM3 or PWM4 output is set  
HIGH. If the contents of these registers are equal to, or less than the counter value, the output will be  
LOW. The pulse-width-ratio is defined by the contents of the registers PWM0, PWM1, PWM2, PWM3  
and PWM4. The pulse-width-ratio is in the range of 0 to 1 and may be programmed in increments of  
1/255. ENPWM0, ENPWM1, ENPWM2, ENPWM3 and ENPWM4 bit will enable or disable PWM  
output.  
Buffered PWM outputs may be used to drive DC motors. The rotation speed of the motor would be  
proportional to the contents of PWM0/1/2/3/4. The repetition frequency fpwm , at the PWM0/1/2/3/4  
output is given by:  
f
osc  
f
pwm =  
2×(1+ PWMP)×255  
Prescaler division factor = PWM + 1  
(PWMn)  
255 - (PWMn)  
PWMn high/low ratio of PWMn =  
- 14 -  
W78LE365/W78L365A  
This gives a repetition frequency range of 123 Hz to 31.4 KHz ( fosc = 16 MHz). By loading the PWM  
registers with either 00H or FFH, the PWM channels will output a constant HIGH or LOW level,  
respectively. Since the 8-bit counter counts modulo 255, it can never actually reach the value of the  
PWM registers when they are loaded with FFH.  
When a compare register (PWM0, PWM1, PWM2, PWM3, PWM4) is loaded with a new value, the  
associated output updated immediately. It does not have to wait until the end of the current counter  
period. There is weakly pulled high on PWM output.  
comparator  
ENPWM0/1/2/3/4  
PWM0OE  
PWM0  
PWM0  
(P1.3)  
f
Prescaler  
PWMP  
osc  
1/2  
8bit counter  
PWM1  
PWM1OE  
PWM1  
(P1.4)  
comparator  
comparator  
PWM2OE  
PWM3OE  
PWM2  
PWM2  
(P1.5)  
8bit counter  
PWM3  
(P1.6)  
PWM3  
comparator  
comparator  
8bit counter  
PWM4  
PWM4OE  
PWM4  
(P1.7)  
FIGURE 1 PWM DIAGRAM  
Please refer as below code.  
mov pwmcon1, #00110011b ; enable pwm3, 2, 1, 0  
mov pwmcon2, #00000101b ; enable pwm4  
mov pwmp, #40h  
jb p1.3, $  
mov pwm0, #14h  
jb p1.4, $  
mov pwm1, #18h  
; Fpwm = XT/(2*(1+pwmp)*255)  
; duty cycle high/low = pwm0/(255-pmw0)  
Publication Release Date: January 10, 2007  
Revision A7  
- 15 -  
W78LE365/W78L365A  
jb  
mov pwm2, #20h  
jb p1.6, $  
mov pwm3, #b0h  
jb p1.7, $  
mov pwm4, #40h  
mov pwmcon1, #11111111b ;output enable pwm3, 2, 1, 0  
p1.5, $  
PWM3 Register  
Bit:  
7
7
6
5
4
4
3
2
1
1
0
0
Mnemonic: PWM3  
Address: DEH  
PWM2 Register  
Bit:  
6
5
3
2
Mnemonic: PWM2  
Address: DDH  
PWM Control 1 Register  
Bit:  
7
6
5
4
3
2
1
0
PWM3OE  
PWM2OE  
ENPWM3  
ENPWM2  
PWM1OE  
PWM0OE  
ENPWM1  
ENWPM0  
Mnemonic: PWMCON1  
Address: DCH  
PWM3OE: Output enable for PWM3  
PWM2OE: Output enable for PWM2  
ENPWM3: Enable PWM3  
ENPWM2: Enable PWM2  
PWM1OE: Output enable for PWM1  
PWM0OE: Output enable for PWM0  
ENPWM1: Enable PWM1  
ENPWM0: Enable PWM0  
PWM1 Register  
Bit:  
7
6
5
4
3
2
1
0
Mnemonic: PWM1  
Address: DBH  
- 16 -  
W78LE365/W78L365A  
PWM0 Register  
Bit:  
7
7
7
6
5
4
4
4
3
2
1
1
1
0
0
0
Mnemonic: PWM0  
Address: DAH  
PWMP Register  
Bit:  
6
5
3
2
Mnemonic: PWMP  
Address: D9H  
PWM4 Register  
Bit:  
6
5
3
2
Mnemonic: PWM4  
Address: CFH  
PWM Control 2 Register  
Bit:  
7
-
6
-
5
-
4
-
3
-
2
1
-
0
PWM4OE  
ENWPM4  
Mnemonic: PWMCON2  
Address: CEH  
PWM4OE: Output enable for PWM4  
ENPWM: Enable for PWM4  
5.8  
Watchdog Timer  
The Watchdog timer is a free-running timer which can be programmed by the user to serve as a  
system monitor, a time-base generator or an event timer. It is basically a set of dividers that divide the  
system clock. The divider output is selectable and determines the time-out interval. When the time-out  
occurs, a system reset can also be caused if it is enabled. The main use of the Watchdog timer is as a  
system monitor. This is important in real-time control applications. In case of power glitches or electro-  
magnetic interference, the processor may begin to execute errant code. If this is left unchecked the  
entire system may crash. The watchdog time-out selection will result in different time-out values  
depending on the clock speed. The Watchdog timer will de disabled on reset. In general, software  
should restart the Watchdog timer to put it into a known state. The control bits that support the  
Watchdog timer are discussed below.  
Watchdog Timer Control Register  
Bit:  
7
6
5
4
-
3
-
2
PS2  
1
PS1  
0
PS0  
ENW  
CLRW  
WIDL  
Mnemonic: WDTC  
Address: 8FH  
ENW : Enable watch-dog if set.  
CLRW : Clear watch-dog timer and prescaler if set. This flag will be cleared automatically  
WIDL : If this bit is set, watch-dog is enabled under IDLE mode. If cleared, watch-dog is disabled  
under IDLE mode. Default is cleared.  
Publication Release Date: January 10, 2007  
- 17 -  
Revision A7  
W78LE365/W78L365A  
PS2, PS1, PS0: Watch-dog prescaler timer select. Prescaler is selected when set PS20 as follows:  
PS2 PS1 PS0  
PRESCALER SELECT  
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
2
4
8
16  
32  
64  
128  
256  
The time-out period is obtained using the following equation:  
1
OSC  
14  
× 2 × PRESCALER × 1000 × 12 mS  
Before Watchdog time-out occurs, the program must clear the 14-bit timer by writing 1 to WDTC.6  
(CLRW). After 1 is written to this bit, the 14-bit timer, prescaler and this bit will be reset on the next  
instruction cycle. The Watchdog timer is cleared on reset.  
ENW  
WIDL  
IDLE  
EXTERNAL  
RESET  
INTERNAL  
RESET  
14-BIT TIMER  
CLEAR  
PRESCALER  
OSC  
1/12  
CLRW  
Watchdog Timer Block Diagram  
Typical Watch-Dog time-out period when OSC = 20 MHz  
PS2 PS1 PS0  
WATCHDOG TIME-OUT PERIOD  
19.66 mS  
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
39.32 mS  
78.64 mS  
157.28 mS  
314.57 mS  
629.14 mS  
1.25 S  
2.50 S  
- 18 -  
W78LE365/W78L365A  
5.9  
In-System Programming (ISP) Mode  
The W78L365A equips one 64K byte of main ROM bank for application program (called APROM) and  
one 4K byte of auxiliary ROM bank for loader program (called LDROM). In the normal operation, the  
microcontroller executes the code in the APROM. If the content of APROM needs to be modified, the  
W78L365A allows user to activate the In-System Programming (ISP) mode by setting the CHPCON  
register. The CHPCON is read-only by default, software must write two specific values 87H,  
then 59H sequentially to the CHPENR register to enable the CHPCON write attribute. Writing  
CHPENR register with the values except 87H and 59H will close CHPCON register write  
attribute. The W78L365A achieves all in-system programming operations including enter/exit ISP  
Mode, program, erase, read ... etc, during device in the idle mode. Setting the bit CHPCON.0 the  
device will enter in-system programming mode after a wake-up from idle mode. Because device  
needs proper time to complete the ISP operations before awaken from idle mode, software may use  
timer interrupt to control the duration for device wake-up from idle mode. To perform ISP operation for  
revising contents of APROM, software located at APROM setting the CHPCON register then enter idle  
mode, after awaken from idle mode the device executes the corresponding interrupt service routine in  
LDROM. Because the device will clear the program counter while switching from APROM to LDROM,  
the first execution of RETI instruction in interrupt service routine will jump to 00H at LDROM area. The  
device offers a software reset for switching back to APROM while the content of APROM has been  
updated completely. Setting CHPCON register bit 0, 1 and 7 to logic-1 will result a software reset  
to reset the CPU. The software reset serves as a external reset. This in-system programming feature  
makes the job easy and efficient in which the application needs to update firmware frequently. In some  
applications, the in-system programming feature make it possible to easily update the system  
firmware without opening the chassis.  
SFRAH, SFRAL: The objective address of on-chip ROM in the in-system programming mode.  
SFRAH contains the high-order byte of address, SFRAL contains the low-order byte of address.  
SFRFD: The programming data for on-chip ROM in programming mode.  
SFRCN: The control byte of on-chip ROM programming mode.  
SFRCN (C7)  
BIT  
NAME  
FUNCTION  
7
-
Reserve.  
On-chip ROM bank select for in-system programming.  
= 0: 64K bytes ROM bank is selected as destination for re-programming.  
= 1: 4K bytes ROM bank is selected as destination for re-programming.  
ROM output enable.  
6
WFWIN  
5
4
OEN  
CEN  
ROM chip enable.  
3, 2, 1, 0  
CTRL[3:0] The flash control signals  
Publication Release Date: January 10, 2007  
Revision A7  
- 19 -  
W78LE365/W78L365A  
MODE  
WFWIN  
CTRL<3:0>  
0010  
OEN  
CEN  
SFRAH, SFRAL  
X
SFRFD  
X
Erase 64KB APROM  
Program 64KB APROM  
Read 64KB APROM  
Erase 4KB LDROM  
Program 4KB LDROM  
Read 4KB LDROM  
0
0
0
1
1
1
1
1
0
1
1
0
0
0
0
0
0
0
0001  
Address in  
Address in  
X
Data in  
Data out  
X
0000  
0010  
0001  
Address in  
Address in  
Data in  
Data out  
0000  
5.9.1 In-System Programming Control Register (CHPCON)  
CHPCON (BFH)  
BIT  
7
NAME  
SWRESET  
-
FUNCTION  
When this bit is set to 1, and both FBOOTSL and FPROGEN are set to 1. It  
will enforce microcontroller reset to initial condition just like power on reset.  
6
Reserve.  
This bit is read only. 1: CPU is running LDROM program. 0: CPU is running  
APROM program.  
5
LD/AP  
1: Enable on-chip AUX-RAM.  
0: Disable the on-chip AUX-RAM  
Must be 1  
4
ENAUXRAM  
3
2
1
-
Reserve.  
When this bit is set to 1, and both SWRESET and FPROGEN are set to 1. It  
will enforce microcontroller reset to initial condition just like power on reset.  
1
0
FBOOTSL  
FPROGEN  
When this bit is set to 1, and both SWRESET and FBOOTSL are set to 1. It  
will enforce microcontroller reset to initial condition just like power on reset.  
This register is protected by CHPENR register. Please write as below procedures while you  
would like to write CHPCON register.  
Mov CHPENR, #87h  
Mov CHPENR, #59h  
Anl CHPCON, #EFh ;Disable AUX-RAM  
Mov CHPENR, #0h  
- 20 -  
W78LE365/W78L365A  
5.10 Software Reset  
Set CHPCON = 0X83, timer and enter IDLE mode. CPU will reset and restart from APFLASH after  
time out.  
5.11 H/W Reboot Mode (Boot from LDROM)  
By default, the W78L365A boots from APROM program after a power on reset. On some occasions,  
user can force the W78L365A to boot from the LDROM program via following settings. The possible  
situation that you need to enter H/W REBOOT mode when the APROM program can not run properly  
and device can not jump back to LDROM to execute in-system programming function. Then you can  
use this H/W REBOOT mode to force the W78L365A jumps to LDROM and executes in-system  
programming procedure. When you design your system, you may reserve the pins P2.6, P2.7 to  
switches or jumpers. For example in a CD-ROM system, you can connect the P2.6 and P2.7 to PLAY  
and EJECT buttons on the panel. When the APROM program fails to execute the normal application  
program. User can press both two buttons at the same time and then turn on the power of the  
personal computer to force the W78L365A to enter the H/W REBOOT mode. After power on of  
personal computer, you can release both buttons and finish the in-system programming procedure to  
update the APROM code. In application system design, user must take care of the P2, P3, ALE, EA  
and PSEN pin value at reset to prevent from accidentally activating the programming mode or H/W  
REBOOT mode. It is necessary to add 10K resistor on these P2.6, P2.7 and P4.3 pins.  
H/W Reboot MODE  
P4.3  
X
L
P2.7  
L
X
P2.6  
L
X
MODE  
REBOOT  
REBOOT  
The Reset Timing For Entering  
F04KBOOT Mode  
P2.7  
Hi-Z  
Hi-Z  
P2.6  
RST  
30 mS  
10 mS  
Publication Release Date: January 10, 2007  
Revision A7  
- 21 -  
W78LE365/W78L365A  
The Algorithm of In-System Programming  
Part 1:32KB APROM  
procedure of entering  
START  
In-System Programming Mode  
Enter In-System  
Programming Mode ?  
(conditions depend on  
user's application)  
No  
Yes  
Setting control registers  
MOV CHPENR,#87H  
MOV CHPENR,#59H  
MOV CHPCON,#03H  
Execute the normal application  
program  
Setting Timer (about 1.5 us)  
and enable timer interrupt  
END  
Start Timer and enter idle Mode.  
(CPU will be wakened from idle mode  
by timer interrupt, then enter In-System  
Programming mode)  
CPU will be wakened by interrupt and  
re-boot from 4KB LDROM to execute  
the loader program.  
Go  
- 22 -  
W78LE365/W78L365A  
Part 2: 4KB LDROM  
Procedure of Updating  
the 32KB APROM  
Go  
Timer Interrupt Service Routine:  
Stop Timer & disable interrupt  
PGM  
Yes  
Yes  
Is F04KBOOT Mode?  
(CHPCON.7=1)  
End of Programming ?  
No  
No  
Reset the CHPCON Register:  
MOV CHPENR,#87H  
MOV CHPENR,#59H  
MOV CHPCON,#03H  
Setting Timer and enable Timer  
interrupt for wake-up .  
(50us for program operation)  
Yes  
Is currently in the  
F04KBOOT Mode ?  
No  
Software reset CPU and  
re-boot from the 32KB  
APROM.  
MOV CHPENR,#87H  
MOV CHPENR,#59H  
MOV CHPCON,#83H  
Get the parameters of new code  
(Address and data bytes)  
Setting Timer and enable Timer  
interrupt for wake-up .  
(15 ms for erasing operation)  
through I/O ports, UART or  
other interfaces.  
Setting erase operation mode:  
MOV SFRCN,#22H  
(Erase 32KB APROM)  
Setting control registers for  
programming:  
Hardware Reset  
to re-boot from  
MOV SFRAH,#ADDRESS_H  
MOV SFRAL,#ADDRESS_L  
MOV SFRFD,#DATA  
new 32 KB APROM.  
(S/W reset is  
Start Timer and enter IDLE  
Mode.  
MOV SFRCN,#21H  
invalid in F04KBOOT  
(Erasing...)  
Mode)  
End of erase  
operation. CPU will  
be wakened by Timer  
interrupt.  
END  
Executing new code  
from address  
00H in the 32KB APROM.  
PGM  
Publication Release Date: January 10, 2007  
Revision A7  
- 23 -  
W78LE365/W78L365A  
6. SECURITY  
During the on-chip ROM programming mode, the ROM can be programmed and verified repeatedly.  
Until the code inside the ROM is confirmed OK, the code can be protected. The protection of ROM  
and those operations on it are described below.  
The W78L365A has a Security Register that can be accessed in programming mode. Those bits of  
the Security Registers can not be changed once they have been programmed from high to low. They  
can only be reset through erase-all operation. The Security Register is located at the 0FFFFH of the  
LDROM space.  
0000h  
4KB On-chip ROM  
32KB On-chip ROM  
Program Memory  
Program Memory  
Security Bits  
B2 B1 B0  
B7 Reserved  
LDROM  
0FFFh  
7FFFh  
APROM  
B0: Lock bit, logic 0: active  
B1: MOVC inhibit,  
logic 0: the MOVC instruction in external memory  
cannot access the code in internal memory.  
logic 1: no restriction.  
Reserved
B2: Encryption  
logic 0: the encryption logic enable  
logic 1: the encryption logic disable  
B07: Osillator Control  
FFFFh  
Security Register  
logic 0: 1/2 gain  
logic 1: Full gain  
Default 1 for all security bits.  
Reserved bits must be kept in logic 1.  
Special Setting Register  
6.1  
Lock Bit  
This bit is used to protect the customer's program code in the W78L365A. It may be set after the  
programmer finishes the programming and verifies sequence. Once this bit is set to logic 0, both the  
ROM data and Security Register can not be accessed again.  
6.2  
MOVC Inhibit  
This bit is used to restrict the accessible region of the MOVC instruction. It can prevent the MOVC  
instruction in external program memory from reading the internal program code. When this bit is set to  
logic 0, a MOVC instruction in external program memory space will be able to access code only in the  
external memory, not in the internal memory. A MOVC instruction in internal program memory space  
will always be able to access the ROM data in both internal and external memory. If this bit is logic 1,  
there are no restrictions on the MOVC instruction.  
- 24 -  
W78LE365/W78L365A  
6.3  
Encryption  
This bit is used to enable/disable the encryption logic for code protection. Once encryption feature is  
enabled, the data presented on port 0 will be encoded via encryption logic. Only whole chip erase will  
reset this bit.  
6.4  
Oscillator Control  
W78L365A/E516 allow user to diminish the gain of on-chip oscillator amplifier by using programmer to  
set the bit B7 of security register. Once B7 is set to 0, a half of gain will be decreased. Care must be  
taken if user attempts to diminish the gain of oscillator amplifier, reducing a half of gain may  
improperly affect the external crystal operation at high frequency above 20 MHz. The value of R and  
C1, C2 may need some adjustment while running at lower gain.  
Publication Release Date: January 10, 2007  
- 25 -  
Revision A7  
W78LE365/W78L365A  
7. ELECTRICAL CHARACTERISTICS  
7.1 Absolute Maximum Ratings  
PARAMETER  
DC Power Supply  
Input Voltage  
Operating Temperature  
Storage Temperature  
SYMBOL  
MIN.  
-0.3  
VSS -0.3  
0
MAX.  
+6.0  
VDD +0.3  
70  
UNIT  
V
V
°C  
°C  
VDDVSS  
VIN  
TA  
TST  
-55  
+150  
Note: Exposure to conditions beyond those listed under Absolute Maximum Ratings may adversely affect the life and reliability  
of the device.  
7.2  
D.C. Characteristics  
(VSS = 0v, TA = 25°C, unless otherwise specified.)  
SPECIFICATION  
MIN. MAX. UNIT  
SYMBOL  
PARAMETER  
Operating Voltage  
TEST CONDITIONS  
Without ISP  
With ISP  
No load VDD = 5.5V  
2.4  
2.7  
-
5.5  
5.5  
20  
2.5  
6
1
10  
10  
V
V
VDD  
IDD  
mA  
mA  
mA  
mA  
µA  
µA  
Operating Current  
Idle Current  
No load VDD = 2.4V  
-
VDD = 5.5V, Fosc = 20 MHz  
VDD = 2.4V, Fosc = 12 MHz  
VDD = 5.5V, Fosc = 20 MHz  
IIDLE  
IPWDN  
IIN1  
-
-
Power Down Current  
VDD = 2.4V, Fosc = 12 MHz  
Input Current  
P1, P2, P3, P4  
Input Current  
RST  
VDD = 5.5V or 2.4V,  
-50  
+10  
µA  
VIN = 0V or VDD  
-10  
-10  
+150  
50  
VDD = 5.5V, 0<VIN<VDD  
VDD = 2.4V, 0<VIN<VDD  
µA  
µA  
IIN2  
Input Leakage Current  
P0, EA  
V
DD = 5.5V or 2.4 V  
ILK  
-10  
+10  
µA  
0V<VIN<VDD  
-500  
-50  
-200  
-30  
VDD = 5.5V, VIN = 1.4V  
VDD = 2.4V, VIN = 0.92V  
µA  
µA  
Logic 1 to 0 Transition Current  
P1, P2, P3, P4  
[*4]  
ITL  
- 26 -  
W78LE365/W78L365A  
D.C. Characteristics, continued  
SPECIFICATION  
SYMBOL  
PARAMETER  
TEST CONDITIONS  
MIN.  
0
MAX.  
0.8  
UNIT  
V
Input Low Voltage  
VDD = 4.5V  
VIL1  
V IL3  
VIH1  
VIH2  
VIH3  
0
0.5  
V
VDD = 2.4V  
P0, P1, P2, P3, P4, RST, EA  
Input Low Voltage  
XTAL1[*4]  
0
0
0.8  
0.4  
VDD +0.2  
V
V
V
VDD = 4.5V  
VDD = 2.4V  
VDD = 5.5V  
VDD = 2.4V  
VDD = 5.5V  
VDD = 2.4V  
VDD = 5.5V  
VDD = 2.4V  
VDD = 4.5V  
Input High Voltage  
2.4  
1.4  
3.5  
1.7  
3.5  
1.6  
-
V
DD +0.2  
VDD +0.2  
DD +0.2  
VDD +0.2  
VDD +0.2  
0.45  
V
P0, P1, P2, P3, P4, EA  
Input High Voltage  
RST  
V
V
V
V
V
Input High Voltage  
XTAL1[*4]  
Output Low Voltage  
V
VOL  
P1, P2, P3, P4, P0, ALE,  
PSEN  
-
0.4  
V
VDD = 2.4V  
4
2.5  
10  
5
8
4.5  
14  
9
mA  
mA  
mA  
mA  
VDD = 4.5V, VOL = 0.45V  
Sink current  
P1, P3, P4  
Sink current  
Isk1  
Isk2  
VDD = 2.4V, VOL = 0.4V  
VDD = 4.5V, VOL = 0.45V  
VDD = 2.4V, VOL = 0.4V  
VDD = 4.5V  
P0, P2, ALE, PSEN  
Output High Voltage  
2.4  
-
V
VOH  
P1, P2, P3, P4, P0, ALE,  
PSEN  
1.4  
-
V
V
DD = 2.4V  
VDD = 4.5V, VOH = 2.4V  
DD = 2.4V, VOH = 1.4V  
VDD = 4.5V, VOH = 2.4V  
VDD = 2.4V, VOH = 1.4V  
-150  
-20  
-200  
-60  
Source current  
P1, P2, P3, P4  
µA  
µA  
mA  
mA  
Isr1  
Isr2  
V
Source current  
-10  
-14  
-1.9  
-3.8  
P0, P2, ALE, PSEN  
Notes:  
*1. RST pin is a Schmitt trigger input.  
*2. P0, ALE and PSEN are tested in the external access mode.  
*3. XTAL1 is a CMOS input.  
*4. Pins of P1, P2, P3, P4 can source a transition current when they are being externally driven from 1 to 0.  
Publication Release Date: January 10, 2007  
Revision A7  
- 27 -  
W78LE365/W78L365A  
7.3  
A.C. Characteristics  
The AC specifications are a function of the particular process used to manufacture the part, the  
ratings of the I/O buffers, the capacitive load, and the internal routing capacitance. Most of the  
specifications can be expressed in terms of multiple input clock periods (TCP), and actual parts will  
usually experience less than a ±20 nS variation.  
Clock Input Waveform  
XTAL1  
TCH  
TCL  
FOP,  
TCP  
PARAMETER  
Operating Speed  
Clock Period  
Clock High  
SYMBOL  
FOP  
MIN.  
0
TYP.  
MAX.  
UNIT  
MHz  
nS  
NOTES  
-
-
-
-
20  
-
1
2
3
3
TCP  
41.7  
20  
TCH  
-
nS  
Clock Low  
TCL  
20  
-
nS  
Notes:  
1. The clock may be stopped indefinitely in either state.  
2. The TCP specification is used as a reference in other specifications.  
3. There are no duty cycle requirements on the XTAL1 input.  
- 28 -  
W78LE365/W78L365A  
8. TIMING WAVEFORMS  
8.1 Program Fetch Cycle  
S1  
S2  
S3  
S4  
S5  
S6  
S1  
S2  
S3  
S4  
S5  
S6  
XTAL1  
ALE  
T
ALW  
T
APL  
PSEN  
T
PSW  
T
AAS  
PORT 2  
PORT 0  
T
PDA  
T
AAH  
T
T
PDH, PDZ  
A0-A7  
A0-A7  
Code A0-A7  
Code  
Data  
Data  
A0-A7  
PARAMETER  
Address Valid to ALE Low  
SYMBOL  
TAAS  
MIN.  
1 TCP-∆  
TYP.  
MAX.  
UNIT  
nS  
NOTES  
-
-
-
-
-
-
-
4
1, 4  
4
Address Hold from ALE Low  
ALE Low to PSEN Low  
TAAH  
nS  
1 TCP-∆  
TAPL  
nS  
1 TCP-∆  
TPDA  
TPDH  
TPDZ  
TALW  
TPSW  
-
2 TCP  
nS  
nS  
nS  
nS  
nS  
2
3
PSEN Low to Data Valid  
Data Hold after PSEN High  
Data Float after PSEN High  
ALE Pulse Width  
0
-
1 TCP  
0
-
1 TCP  
2 TCP  
3 TCP  
-
-
4
4
2 TCP-∆  
3 TCP-∆  
PSEN Pulse Width  
Notes:  
1. P0.0P0.7, P2.0P2.7 remain stable throughout entire memory cycle.  
2. Memory access time is 3 TCP.  
3. Data have been latched internally prior to PSEN going high.  
4. "" (due to buffer driving delay and wire loading) is 20 nS.  
Publication Release Date: January 10, 2007  
Revision A7  
- 29 -  
W78LE365/W78L365A  
8.2  
Data Read Cycle  
S4  
S5  
S6  
S1  
S2  
S3  
S4  
S5  
S6  
S1  
S2  
S3  
XTAL1  
ALE  
PSEN  
PORT 2  
A8-A15  
DATA  
A0-A7  
PORT 0  
RD  
TDAR  
TDDA  
TDDH, TDDZ  
TDRD  
PARAMETER  
SYMBOL  
TDAR  
MIN.  
TYP.  
MAX.  
3 TCP+∆  
4 TCP  
2 TCP  
2 TCP  
-
UNIT  
nS  
NOTES  
1, 2  
1
-
3 TCP-∆  
ALE Low to RD Low  
TDDA  
-
-
nS  
RD Low to Data Valid  
Data Hold from RD High  
Data Float from RD High  
RD Pulse Width  
TDDH  
0
0
-
-
nS  
TDDZ  
nS  
TDRD  
6 TCP  
nS  
2
6 TCP-∆  
Notes:  
1. Data memory access time is 8 TCP.  
2. "" (due to buffer driving delay and wire loading) is 20 nS.  
- 30 -  
W78LE365/W78L365A  
8.3  
Data Write Cycle  
S4  
S5  
S6  
S1  
S2  
S3  
S4  
S5  
S6  
S1  
S2  
S3  
XTAL1  
ALE  
PSEN  
A8-A15  
PORT 2  
PORT 0  
WR  
A0-A7  
DATA OUT  
DAD  
TDWD  
T
TDWR  
TDAW  
PARAMETER  
SYMBOL  
TDAW  
MIN.  
TYP.  
MAX.  
UNIT  
nS  
-
3 TCP-∆  
1 TCP-∆  
1 TCP-∆  
6 TCP-∆  
3 TCP+∆  
ALE Low to WR Low  
TDAD  
-
-
-
-
-
nS  
Data Valid to WR Low  
Data Hold from WR High  
WR Pulse Width  
TDWD  
nS  
TDWR  
6 TCP  
nS  
Note: "" (due to buffer driving delay and wire loading) is 20 nS.  
Publication Release Date: January 10, 2007  
Revision A7  
- 31 -  
W78LE365/W78L365A  
8.4  
Port Access Cycle  
S5  
S6  
S1  
XTAL1  
ALE  
T
PDS  
T
T
PDA  
PDH  
PORT  
DATA OUT  
INPUT  
SAMPLE  
PARAMETER  
SYMBOL  
MIN.  
1 TCP  
0
TYP.  
MAX.  
UNIT  
nS  
Port Input Setup to ALE Low  
Port Input Hold from ALE Low  
Port Output to ALE  
TPDS  
TPDH  
TPDA  
-
-
-
-
-
-
nS  
1 TCP  
nS  
Note: Ports are read during S5P2, and output data becomes available at the end of S6P2. The timing data are referenced to  
ALE, since it provides a convenient reference.  
- 32 -  
W78LE365/W78L365A  
9. TYPICAL APPLICATION CIRCUIT  
9.1 External Program Memory and Crystal  
V
DD  
AD0  
39  
31  
19  
3
4
7
11  
12  
13  
AD0  
AD1  
AD2  
AD0  
AD1  
AD2  
A0  
A1  
2 A0  
5 A1  
10  
9
D0 Q0  
D1 Q1  
D2 Q2  
D3 Q3  
D4 Q4  
D5 Q5  
D6 Q6  
D7 Q7  
P0.0  
P0.1  
P0.2  
P0.3  
P0.4  
P0.5  
P0.6  
P0.7  
A0  
O0  
O1  
O2  
O3  
O4  
O5  
O6  
O7  
EA  
38 AD1  
A1  
AD2  
AD3  
AD4  
AD5  
A2  
A2  
37  
36  
35  
34  
6
8
A2  
XTAL1  
A3  
AD38  
9 A3  
12A4  
15A5  
15 AD3  
10 u  
C1  
7
A3  
A4  
13  
AD4  
16  
17  
18  
6
AD4  
AD5  
AD6  
A4  
R
18  
9
A5  
14  
AD5  
5
XTAL2  
RST  
A5  
CRYSTAL  
C2  
33 AD6  
A6  
A7  
A6  
17  
AD6  
16  
19  
4
A6  
32  
A7  
AD7  
A8  
3
AD718  
19 AD7  
A7  
8.2 K  
A8  
25  
24  
21  
23  
2
A8  
1
GND  
11  
21  
22  
23  
24  
25  
26  
27  
28  
A9  
OC  
G
P2.0  
P2.1  
P2.2  
P2.3  
P2.4  
P2.5  
P2.6  
P2.7  
A9  
A9  
A10  
A11  
A12  
A13  
A14  
A15  
A10  
A11  
A12  
A13  
A14  
A15  
INT0  
12  
13  
14  
15  
A10  
A11  
A12  
A13  
A14  
A15  
INT1  
74LS373  
26  
27  
1
T0  
T1  
1
P1.0  
P1.1  
P1.2  
P1.3  
P1.4  
P1.5  
P1.6  
P1.7  
20  
22  
GND  
2
3
4
5
6
7
8
CE  
OE  
RD  
WR  
17  
16  
29  
30  
27512  
PSEN  
ALE  
11  
10  
TXD  
RXD  
W78LE365/W78L365A  
Figure A  
CRYSTAL  
6 MHz  
C1  
C2  
R
47P  
30P  
15P  
47P  
30P  
10P  
-
-
-
16 MHz  
20 MHz  
Above table shows the reference values for crystal applications.  
Notes:  
1. C1, C2, R components refer to Figure A  
2. Crystal layout must get close to XTAL1 and XTAL2 pins on user's application board.  
Publication Release Date: January 10, 2007  
Revision A7  
- 33 -  
W78LE365/W78L365A  
9.2  
Expanded External Data Memory and Oscillator  
V
DD  
V
DD  
31  
19  
10  
AD0  
AD1  
AD2  
39  
3
4
7
AD0  
11  
12  
13  
15  
16  
17  
18  
19  
AD0  
AD1  
AD2  
AD3  
AD4  
2
5
6
9
A0 A0  
A1 A1  
A2 A2  
A3 A3  
P0.0  
P0.1  
P0.2  
P0.3  
P0.4  
P0.5  
P0.6  
P0.7  
A0  
A1  
A2  
A3  
A4  
A5  
A6  
A7  
A8  
A9  
D0 Q0  
D1 Q1  
D2 Q2  
D3 Q3  
D4 Q4  
D5 Q5  
D6 Q6  
D7 Q7  
D0  
D1  
D2  
D3  
D4  
D5  
D6  
D7  
EA  
38 AD1  
9
8
AD2  
AD3  
37  
36  
XTAL1  
AD3 8  
7
OSCILLATOR  
10 u  
13  
35 AD4  
34 AD5  
12 A4 A4  
6
AD4  
18  
9
14  
17  
18  
15  
16  
A5  
A5  
5
AD5  
AD6  
AD7  
XTAL2  
AD5  
AD6  
AD7  
AD6  
AD7  
33  
32  
A6 A6  
4
19 A7 A7  
A8  
3
8.2 K  
25  
RST  
INT0  
GND  
A8  
1
11  
21  
A9 24  
P2.0  
P2.1  
P2.2  
P2.3  
P2.4  
P2.5  
P2.6  
P2.7  
OC  
G
22 A9  
21  
23  
2
A10  
A11  
A12  
A13  
A14  
A10  
A11  
A12  
12  
13  
14  
15  
23 A10  
24 A11  
25 A12  
74LS373  
INT1  
26  
1
A13  
A14  
CE  
OE  
WR  
T0  
26  
A13  
T1  
27  
28  
A14  
1
2
3
4
5
6
7
8
GND  
20  
22  
27  
P1.0  
P1.1  
P1.2  
P1.3  
P1.4  
P1.5  
P1.6  
P1.7  
RD  
WR  
17  
16  
29  
30  
11  
10  
20256  
PSEN  
ALE  
TXD  
RXD  
W78LE365/W78L365A  
Figure B  
- 34 -  
W78LE365/W78L365A  
10. PACKAGE DIMENSIONS  
10.1 40-pin DIP  
Dimension in incDhimension in m  
Symbol  
Min. Nom. Max. Min. Nom. Max.  
5.334  
0.210  
A
0.010  
0.150 0.155 0.160 3.81 3.937 4.064  
0.254  
A
1
2
A
0.016 0.018  
0.406 0.457 0.559  
1.219 1.27 1.372  
0.022  
0.054  
B
0.050  
0.048  
0.008  
1
B
0.203  
0.356  
0.010 0.014  
2.055 2.070  
0.254  
c
D
52.20 52.58  
D
E
40  
21  
15.494  
13.97  
0.610  
15.24  
0.590 0.600  
14.986  
13.72 13.84  
0.540  
0.545 0.550  
E
1
0.110  
0.090 0.100  
0.120 0.130  
0
2.286 2.54 2.794  
e
L
a
1
0.140 3.048 3.302  
3.556  
15  
1
E
15  
0
0.630  
0.670 16.00  
0.090  
17.01  
2.286  
0.650  
16.51  
e
A
S
Notes:  
1
20  
E
1. Dimension D Max. & S include mold flash  
tie bar burrs.  
2. Dimension E1 does not include interlead flas  
3. Dimension D & E1 include mold mismatch a  
S
c
A2  
A
L
Base Plane  
1
A
.
are determined at the mold parting line  
Seating Plane  
4. Dimension B1 does not include damba  
protrusion/intrusion.  
B
e1  
eA  
5. Controlling dimension: Inches.  
6. General appearance spec. should be based  
final visual inspection spec.  
a
B1  
10.2 44-pin PLCC  
HD  
D
6
1
44  
40  
Dimension in inch Dimension in mm  
Min. Nom. Max. Min. Nom. Max.  
Symbol  
7
39  
0.185  
4.699  
0.508  
3.683 3.81 3.937  
A
0.020  
A
1
0.145 0.150  
0.026 0.028  
0.155  
A2  
b1  
0.032 0.66  
0.813  
0.559  
0.356  
0.711  
0.406  
0.022  
0.016 0.018  
0.457  
b
HE  
GE  
E
0.008 0.010 0.014 0.203 0.254  
c
16.46 16.59 16.71  
16.46 16.59 16.71  
1.27 BSC  
0.648 0.653 0.658  
0.648 0.653 0.658  
0.050 BSC  
D
E
e
0.590  
0.590  
0.680  
0.680  
14.99 15.49 16.00  
14.99 15.49 16.00  
17  
29  
0.610  
0.630  
GD  
0.610 0.630  
0.690 0.700  
G
H
E
17.27  
17.53 17.78  
17.27 17.53 17.78  
18  
28  
D
c
0.700  
0.690  
H
E
0.090 0.100  
2.54 2.794  
0.10  
0.110 2.296  
0.004  
L
y
L
Notes:  
A2  
A1  
A
1. Dimension D & E do not include interlead  
flash.  
θ
2. Dimension b1 does not include dambar  
protrusion/intrusion.  
e
b
b1  
3. Controlling dimension: Inches  
4. General appearance spec. should be based  
on final visual inspection spec.  
Seating Plane  
y
GD  
Publication Release Date: January 10, 2007  
Revision A7  
- 35 -  
W78LE365/W78L365A  
10.3 44-pin PQFP  
H D  
D
Dimension in inch  
Dimension in mm  
Symbol  
Min. Nom. Max. Min. Nom. Max.  
34  
44  
---  
---  
---  
---  
---  
---  
0.5  
A
0.002  
0.01  
0.02  
0.25  
2.05  
0.05  
1.90  
0.25  
1
A
0.075 0.081 0.087  
2.20  
0.45  
0.254  
A
b
c
2
33  
1
0.01  
0.014  
0.006  
0.394  
0.394  
0.031  
0.018  
0.010  
0.398  
0.398  
0.036  
0.530  
0.35  
0.101 0.152  
0.004  
0.390  
10.00  
10.00  
0.80  
9.9  
9.9  
10.1  
10.1  
0.952  
13.45  
13.45  
0.95  
1.905  
0.08  
7
D
E
e
0.390  
0.025  
E
HE  
0.635  
12.95  
12.95  
0.65  
0.510 0.520  
13.2  
13.2  
0.8  
D
E
H
0.520 0.530  
0.025 0.031  
0.510  
H
L
L
y
11  
0.037  
0.051 0.063 0.075 1.295  
0.003  
1.6  
1
12  
22  
e
b
7
θ
0
0
Notes:  
1. Dimension D & E do not include interlead  
c
flash.  
2. Dimension b does not include dambar  
protrusion/intrusion.  
A
A2  
A1  
3. Controlling dimension: Millimeter  
θ
4. General appearance spec. should be based  
on final visual inspection spec.  
L
See Detail F  
y
Seating Plane  
L
1
Detail F  
10.4 48-pin LQFP  
D
H
D
25  
36  
Dimension in mm  
Symbol  
Min. Nom. Max.  
1.60  
0.15  
1.45  
---  
A
---  
---  
0.05  
1.35  
A
A2  
b
1
24  
37  
1.40  
0.17 0.20  
0.27  
0.20  
---  
0.09  
c
7.00  
7.00  
D
E
E
H
E
e
0.50  
9.00  
9.00  
H
HE  
L
D
48  
13  
0.45  
0.75  
0.60  
1.00  
0.08  
3.5  
L
y1  
---  
7
---  
0
1
12  
e
b
0
Notes:  
c
1. Dimensions D & E do not include interlead  
flash.  
2
A
A
A
2. Dimension b does not include dambar  
protrusion/intrusion.  
1
3. Controlling dimension: Millimeters  
4. General appearance spec. should be based  
on final visual inspection spec.  
See Detail F  
L
y
Seating Plane  
L
1
Detail F  
- 36 -  
W78LE365/W78L365A  
11. APPLICATION NOTE  
11.1 In-system Programming Software Examples  
This application note illustrates the in-system programmability of the Winbond W78E365 ROM  
microcontroller. In this example, microcontroller will boot from 64KB APROM bank and waiting for a  
key to enter in-system programming mode for re-programming the contents of 64KB APROM. While  
entering in-system programming mode, microcontroller executes the loader program in 4KB LDROM  
bank. The loader program erases the 64KB APROM then reads the new code data from external  
SRAM buffer (or through other interfaces) to update the 64KB APROM.  
Example 1:  
;*******************************************************************************************************************  
;* Example of 64K APROM program: Program will scan the P1.0. if P1.0 = 0, enters in-system  
;* programming mode for updating the content of APROM code else executes the current ROM code.  
;* XTAL = 16 MHz  
;*******************************************************************************************************************  
.chip 8052  
.RAMCHK OFF  
.symbols  
CHPCON EQU  
CHPENR EQU  
BFH  
F6H  
C4H  
C5H  
C6H  
C7H  
SFRAL  
SFRAH  
SFRFD  
SFRCN  
EQU  
EQU  
EQU  
EQU  
ORG  
0H  
LJMP 100H  
; JUMP TO MAIN PROGRAM  
;************************************************************************  
;* TIMER0 SERVICE VECTOR ORG = 000BH  
;************************************************************************  
ORG 00BH  
CLR  
TR0  
; TR0 = 0, STOP TIMER0  
MOV  
MOV  
RETI  
TL0, R6  
TH0, R7  
;************************************************************************  
;* 64K APROM MAIN PROGRAM  
;************************************************************************  
ORG100H  
MAIN_64K:  
MOV A, P1  
; SCAN P1.0  
ANL A, #01H  
CJNE A, #01H, PROGRAM_64K ; IF P1.0 = 0, ENTER IN-SYSTEM PROGRAMMING MODE  
JMP NORMAL_MODE  
PROGRAM_64K:  
MOV CHPENR, #87H  
; CHPENR = 87H, CHPCON REGISTER WRTE ENABLE  
; CHPENR = 59H, CHPCON REGISTER WRITE ENABLE  
; CHPCON = 03H, ENTER IN-SYSTEM PROGRAMMING MODE  
; TR = 0 TIMER0 STOP  
MOV CHPENR, #59H  
MOV CHPCON, #03H  
MOV TCON, #00H  
Publication Release Date: January 10, 2007  
- 37 -  
Revision A7  
W78LE365/W78L365A  
MOV IP, #00H  
MOV IE, #82H  
; IP = 00H  
; TIMER0 INTERRUPT ENABLE FOR WAKE-UP FROM IDLE MODE  
MOV R6, #F0H  
MOV R7, #FFH  
MOV TL0, R6  
; TL0 = F0H  
; TH0 = FFH  
MOV TH0, R7  
MOV TMOD, #01H  
MOV TCON, #10H  
MOV PCON, #01H  
; TMOD = 01H, SET TIMER0 A 16-BIT TIMER  
; TCON = 10H, TR0 = 1, GO  
; ENTER IDLE MODE FOR LAUNCHING THE IN-SYSTEM  
; PROGRAMMING  
;********************************************************************************  
;* Normal mode 64KB APROM program: depending user's application  
;********************************************************************************  
NORMAL_MODE:  
.
; User's application program  
.
.
.
Example 2:  
;******************************************************************************************************************************  
Example of 4 KB LDROM program: This loader program will erase the 64KB APROM first, then reads the new ;*  
code from external SRAM and program them into 32 KB APROM bank. XTAL = 16 MHz  
;*****************************************************************************************************************************  
.chip 8052  
.RAMCHK OFF  
.symbols  
CHPCON  
CHPENR  
SFRAL  
EQU  
EQU  
EQU  
EQU  
EQU  
EQU  
BFH  
F6H  
C4H  
C5H  
C6H  
C7H  
SFRAH  
SFRFD  
SFRCN  
ORG 000H  
LJMP 100H  
; JUMP TO MAIN PROGRAM  
;************************************************************************  
;* 1. TIMER0 SERVICE VECTOR ORG = 0BH  
;************************************************************************  
ORG 000BH  
CLR TR0  
MOV TL0, R6  
MOV TH0, R7  
RETI  
; TR0 = 0, STOP TIMER0  
;************************************************************************  
;* 4KB LDROM MAIN PROGRAM  
;************************************************************************  
ORG 100H  
- 38 -  
W78LE365/W78L365A  
MAIN_4K:  
MOV SP, #C0H  
MOV CHPENR, #87H  
MOV CHPENR, #59H  
; CHPENR = 87H, CHPCON WRITE ENABLE.  
; CHPENR = 59H, CHPCON WRITE ENABLE.  
MOV CHPCON, #03H ; CHPCON = 03H, ENABLE IN-SYSTEM PROGRAMMING.  
MOV CHPENR, #00H  
; DISABLE CHPCON WRITE ATTRIBUTE  
MOV TCON, #00H  
MOV TMOD, #01H  
MOV IP, #00H  
; TCON = 00H, TR = 0 TIMER0 STOP  
; TMOD = 01H, SET TIMER0 A 16BIT TIMER  
; IP = 00H  
MOV IE, #82H  
; IE = 82H, TIMER0 INTERRUPT ENABLED  
MOV R6, #F0H  
MOV R7, #FFH  
MOV TL0, R6  
MOV TH0, R7  
MOV TCON, #10H  
MOV PCON, #01H  
; TCON = 10H, TR0 = 1, GO  
; ENTER IDLE MODE  
UPDATE_64K:  
MOV TCON, #00H  
; TCON = 00H , TR = 0 TIM0 STOP  
; IP = 00H  
MOV IP, #00H  
MOV IE, #82H  
; IE = 82H, TIMER0 INTERRUPT ENABLED  
; TMOD = 01H, MODE1  
MOV TMOD, #01H  
MOV R6, #E0H  
; SET WAKE-UP TIME FOR ERASE OPERATION, ABOUT 15 mS. DEPENDING  
; ON USER'S SYSTEM CLOCK RATE.  
MOV R7, #B1H  
MOV TL0, R6  
MOV TH0, R7  
ERASE_P_4K:  
MOV SFRCN, #22H  
MOV TCON, #10H  
MOV PCON, #01H  
; SFRCN(C7H) = 22H ERASE 64K  
; TCON = 10H, TR0 = 1, GO  
; ENTER IDLE MODE (FOR ERASE OPERATION)  
;*********************************************************************  
;* BLANK CHECK  
;*********************************************************************  
MOV SFRCN, #0H  
MOV SFRAH, #0H  
MOV SFRAL, #0H  
MOV R6, #FEH  
MOV R7, #FFH  
MOV TL0, R6  
; READ 64KB APROM MODE  
; START ADDRESS = 0H  
; SET TIMER FOR READ OPERATION, ABOUT 1.5 µS.  
MOV TH0, R7  
BLANK_CHECK_LOOP:  
SETB TR0  
; ENABLE TIMER 0  
; ENTER IDLE MODE  
; READ ONE BYTE  
MOV PCON, #01H  
MOV A, SFRFD  
CJNE A, #FFH, BLANK_CHECK_ERROR  
INC SFRAL  
; NEXT ADDRESS  
MOV A, SFRAL  
JNZ BLANK_CHECK_LOOP  
INC SFRAH  
MOV A, SFRAH  
Publication Release Date: January 10, 2007  
Revision A7  
- 39 -  
W78LE365/W78L365A  
CJNE A, #80H, BLANK_CHECK_LOOP ; END ADDRESS = 7FFFH  
JMP PROGRAM_64KROM  
BLANK_CHECK_ERROR:  
MOV P1, #F0H  
MOV P3, #F0H  
JMP $  
;*******************************************************************************  
;* RE-PROGRAMMING 64KB APROM BANK  
;*******************************************************************************  
PROGRAM_64KROM:  
MOV DPTR, #0H  
MOV R2, #00H  
MOV R1, #00H  
MOV DPTR, #0H  
MOV SFRAH, R1  
; THE ADDRESS OF NEW ROM CODE  
; TARGET LOW BYTE ADDRESS  
; TARGET HIGH BYTE ADDRESS  
; EXTERNAL SRAM BUFFER ADDRESS  
; SFRAH, TARGET HIGH ADDRESS  
MOV SFRCN, #21H ; SFRCN(C7H) = 21 (PROGRAM 64K)  
MOV R6, #BEH  
MOV R7, #FFH  
MOV TL0, R6  
MOV TH0, R7  
; SET TIMER FOR PROGRAMMING, ABOUT 50 µS.  
PROG_D_64K:  
MOV SFRAL, R2  
MOVX A, @DPTR  
; SFRAL(C4H) = LOW BYTE ADDRESS  
; READ DATA FROM EXTERNAL SRAM BUFFER. BY ACCORDING USER?  
; CIRCUIT, USER MUST MODIFY THIS INSTRUCTION TO FETCH CODE  
; SFRFD(C6H) = DATA IN  
MOV SFRFD, A  
MOV TCON, #10H  
MOV PCON, #01H  
INC DPTR  
; TCON = 10H, TR0 = 1, GO  
; ENTER IDLE MODE (PRORGAMMING)  
INC R2  
CJNE R2, #0H, PROG_D_64K  
INC R1  
MOV SFRAH, R1  
CJNE R1, #80H, PROG_D_64K  
;*****************************************************************************  
; * VERIFY 64KB APROM BANK  
;*****************************************************************************  
MOV R4, #03H  
MOV R6, #FEH  
MOV R7, #FFH  
MOV TL0, R6  
; ERROR COUNTER  
; SET TIMER FOR READ VERIFY, ABOUT 1.5 µS.  
MOV TH0, R7  
MOV DPTR, #0H  
MOV R2, #0H  
MOV R1, #0H  
MOV SFRAH, R1  
; The start address of sample code  
; Target low byte address  
; Target high byte address  
; SFRAH, Target high address  
MOV SFRCN, #00H ; SFRCN = 00 (Read ROM CODE)  
READ_VERIFY_64K:  
MOV SFRAL, R2  
; SFRAL(C4H) = LOW ADDRESS  
; TCON = 10H, TR0 = 1,GO  
MOV TCON, #10H  
MOV PCON, #01H  
INC R2  
- 40 -  
W78LE365/W78L365A  
MOVX A, @DPTR  
INC DPTR  
CJNE A, SFRFD, ERROR_64K  
CJNE R2, #0H, READ_VERIFY_64K  
INC R1  
MOV SFRAH, R1  
CJNE R1, #80H, READ_VERIFY_64K  
;******************************************************************************  
;* PROGRAMMING COMPLETLY, SOFTWARE RESET CPU  
;******************************************************************************  
MOV CHPENR, #87H  
MOV CHPENR, #59H  
MOV CHPCON, #83H  
; CHPENR = 87H  
; CHPENR = 59H  
; CHPCON = 83H, SOFTWARE RESET.  
ERROR_64K:  
DJNZ R4, UPDATE_64K ; IF ERROR OCCURS, REPEAT 3 TIMES.  
.
.
.
.
; IN-SYSTEM PROGRAMMING FAIL, USER'S PROCESS TO DEAL WITH IT.  
Publication Release Date: January 10, 2007  
Revision A7  
- 41 -  
W78LE365/W78L365A  
12. REVISION HISTORY  
VERSION  
DATE  
PAGE  
DESCRIPTION  
A1  
A2  
A3  
A4  
May 14, 2003  
August, 2004  
April 19, 2005  
July 1, 2005  
-
Initial Issued  
Revise the title of 9.1  
Add Important Notice  
Add lead free (RoHS) parts  
Remove block diagram  
31  
41  
3
A5  
A6  
October 2, 2006  
Change operating frequency into 20MHz  
Remove all Leaded package parts  
December 4, 2006  
3
3
4
Add 48-pin LQFP part.  
A7  
January 10, 2007  
Add 48-pin LQFP package  
Add 48-pin LQFP package dimension  
36  
Important Notice  
Winbond products are not designed, intended, authorized or warranted for use as components  
in systems or equipment intended for surgical implantation, atomic energy control  
instruments, airplane or spaceship instruments, transportation instruments, traffic signal  
instruments, combustion control instruments, or for other applications intended to support or  
sustain life. Further more, Winbond products are not intended for applications wherein failure  
of Winbond products could result or lead to a situation wherein personal injury, death or  
severe property or environmental damage could occur.  
Winbond customers using or selling these products for use in such applications do so at their  
own risk and agree to fully indemnify Winbond for any damages resulting from such improper  
use or sales.  
Headquarters  
Winbond Electronics Corporation America Winbond Electronics (Shanghai) Ltd.  
27F, 2299 Yan An W. Rd. Shanghai,  
200336 China  
2727 North First Street, San Jose,  
CA 95134, U.S.A.  
No. 4, Creation Rd. III,  
Science-Based Industrial Park,  
Hsinchu, Taiwan  
TEL: 86-21-62365999  
FAX: 86-21-62365998  
TEL: 1-408-9436666  
TEL: 886-3-5770066  
FAX: 1-408-5441798  
FAX: 886-3-5665577  
http://www.winbond.com.tw/  
Taipei Office  
Winbond Electronics Corporation Japan  
Winbond Electronics (H.K.) Ltd.  
9F, No.480, Rueiguang Rd.,  
Neihu District, Taipei, 114,  
Taiwan, R.O.C.  
7F Daini-ueno BLDG, 3-7-18  
Shinyokohama Kohoku-ku,  
Yokohama, 222-0033  
Unit 9-15, 22F, Millennium City,  
No. 378 Kwun Tong Rd.,  
Kowloon, Hong Kong  
TEL: 852-27513100  
TEL: 886-2-8177-7168  
FAX: 886-2-8751-3579  
TEL: 81-45-4781881  
FAX: 81-45-4781800  
FAX: 852-27552064  
Please note that all data and specifications are subject to change without notice.  
All the trademarks of products and companies mentioned in this datasheet belong to their respective owners.  
- 42 -  
配单直通车
  •  
  • 供货商
  • 型号 *
  • 数量*
  • 厂商
  • 封装
  • 批号
  • 交易说明
  • 询价
批量询价选中的记录已选中0条,每次最多15条。
 复制成功!