DS2431 erasing issue

Here you can ask technical questions about REVELPROG-IS and device/memory programming.
rsm
Posts: 11
Joined: Thu Feb 15, 2024 3:42 am
Has thanked: 8 times

Re: DS2431 erasing issue

Postby rsm » Mon Feb 26, 2024 5:09 pm

The video uploaded helps, https://www.youtube.com/watch?v=69MQlU2r9k0

Unfortunately, there is no sound on the video, but I gathered the automatic mode allows the import of scripts for function.

Where can I find the script txt files for reading, erasing and writing on DS2431?


Regards

ArT
Posts: 1539
Joined: Wed Mar 25, 2015 8:54 am
Location: Warsaw, Poland
Has thanked: 56 times
Been thanked: 166 times

Re: DS2431 erasing issue

Postby ArT » Tue Feb 27, 2024 10:08 am

Here you have examples, you may need to modify it to your needs.

If you need, you can use one script before DS2431 and one after DS2431 as presented on video.
If you write me what would you like exactly achievie, I'll try to help, for example with automation mode you can do with one click:
- write DS2431 memory with your bin file
- execute script which will overwrite protection registers with your values.
But you can also do the same thing with single script, without automation mode - just connect WriteData and WriteRegisters to single script.
Attachments
RPscript_1wire_DS2431_WriteRegisters.txt
(1.23 KiB) Downloaded 187 times
RPscript_1wire_DS2431_Read.txt
(689 Bytes) Downloaded 194 times
RPscript_1wire_DS2431_Read_ProtectionControlBytes.txt
(541 Bytes) Downloaded 156 times
RPscript_1wire_DS2431_ReadRegisters.txt
(714 Bytes) Downloaded 175 times
RPscript_1wire_DS2431_WriteData.txt
(637 Bytes) Downloaded 172 times

rsm
Posts: 11
Joined: Thu Feb 15, 2024 3:42 am
Has thanked: 8 times

Re: DS2431 erasing issue

Postby rsm » Tue Feb 27, 2024 9:06 pm

Thank you for the reply again,


First, I need to read the whole chip: data memories, protection control bytes, etc ... basically from 0000h to 0087h (0088h to 008Fh is not readable, is it?). Once read, I need them saved in .bin or any format.

The file "RPscript_1wire_DS2431_Read.txt" seems to be for DS2430. can you please check? "RPscript_1wire_DS2431_ReadRegisters" seems to be good for address 80h-87h.

How I should run these two files and save the data in the Revelog program? Im confused between automatic and script windows now.




Regards

ArT
Posts: 1539
Joined: Wed Mar 25, 2015 8:54 am
Location: Warsaw, Poland
Has thanked: 56 times
Been thanked: 166 times

Re: DS2431 erasing issue

Postby ArT » Wed Feb 28, 2024 9:41 am

It's for DS2431, only comment is wrong.
Would you like to save it to single file? Usually EEPROM is separate file and control registers is other file (it needs 2 operations for read) but if you need it in single operation it's no problem, I prepared you script for reading all area.

PS. 88h to 8Fh are reserved bytes, it's not used for DS2431.
Attachments
RPscript_1wire_DS2431_ReadAll.txt
(1.3 KiB) Downloaded 177 times

rsm
Posts: 11
Joined: Thu Feb 15, 2024 3:42 am
Has thanked: 8 times

Re: DS2431 erasing issue

Postby rsm » Wed Feb 28, 2024 12:43 pm

Perfect Arthur!!

Now I need to write-protect the data memory page 0 (0000h to 001Fh).

Once write-protected, is it possible to deactivate the write protection, rewrite data memory and write-protect them again?

Regards

ArT
Posts: 1539
Joined: Wed Mar 25, 2015 8:54 am
Location: Warsaw, Poland
Has thanked: 56 times
Been thanked: 166 times

Re: DS2431 erasing issue

Postby ArT » Wed Feb 28, 2024 2:44 pm

Based on datasheet, it's working like OTP, so when you protect it, you can not change it anymore:
Once programmed to AAh or 55h this address becomes read only. All other codes can be stored, but neither write protect
the address nor activate any function

rezendes
Posts: 2
Joined: Mon Aug 26, 2024 9:12 am

Re: DS2431 erasing issue

Postby rezendes » Tue Aug 27, 2024 12:41 am

Sorry to jump in but I think one or two of you might be able to help me with my problem with the DS2431.

I am using the code here to read/write to the DS2431 1-wire chip

https://github.com/tommag/DS2431_Arduin ... teSkip.ino

I'm able to read and write all the data from the 4 pages, but I can only Read the data in the control register 80h to 87h. It fails writing using the conventional code to write to the data pages. I found a couple pages that might help if you understand the code which I don't. Here viewtopic.php?t=699 . The control register is Not write protected, it's blank from factory, I just need to figure out how to write the last bytes onto the control register and I'll have my project moving to the next step. Thanks for any help and insight. Also here is the datasheet https://www.analog.com/media/en/technic ... ds2431.pdf

ArT
Posts: 1539
Joined: Wed Mar 25, 2015 8:54 am
Location: Warsaw, Poland
Has thanked: 56 times
Been thanked: 166 times

Re: DS2431 erasing issue

Postby ArT » Tue Aug 27, 2024 7:33 am

Datasheet pages 9-10 you have write procedure described in details.
Write script for REVELPROG-IS which is working is shared here:
viewtopic.php?t=699
Please note carefully at comments in step 3:
// STEP3 - Copy Scratchpad
// Please note - you need to first execute STEP1 and STEP2 to read autorhization code (3rd byte in step2) and use this autorization code last byte in below instruction

rezendes
Posts: 2
Joined: Mon Aug 26, 2024 9:12 am

Re: DS2431 erasing issue

Postby rezendes » Wed Aug 28, 2024 8:57 pm

Thank you for the response, my problem turned out to be a much simpler code limitation where there was >= should just have been > and was limiting the address to not be the exact size of the eeprom (128). A simple if statement I missed. I can now read/write to the entire chip, although my project is still stuck because of some type of encryption present in the first data page :(

https://www.reddit.com/r/arduino/commen ... are_button


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 5 guests