GETREG
(Created page with "= <span class="f_Header">Action</span> = Reads a byte from an internal register. <span style="font-family: Arial;"> </span> <span style="font-family: Arial;"> </s...") |
|||
Line 45: | Line 45: | ||
GetReg and SetReg will read/write registers on all AVR processors. | GetReg and SetReg will read/write registers on all AVR processors. | ||
+ | |||
+ | |||
+ | |||
+ | [[File:Notice.jpg|notice]]In version 2078, all internal registers (R0-R31) are made available as normal BYTE variables. This means that you can simply assign or read a register from basic : Rx=value. <br/>This is more convenient than using SETREG and GETREG. | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> |
Latest revision as of 20:51, 17 January 2017
Contents |
Action
Reads a byte from an internal register.
Syntax
var = GETREG( Reg )
Remarks
Most AVR chips have 32 registers named R0-R31. The GetReg function will return the value of the specified register.
Reg |
The register name : R0-R31 or a register definition. |
Var |
The name of a variable that will be assigned with the content of the register. |
PEEK and POKE work with an address. And will return a HW register on the Xmega since Xmega has a different address map.
GetReg and SetReg will read/write registers on all AVR processors.
In version 2078, all internal registers (R0-R31) are made available as normal BYTE variables. This means that you can simply assign or read a register from basic : Rx=value.
This is more convenient than using SETREG and GETREG.
See also
Example
Languages | English • Deutsch |
---|