Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

Can we use read-modify-write instruction such as BSET and BCLR

Latest Updated:03/15/2012

Question:

The manual describes some bits as follows: "Nothing is assigned. In an attempt to write to these bits, write "0". The value, if read, turns out to be indeterminate."
For other bits that are assigned to the same address with the above bits, can we use read-modify-write instructions such as BSET and BCLR?

Answer:

There is no difference in the operation of an unassigned bit whether you program a "0" or "1". However, these bits may be assigned for new functions in future expansions, which is why the user's manual advises you to program these bits with "0". You can use instructions such as BSET and BCLR, but you should write "0" to these bits when you program an immediate value directly.
Suitable Products
R8C/1x
R8C/2x
R8C/3x
R8C/Lx
R8C/Mx
M32C/8A
M32C/88
M32C/87
M32C/85
M32C/84
M32C/83
M32C/80
M16C/62A
M16C/62A(M16C/62T)
M16C/62M
M16C/62N
M16C/62N(M3062GF8NFP, M3062GF8NGP)
M16C/62P
M16C/63
M16C/64A
M16C/64C
M16C/65
M16C/65C
M16C/6C
M16C/6N4, M16C/6N5
M16C/6NK, M16C/6NL, M16C/6NM, M16C/6NN
M16C/5L, M16C/56
M16C/5LD, M16C/56D
M16C/5M, M16C/57
M16C/30P
M16C/29
M16C/28
M16C/26A
M16C/1N