Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:19 22 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : ONEWIRE: Anyone used the DS28E07 memory device?

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9760
Posted: 12:50am 10 Feb 2023
Copy link to clipboard 
Print this post

I used to use the UNIO devices from Microchip(11AA160 or 11AA161) on the MM2 with the Cfunction Geoff wrote to work with them, but now that I am using mostly PicoMite modules due to the silicon-chip shortages, I need something similar.  I am pretty sure that the UNIO Cfunction simply won't work on the PM port.

I am looking at the DS28E07  device as it is available, reasonably priced, and the PM supports OneWire natively.  The PDF datasheet for this device is available from the link, if anyone wants it.

Before I buy any though, can I just confirm that the PM and its OneWire protocol, should be able to talk to these memory chips?

I never need to store more then about 25 bytes of unit-specific configuration information, so these little devices seem ideal.

The manual makes no mention of suitable pull-up resistor or value, so at this stage, I am borrowing from I2C and planning to use a 4k7 pull-up to 3v3 on the IO pin - once I get some confirmation that I should be able to talk to these devices.

I need to ask, as I have done nothing at all with OneWire devices, so might need a little hand-holding to get me started.
Smoke makes things work. When the smoke gets out, it stops!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2833
Posted: 03:32am 10 Feb 2023
Copy link to clipboard 
Print this post

"1-Wire Pullup Resistance RPUP (Note 3, 4) 300 min to 2200 max Ω"

From Data sheet Elec. Specs.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9760
Posted: 04:54am 10 Feb 2023
Copy link to clipboard 
Print this post

D'OH!

Thanks.  I will use a 1k8 then.

EDIT: ...or perhaps 1k5.

Still wanting to know from anyone who has used these with MMBASIC.
Edited 2023-02-10 14:56 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2466
Posted: 04:55am 10 Feb 2023
Copy link to clipboard 
Print this post

what advantage does an external DS28E07 or similar offer over just utilizing the onboard file system that peter has added recently to the picomite?


cheers,
rob   :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9760
Posted: 04:58am 10 Feb 2023
Copy link to clipboard 
Print this post

None at all when it comes to just storing config data or an "INI file".

But I want to know if I can talk to these things, cos I also wanted to play about with using one of these, to store encrypted versions of the flash ID as in my other thread, so it would be useful to know how to use these devices over and above the wonderful built-in filesystem the PM now features.
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2466
Posted: 05:33am 10 Feb 2023
Copy link to clipboard 
Print this post

aha - that makes sense     do they have anything in a to-92 package that also has a little computing power onboard? then you could make something that you can do public/private key verification with.


cheers,
rob   :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9760
Posted: 06:09am 10 Feb 2023
Copy link to clipboard 
Print this post

They only do the memory IC itself in TO-92.
I'm not aware of any memory IC with any kind of MCU on-board, other then what is needed to shift the data bits into the EEPROM array.
Smoke makes things work. When the smoke gets out, it stops!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2833
Posted: 07:26am 10 Feb 2023
Copy link to clipboard 
Print this post

they also have their own 48 bit serial number that could be mixed with the Pico flash serial no. in a convoluted way to improve your copy protection system.
.
Edited 2023-02-10 17:27 by phil99
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8304
Posted: 09:36am 10 Feb 2023
Copy link to clipboard 
Print this post

That looks like a useful chip. Reasonable price too (if I ignore having to buy over 40UKP of bits to get free postage!). It looks like conventional one-wire so if Dallas can't get it right then no-one can. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 600
Posted: 12:15pm 10 Feb 2023
Copy link to clipboard 
Print this post

more thoughts here

Part of loading the picofirmware.uf2 gets flash ID and code ID
the firmware talks to the MCU chip to see if its a pup i.e. unused.
the pup now becomes the watchdog sending a key to firmware (dog tag)
key is used to encode the flash ID and code ID that are sent
to the watchdog. Stored in memory only the watchdog can read.

on boot the firmware sends encoded data to the watchdog.
if is right then the watchdog sends the ok back to firmware
and the firmware sends its ok.

if it is not right the firmware clears its self as does the watchdog
leaving both blank or unusable to copy.

Been looking at/for 6 and 8 pin MCU's eyes blurred brain fry.
lots to read to find good chip to make Watchdog.

so far this is the best listing of very small MCU's with pricing and stocks

small MCU's

My 1st thought was PIC10 but not enough code space.

Quazee137
Edited 2023-02-10 22:19 by Quazee137
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2466
Posted: 01:31pm 10 Feb 2023
Copy link to clipboard 
Print this post

