Electronic Components Datasheet Search
  English  ▼

X  

UPD17P136ACT Datasheet(PDF) 118 Page - NEC

Part # UPD17P136ACT
Description  4-BIT SINGLE-CHIP MICROCONTROLLER
PDF  292 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  NEC [NEC]
Direct Link  http://www.nec.com/
Logo NEC - NEC

UPD17P136ACT Datasheet(HTML) 118 Page - NEC

Back Button UPD17P136ACT Datasheet HTML 114Page - NEC UPD17P136ACT Datasheet HTML 115Page - NEC UPD17P136ACT Datasheet HTML 116Page - NEC UPD17P136ACT Datasheet HTML 117Page - NEC UPD17P136ACT Datasheet HTML 118Page - NEC UPD17P136ACT Datasheet HTML 119Page - NEC UPD17P136ACT Datasheet HTML 120Page - NEC UPD17P136ACT Datasheet HTML 121Page - NEC UPD17P136ACT Datasheet HTML 122Page - NEC Next Button
Zoom Inzoom in Zoom Outzoom out
 118 / 292 page
background image
CHAPTER 11 ARITHMETIC AND LOGIC UNIT (ALU)
99
11.7 ROTATIONS
There are rotation instructions for rotation to the right and for rotation to the left.
The RORC instruction is used for rotation to the right.
The RORC instruction can only be used with the general register.
Rotation using the RORC instruction is not affected by the BCD or CMP flags in the program status word (PSWORD)
and does not affect the Z flag in the program status word (PSWORD).
Rotation to the left is performed by using the addition instruction ADDC.
11.7.1 and 11.7.2 explain rotation.
11.7.1 Rotation to the Right
The instruction used for rotation to the right (RORC r) rotates the contents of the general register in the direction
of its least significant bit.
When this instruction is executed, the contents of the CY flag becomes the most significant bit of the general register
(bit 3) and the least significant bit of the general register is placed in the CY flag.
Example 1.
MOV
PSW,
#0100B
; Sets CY flag to 1.
MOV
R1,
#1001B
RORC
R1
When these instructions are executed, the following operation is performed.
Basically, when rotation to the right is performed, the following operation is executed:
CY flag
→ b3, b3 → b2, b2 → b1, b1 → b0, b∞ → CY flag.
2.
MOV
PSW,
#0000B
; Resets CY flag to 0.
MOV
R1,
#1000B
; MSB
MOV
R2,
#0100B
MOV
R3,
#0010B
; LSB
RORC
R1
RORC
R2
RORC
R3
The program code above rotates the 13 bits in R1, R2, and R3 to the right.
11
1
0
0
CY flag
b3
b2
b1
b0



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com