DS2434 is 1-wire device with 16-bit unique ID, 2-byte battery cycle counter, A/D converter for battery temperature monitoring and 32 bytes eeprom for user data (total memory area is 160 bytes divided to 5 pages, but not all bytes are used).
Connection requires 3 wires:
- ground (pin 4 in programmer),
- data line (pin 5 in programmer),
- vdd (pin 8 in programmer)
This is how I connected it with REVELPROG-IS socket but you can also try to programm it in external circuit.
Below are ready to use scripts for REVELPROG-IS.
You can read more about Custom Scripts Programming here: viewtopic.php?f=22&t=280
DS2434 Read EEPROM (5 pages, 32 bytes per page = 160 bytes total*)
Code: Select all
// DS2434 READ (5 pages, each 32 bytes = 160 bytes total)
#SCRIPT HEADER;
SCRIPT:v1.8.5;
#HARDWARE SETTINGS;
HW:1-WIRE,5.0V,SLOW;
// PAGE 1 read (24 EEPROM bytes + 8 dummy bytes)
#OPERATION;
SW:0,0,0,0,0,0,0,0,0,500;
INSTR:71; // COPY NV1 to SP1
#OPERATION;
SW:0,0,1,31,0,0,0,0,0,500;
INSTR:11, 00; // READ SCRATCHPAD + SP1 ADDR
// PAGE 2 read (8 EEPROM bytes + 24 dummy bytes)
#OPERATION;
SW:0,0,0,0,0,0,0,0,0,500;
INSTR:77; // COPY NV2 to SP2
#OPERATION;
SW:0,0,1,31,0,0,0,0,0,500;
INSTR:11, 20; // READ SCRATCHPAD + SP2 ADDR
// PAGE 3 read (32 SRAM bytes)
#OPERATION;
SW:0,0,0,0,0,0,0,0,0,500;
INSTR:7A; // COPY SRAM to SP3
#OPERATION;
SW:0,0,1,31,0,0,0,0,0,500;
INSTR:11, 40; // READ SCRATCHPAD + ADDR
// PAGE 4 read
#OPERATION;
SW:0,0,1,31,0,0,0,0,0,500;
INSTR:B2, 60; // READ REGISTERS + REG. START. ADDR
// PAGE 5 read
#OPERATION;
SW:0,0,1,31,0,0,0,0,0,500;
INSTR:B2, 80; // READ REGISTERS + REG. START. ADDR
*please check datasheet which bytes are valid and which can be changed because not all bytes in memory area are used and some of them are read only
DS2434 Read 16-bit unique ID
Code: Select all
//DS2434 Read ID Register (16-bit)
#SCRIPT HEADER;
SCRIPT:v1.8.5;
#HARDWARE SETTINGS;
HW:1-WIRE,5.0V,SLOW;
// Read ID Register
#OPERATION;
SW:0,0,1,1,0,0,0,0,0,500;
INSTR:B2, 80; // READ REGISTERS + REG. START. ADDR
DS2434 Write EEPROM (3 pages: 24 bytes (SP1 = EEPROM) + 8 bytes (SP2 = EEPROM) + 32 bytes (SP3 = SRAM))
- data from buffer (since v1.8.5 only)
Code: Select all
//DS2434 WRITE EEPROM (using current data in buffer)
#SCRIPT HEADER;
SCRIPT:v1.8.5;
#HARDWARE SETTINGS;
HW:1-WIRE,5.0V,SLOW;
// Unlock NV1
#OPERATION;
SW:0,0,0,0,0,0,0,10,0,500;
INSTR:44; // Unlock NV1
// PAGE1 Write EEPROM (24 bytes)
#OPERATION;
SW:1,23,0,0,0,0,0,0,0,500;
INSTR:17, 00; // WRITE SCRATCHPAD + SP1 address
DATA: BUFFER, 0;
#OPERATION;
SW:0,0,0,0,0,0,0,10,0,500;
INSTR:22; // Copy SP1 to NV1
// PAGE2 Write EEPROM (8 bytes)
#OPERATION;
SW:1,7,0,0,0,0,0,0,0,500;
INSTR:17, 20; // WRITE SCRATCHPAD + SP2 address
DATA: BUFFER, 20;
#OPERATION;
SW:0,0,0,0,0,0,0,10,0,500;
INSTR:25; // Copy SP2 to NV2
// PAGE3 Write RAM & SRAM (32 bytes)
// please note: it will be lost when battery disconnected
#OPERATION;
SW:1,31,0,0,0,0,0,0,0,500;
INSTR:17, 40; // WRITE SCRATCHPAD + SP3 address
DATA: BUFFER, 40;
#OPERATION;
SW:0,0,0,0,0,0,0,10,0,500;
INSTR:28; // Copy SP3 to SRAM
DS2434 Reset Battery Cycle Counter
Code: Select all
//DS2434 Reset Battery Cycle Counter
#SCRIPT HEADER;
SCRIPT:v1.8.5;
#HARDWARE SETTINGS;
HW:1-WIRE,5.0V,SLOW;
// Reset cycle counter
#OPERATION;
SW:0,0,0,0,0,0,0,0,0,500;
INSTR:B8; // Reset Battery Cycle Counter
DS2434 Increment Cycle Counter
Code: Select all
//DS2434 Increment Battery Cycle Counter
#SCRIPT HEADER;
SCRIPT:v1.8.5;
#HARDWARE SETTINGS;
HW:1-WIRE,5.0V,SLOW;
// Increment cycle counter
#OPERATION;
SW:0,0,0,0,0,0,0,0,0,500;
INSTR:B5; // Increment Battery Cycle Counter
// Read cycle counter
#OPERATION;
SW:0,0,1,1,0,0,0,0,0,500;
INSTR:B2, 82; // READ Cycle counter register
DS2434 Read Cycle Counter
Code: Select all
//DS2434 Read Battery Cycle Counter
#SCRIPT HEADER;
SCRIPT:v1.8.5;
#HARDWARE SETTINGS;
HW:1-WIRE,5.0V,SLOW;
// Read cycle counter
#OPERATION;
SW:0,0,1,1,0,0,0,0,0,500;
INSTR:B2, 82; // READ Cycle counter register
DS2434 Read Battery Temperature (with A/D conversion at first step)
Code: Select all
//DS2434 Read Battery Temperature
#SCRIPT HEADER;
SCRIPT:v1.8.5;
#HARDWARE SETTINGS;
HW:1-WIRE,5.0V,SLOW;
// Start A/D conversion for temperature
#OPERATION;
SW:0,0,0,0,0,0,0,10,0,500;
INSTR:D2; // Convert T
// Dummy - wait for temperature conversion (max 1000ms)
#OPERATION;
SW:0,0,0,0,250,250,250,250,0,1500;
INSTR:B2, 62; // READ Status Register
// Read Temperature
#OPERATION;
SW:0,0,1,1,0,0,0,0,0,500;
INSTR:B2, 60; // READ Temperature Register
I'm also including updated memory database file for v1.8.5 (so you can find DS2434 in memory list). Please unpack this file and replace it in "%appdata%/REVELPROG-IS" only if you have v1.8.5 software version