Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20835

BASCOM-AVR : Const - how to Create a Const and set a default value? : REPLY

$
0
0
Hi Tim, after reading the AN625 documentation, it clear to me. [code:1:1100fface3] Number Name Default Summary 0x0002 GLOBAL_LOW_BATT_THRESH 0x18 Low battery threshold [/code:1:1100fface3] NUMBER seams to be a register inside the Chip, DEFAULT is the default value before any changes done to the chip. NAME is the human readable name of this register. so a NAME has two informations: the register address and the register value. a way could be: [code:1:1100fface3] 'define Registers Const REG_GLOBAL_LOW_BATT_THRESH = &H0002 ... 'define variables DIM GLOBAL_LOW_BATT_THRESH as Byte .... GLOBAL_LOW_BATT_THRESH = reader_function( REG_GLOBAL_LOW_BATT_THRESH ) [/code:1:1100fface3] best, michael

Viewing all articles
Browse latest Browse all 20835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>