User Tools

Site Tools




HWrite address, data, byteLength

address Heap address
byteLength number of bytes to write

This function supports only CB405 and CB405RT modules.

Store length number of bytes of variable to the heap address, address.

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.

About Heap Memory

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,EEWriteEEPROM Retains data during power cycles without a battery. The EEWrite command takes about 5ms. 4KB of available memory
HRead,HWriteSRAM 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

Go CUBLOC home

cubloc/hwrite/index.txt · Last modified: 2016/04/14 11:07 (external edit)