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

PIC18F4431-I/P 参数 Datasheet PDF下载

PIC18F4431-I/P图片预览
型号: PIC18F4431-I/P
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚增强型闪存微控制器采用纳瓦技术,高性能PWM和A / D [28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High-Performance PWM and A/D]
分类和应用: 闪存微控制器
文件页数/大小: 392 页 / 3127 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18F4431-I/P的Datasheet PDF文件第91页浏览型号PIC18F4431-I/P的Datasheet PDF文件第92页浏览型号PIC18F4431-I/P的Datasheet PDF文件第93页浏览型号PIC18F4431-I/P的Datasheet PDF文件第94页浏览型号PIC18F4431-I/P的Datasheet PDF文件第96页浏览型号PIC18F4431-I/P的Datasheet PDF文件第97页浏览型号PIC18F4431-I/P的Datasheet PDF文件第98页浏览型号PIC18F4431-I/P的Datasheet PDF文件第99页  
PIC18F2331/2431/4331/4431  
9.2  
Operation  
9.0  
9.1  
8 x 8 HARDWARE MULTIPLIER  
Introduction  
Example 9-1 shows the sequence to do an 8 x 8  
unsigned multiply. Only one instruction is required  
when one argument of the multiply is already loaded in  
the WREG register.  
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.  
Example 9-2 shows the sequence to do an 8 x 8 signed  
multiply. To account for the sign bits of the arguments,  
each argument’s Most Significant bit (MSb) is tested  
and the appropriate subtractions are done.  
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 applications  
previously reserved for digital signal processors.  
EXAMPLE 9-1:  
8 x 8 UNSIGNED MULTIPLY  
ROUTINE  
MOVF  
ARG1, W  
ARG2  
;
MULWF  
; ARG1 * ARG2 ->  
; PRODH:PRODL  
A comparison of various hardware and software multi-  
ply operations, along with the savings in memory and  
execution time, is shown in Table 9-1.  
EXAMPLE 9-2:  
8 x 8 SIGNED MULTIPLY  
ROUTINE  
MOVF  
MULWF  
ARG1, W  
ARG2  
; ARG1 * ARG2 ->  
; PRODH:PRODL  
BTFSC  
SUBWF  
ARG2, SB  
PRODH, F  
; Test Sign Bit  
; PRODH = PRODH  
;
- ARG1  
MOVF  
BTFSC  
SUBWF  
ARG2, W  
ARG1, SB  
PRODH, F  
; Test Sign Bit  
; PRODH = PRODH  
;
- ARG2  
TABLE 9-1:  
Routine  
PERFORMANCE COMPARISON  
Program  
Time  
@ 40 MHz @ 10 MHz @ 4 MHz  
Cycles  
(Max)  
Multiply Method  
Memory  
(Words)  
Without Hardware Multiply  
Hardware Multiply  
13  
1
69  
1
6.9 s  
100 ns  
9.1 s  
600 ns  
24.2 s  
2.4 s  
25.4 s  
3.6 s  
27.6 s  
400 ns  
36.4 s  
2.4 s  
69 s  
1 s  
8 x 8 Unsigned  
8 x 8 Signed  
Without Hardware Multiply  
Hardware Multiply  
33  
6
91  
6
91 s  
6 s  
Without Hardware Multiply  
Hardware Multiply  
21  
24  
52  
36  
242  
24  
254  
36  
96.8 s  
9.6 s  
242 s  
24 s  
254 s  
36 s  
16 x 16 Unsigned  
16 x 16 Signed  
Without Hardware Multiply  
Hardware Multiply  
102.6 s  
14.4 s  
2010 Microchip Technology Inc.  
DS39616D-page 95  
 复制成功!