hi Quazee137,
   before going too far down the rabbit hole, consider:

1. the picomite prints out a startup banner to the console for all to see, so it is fair to say that anyone (be they a 'good' or a 'bad' person) can determine that the pico is running MMbasic;

2. anyone can unsolder the flash chip and read out the entire contents, including your your tokenized basic program. there is also (as mentioned earlier) software that can do the same;

3. the source code to MMbasic for the pico is publicly available, so finding your basic program within a dump of the flash is relatively easy, while turning the tokenized code back into human-readable form is doable with some moderate effort.


no system we invent can robustly prevent any of the above. at the same time, it still remains that a 'bad' person will only expend so much effort before they simply look at what the said picomite is doing and deciding that perhaps their talents are better turned to writing their own MMbasic program to perform the same task as your's.

and as a final point:

4. MX170's are starting to become available again, which provide a far more robust protection scheme than anything that can be achieved with a pico + ancillary hardware.


cheers,
rob   :-)
Edited 2023-02-10 23:34 by robert.rozee
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9760
Posted: 09:48pm 10 Feb 2023
Copy link to clipboard 
Print this post

Agree with all your points, Rob, and remember that from my other thread - I am most certainly NOT trying to stop those that REALLY want to copy your design and/or code.  They WILL find a way to do it, if they want it badly enough, so trying to stop them is probably a waste of effort.  

I'm only wanting to strengthen the system, by adding an extra layer of - shall we say - difficulty, for anyone who thinks they can just copy-and-paste your code into another module and expect it to work.  In doing this, we certainly don't want to get so involved that it becomes a waste of time, but just enough to throw the proverbial spanner in the works for Joe Bloggs.

It also gives me a chance to play around with a OneWire memory device, which I have never done before, so I learn something new in the process.

I think I will get in three or four devices to play with.  If I only get a couple, it won't break the bank if I/we can't make them work under MMBASIC, but I remain hopeful that the OneWire commands in MMBASIC will be able to talk to these memory devices.

@ Rob: As you are also in NZ, would you be prepared to play with this device if I sent you one or two from my ones?  No pressure.  Say no if you are not interested, but I would send them to you for free, then you just need to sacrifice some of your time.  
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2466
Posted: 05:25am 11 Feb 2023
Copy link to clipboard 
Print this post

  Grogster said  Rob: As you are also in NZ, would you be prepared to play with this device if I sent you one or two from my ones?  No pressure.  Say no if you are not interested, but I would send them to you for free, then you just need to sacrifice some of your time.  


yep, more than happy to have a go, gives me an excuse to tinker with picos some more (i have a stash of MX170 DIPs i use for most things).


cheers,
rob   :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9760
Posted: 06:27am 11 Feb 2023
Copy link to clipboard 
Print this post

OK then, I will order in some devices, and we both can have a tinker and compare notes(here on the public forum).
Smoke makes things work. When the smoke gets out, it stops!
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 600
Posted: 06:38am 11 Feb 2023
Copy link to clipboard 
Print this post

The DS18B20 and DS28E07 uses the same 1 wire protocol.

 Could something like this included BITBANG DS28E07 or BITBANG UNIO ?

So many of the parts once used for board ID's are obsolete.
Got a box with few bus cards that has what I think 1-wire chips.
I was going to try remove the chips and play but can't read part numbers.

Quazee137

I like the idea of BITBANG UNIO
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8304
Posted: 08:00am 11 Feb 2023
Copy link to clipboard 
Print this post

It does sound cool - like shooting down an Arduino. :)  Shouldn't need it though. The ONEWIRE commands look pretty straightforward. You just need some sort of SUBs and FUNCTIONs to handle the setup, block protection etc.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9760
Posted: 02:37am 22 Feb 2023
Copy link to clipboard 
Print this post

OK, my chips have arrived from element14, so I got to work playing with one right away, keen to learn something new, as I have never used the OneWire protocol before now.

First test was a success!
Does that bode well, or was it a fluke!





In this test, all I wanted to try, was reading the device's unique 64-bit ROM code.
To keep things simple, I just read the 8 bytes as separate variables.

The manual(page 7) shows that the first byte is a CRC code, then the next six bytes are the actual 48-bit serial number, followed by a one byte family code.

Keeping things VERY simple for me at this stage, I am still using decimal, but it would be easy to repeat the test and get HEX results.

I have to go to a job now, but I will be back for more tinkering later!
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025