Writes 4 bytes to the U12's internal memory.
Note: Bytes are written down from the starting address. For example, if you write starting at address 0x203, then byte 0 is written to 0x203, byte 1 is written to 0x202, byte 2 is written to 0x201, and byte 0 is written to 0x200.
Table 5.12-1.
|
Command |
|
|
Byte # |
Description |
|
0 |
Data Byte 3 |
|
1 |
Data Byte 2 |
|
2 |
Data Byte 1 |
|
3 |
Data Byte 0 |
|
4 |
XXXXXXXX |
|
5 |
01X1XX01 (Write RAM) |
|
6 |
Most Significant Address Byte |
|
7 |
Least Significant Address Byte |
|
|
|
|
|
|
|
Response |
|
|
Byte # |
Description |
|
0 |
01010001 |
|
1 |
Readback of data byte 3 |
|
2 |
Readback of data byte 2 |
|
3 |
Readback of data byte 1 |
|
4 |
Readback of data byte 0 |
|
5 |
XXXXXXXX |
|
6 |
Most Significant Address Byte |
|
7 |
Least Significant Address Byte |
Table 5.12-2.
|
Non-Volatile RAM Map |
|
|
Address Range |
Description |
|
0x00 |
A copy of the serial # which is stored in ROM |
|
0x08 - 0x0A |
Always 0 |
|
0x0B |
LocalID |
|
0x0C |
wdoglj (Watchdog Variable) |
|
0x0D |
wdogtoh (Watchdog Variable) |
|
0x0E |
wdogtol (Watchdog Variable) |
|
0x070 |
fullA (Asynch Variable) |
|
0x071 |
fullB (Asynch Variable) |
|
0x072 |
fullC (Asynch Variable) |
|
0x073 |
halfA (Asynch Variable) |
|
0x074 |
halfB (Asynch Variable) |
|
0x075 |
halfC (Asynch Variable) |
|
0x076 |
tomult (Asynch Variable) |
|
0x080 - 0x0BF |
Serial data send buffer (64 bytes, 28 used) |
|
0x0C0 - 0x0FF |
Serial data receive buffer (64 bytes, 28 used) |
|
0x1C0 - 0x1DF |
Serial data buffer (32 bytes) |
|
0x200 - 0x3FF |
User area |
|
0x400 - 0x1FFF |
Circular RAM buffer. |
LabJackPython Example
>>> import u12
>>> d = u12.U12(debug=True)
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
>>> d.rawWriteRAM([1, 2, 3, 4], 0x200)
Writing: [0x4, 0x3, 0x2, 0x1, 0x0, 0x51, 0x2, 0x0]
Received: [0x51, 0x4, 0x3, 0x2, 0x1, 0x0, 0x2, 0x0]
{'DataByte3': 4, 'DataByte2': 3, 'DataByte1': 2, 'DataByte0': 1}