AT94K05AL ATMEL Corporation, AT94K05AL Datasheet - Page 107
AT94K05AL
Manufacturer Part Number
AT94K05AL
Description
Fpslic Devices Combine 5K Gates of Atmel's Patented AT40K Fpga Architecture, a 20 Mips Avr 8-bit Risc Microprocessor Core, Numerous Fixed Microcontroller Peripheries And up to 36K Bytes of Program And Data SRAM.
Manufacturer
ATMEL Corporation
Datasheet
1.AT94K05AL.pdf
(192 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 107 of 192
- Download datasheet (2Mb)
8-bit Multiplication
Example 1 –
Basic Usage
Example 2 –
Special Cases
Rev. 1138F–FPSLI–06/02
Doing an 8-bit multiply using the hardware multiplier is simple: just load the operands into two
registers (or only one for square multiply) and execute one of the multiply instructions. The
result will be placed in register pair R1:R0. However, note that only the MUL instruction does
not have register usage restrictions. Figure 59 shows the valid (operand) register usage for
each of the multiply instructions.
The first example shows an assembly code that reads the port B input value and multiplies this
value with a constant (5) before storing the result in register pair R17:R16.
Note the use of the MOVW instruction. This example is valid for all of the multiply instructions.
Figure 59. Valid Register Usage
This example shows some special cases of the MUL instruction that are valid.
Even though the operand is put in the result register pair R1:R0, the operation gives the cor-
rect result since R1 and R0 are fetched in the first clock cycle and the result is stored back in
the second clock cycle.
in
ldi
mul
movw r17:r16,r1:r0; Move the result to the r17:r16
lds
lds
mul
lds
mul
r16,PINB
r17,5
r16,r17
r0,variableA; Load r0 with SRAM variable A
r1,variableB; Load r1 with SRAM variable B
r1,r0
r0,variableA; Load r0 with SRAM variable A
r0,r0
MUL
R10
R11
R12
R13
R14
R15
R16
R17
R18
R19
R20
R21
R22
R23
R24
R25
R26
R27
R28
R29
R30
R31
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
; r1:r0 = variable A * variable B
; r0:r0 = square(variable A)
; Read pin values
; Load 5 into r17
; r1:r0 = r17 * r16
; register pair
MULS
R16
R17
R18
R19
R20
R21
R22
R23
R24
R25
R26
R27
R28
R29
R30
R31
AT94K Series FPSLIC
FMULSU
MULSU
FMULS
FMUL
R16
R17
R18
R19
R20
R21
R22
R23
107
Related parts for AT94K05AL
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
5K - 40K Gates of At40k FPGA with 8-bit Microcontroller, up to 36K Bytes of SRAM and On-chip JTAG ICE
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
MONOLITHIC INTEGRATED FEATUREPHONE CIRCUIT
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
AM-FM Receiver IC U4255BM-M
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Monolithic Integrated Feature Phone Circuit
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Multistandard Video-IF and Quasi Parallel Sound Processing
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
High-performance EE PLD
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
8-bit Flash Microcontroller
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
2-Wire Serial EEPROM
Manufacturer:
ATMEL Corporation
Datasheet: