variable = HRead (address, byteLength)
variable | Variable to store results |
address | Heap address |
byteLength | Number of bytes to read, constant or variable (1 to 4) |
This function supports only CB405 and CB405RT modules.
Read the designated number of bytes set by length from heap address, address, and store into variable.
Dim A As Integer Dim B As Integer A = 100 HWrite 0,A,2 ' Write integer A to address 0. B = HRead(0,2) ' Read from address 0 and store in B.
Heap memory access is a special feature only available on the CB405/CB405RT module. The user may use 55KB of heap memory from address 0 through 56831 (&H0000 through &HDDFF). The heap can be used to store large data for graphics, temperature tables, etc. With a backup battery, the heap can be used for data logging and other persistent uses.
EERead and EEWrite have same syntax as HRead and HWrite.
Function | Memory Type | Feature |
---|---|---|
EERead,EEWrite | EEPROM | Retains data during power cycles without a battery. The EEWrite command takes about 5ms. 4KB of available memory |
HRead,HWrite | SRAM | Retains data during power cycles with a backup battery. Without a backup battery, data is lost. HWrite command takes about 20 microseconds to execute, much faster compared to EEWrite. 55KB of available memory |