欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC18F4520-I/PT 参数 Datasheet PDF下载

PIC18F4520-I/PT图片预览
型号: PIC18F4520-I/PT
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚增强型闪存微控制器与10位A / D和纳瓦技术 [28/40/44-Pin Enhanced Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology]
分类和应用: 闪存微控制器
文件页数/大小: 412 页 / 6898 K
品牌: MICROCHIP [ MICROCHIP TECHNOLOGY ]
 浏览型号PIC18F4520-I/PT的Datasheet PDF文件第87页浏览型号PIC18F4520-I/PT的Datasheet PDF文件第88页浏览型号PIC18F4520-I/PT的Datasheet PDF文件第89页浏览型号PIC18F4520-I/PT的Datasheet PDF文件第90页浏览型号PIC18F4520-I/PT的Datasheet PDF文件第92页浏览型号PIC18F4520-I/PT的Datasheet PDF文件第93页浏览型号PIC18F4520-I/PT的Datasheet PDF文件第94页浏览型号PIC18F4520-I/PT的Datasheet PDF文件第95页  
PIC18F2420/2520/4420/4520
8.0
8.1
8 x 8 HARDWARE MULTIPLIER
Introduction
EXAMPLE 8-1:
MOVF
MULWF
ARG1, W
ARG2
8 x 8 UNSIGNED MULTIPLY
ROUTINE
;
; ARG1 * ARG2 ->
; PRODH:PRODL
All PIC18 devices include an 8 x 8 hardware multiplier
as part of the ALU. The multiplier performs an unsigned
operation and yields a 16-bit result that is stored in the
product register pair, PRODH:PRODL. The multiplier’s
operation does not affect any flags in the STATUS
register.
Making multiplication a hardware operation allows it to
be completed in a single instruction cycle. This has the
advantages of higher computational throughput and
reduced code size for multiplication algorithms and
allows the PIC18 devices to be used in many applica-
tions previously reserved for digital signal processors.
A comparison of various hardware and software
multiply operations, along with the savings in memory
and execution time, is shown in Table 8-1.
EXAMPLE 8-2:
MOVF
MULWF
BTFSC
SUBWF
MOVF
BTFSC
SUBWF
ARG1, W
ARG2
ARG2, SB
PRODH, F
ARG2, W
ARG1, SB
PRODH, F
8 x 8 SIGNED MULTIPLY
ROUTINE
;
;
;
;
;
ARG1 * ARG2 ->
PRODH:PRODL
Test Sign Bit
PRODH = PRODH
- ARG1
; Test Sign Bit
; PRODH = PRODH
;
- ARG2
8.2
Operation
unsigned multiplication. Only one instruction is required
when one of the arguments is already loaded in the
WREG register.
multiplication. To account for the sign bits of the argu-
ments, each argument’s Most Significant bit (MSb) is
tested and the appropriate subtractions are done.
TABLE 8-1:
Routine
PERFORMANCE COMPARISON FOR VARIOUS MULTIPLY OPERATIONS
Multiply Method
Without hardware multiply
Hardware multiply
Without hardware multiply
Hardware multiply
Without hardware multiply
Hardware multiply
Without hardware multiply
Hardware multiply
Program
Memory
(Words)
13
1
33
6
21
28
52
35
Cycles
(Max)
69
1
91
6
242
28
254
40
Time
@ 40 MHz
6.9
μs
100 ns
9.1
μs
600 ns
24.2
μs
2.8
μs
25.4
μs
4.0
μs
@ 10 MHz
27.6
μs
400 ns
36.4
μs
2.4
μs
96.8
μs
11.2
μs
102.6
μs
16.0
μs
@ 4 MHz
69
μs
1
μs
91
μs
6
μs
242
μs
28
μs
254
μs
40
μs
8 x 8 unsigned
8 x 8 signed
16 x 16 unsigned
16 x 16 signed
©
2008 Microchip Technology Inc.
DS39631E-page 89