Electronic Components Datasheet Search
  English  ▼

X  

D17133CS Datasheet(PDF) 127 Page - NEC

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

D17133CS Datasheet(HTML) 127 Page - NEC

Back Button D17133CS Datasheet HTML 123Page - NEC D17133CS Datasheet HTML 124Page - NEC D17133CS Datasheet HTML 125Page - NEC D17133CS Datasheet HTML 126Page - NEC D17133CS Datasheet HTML 127Page - NEC D17133CS Datasheet HTML 128Page - NEC D17133CS Datasheet HTML 129Page - NEC D17133CS Datasheet HTML 130Page - NEC D17133CS Datasheet HTML 131Page - NEC Next Button
Zoom Inzoom in Zoom Outzoom out
 127 / 289 page
background image
CHAPTER 12
PORTS
112
12.6.1 Cautions when Operating Port Registers
Among the input/output ports in the
µPD17120 series, only port 0E is such that, even when in output mode, doing
a read causes the status of the pins to be read.
Consequently, when executing port register read macro instructions (SETn/CLRn, etc.) or bit manipulation
instructions such as AND/OR/XOR, etc., you may inadvertently change the status of the pins.
Be particularly careful when port 0E is being externally forced down to low level.
Figure 12-1 shows an example of the changes in the port register and microcontroller internal status when the
CLR1 P0E1 instruction (equivalent to the AND 6F, #1101B instruction) is executed.
For example, consider the case where both the P0E1 and P0E0 pins of port 0E are used for output, high level is
output from pins P0E1 and P0E0, and the P0E0 pin is being externally forced down to a low level; then the status
of each pin of port 0E is as shown in Figure 12-1 <1>. The (P0E3 and P0E2 pins do not exist in the
µPD17120 subseries,
but are handled as if they exist in the program.)
If the CLR1 P0E1 instruction is executed to bring the P0E1 pin to low level, the status of each pin of port 0E changes
as shown in Figure 12-1 <2>. In this case, the P0E1 pin naturally changes to output low level, but the value of the
port register changes so that pin P0E0, which should output high level, also outputs low level. This result comes
about because the CLR1 P0E1 instruction is executed not on the port register, but on the state of the pins.
To avoid this phenomenon, use a MOV or other instruction to set the state of all the pins, not just the pins that
are to be changed. In this example, to set just the P0E1 pin to a low level, you can use the MOV 6FH, #1101 instruction,
and the problem will not occur.
For the same reason, when using port 0E for mixed input and output, be sure to put the pins that are being used
for input into input mode (P0EBI0n = 0).
Figure 12-1. Changes in Port Register Due to Execution of the CLR1 P0E1 Instruction
P0E3
–
–
Does not exist
P0E2
–
–
P0E1
1
H output
H
P0E0
1
H output
L (forced)
Execution of the CLR1 P0E1
instruction
[AND 6FH, #1101B]
Port register
Microcomputer state
Pin state
<1> Before executing instructions
P0E3
–
–
Does not exist
P0E2
–
–
P0E1
0
L output
L
P0E0
0
L output
L
Port register
Microcomputer state
Pin state
H: high level
L: low level
<2> After executing instructions



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