Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:17 01 Aug 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 : 1-Wire Comms - First time user...

Author Message
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 04:35pm 21 Feb 2023
Copy link to clipboard 
Print this post

Good morning gents...

I have a small project I want to do getting data from a DS28EA00 Thermometer IC monitoring the temp of a PCB here at work... I tried to upload the 1.09 meg PDF file for the IC, but the up-loader says it's to big... I am using the R pi pico waveshare LCD 0.96 board to do the programming on, with version 5.07.06 firmware installed... There is only one IC connected so I am using the "skip ROM" (&hCC) command to get access to the commands...

The commands I am using are
Convert Temp (&h44), and Read Scratchpad (&hBE)

I have a scope connected to the data line and am seeing the reset and data...

OneWire write GP27,1,2,&hCC,&h44 'send skip ROM & Convert temp command (reset before)
PAUSE 1000 ' 750ms for a 12 bit convert
OneWire write gp27,1,2,&hCC,&hBE 'send skip ROM & Read Scratchpad memory (reset before)
OneWire read gp27,2,2,temp_lsb,temp_msb 'get the temp data (reset after)

The chip seems to be sending the data back but how do I properly capture it using the OneWire read command..?? After sending the read scratchpad memory command, the chip sends the data immediately and I don't think I am getting the correct data back...

Was hoping to find a 1-wire expert out here for some advice...
Thanks in advance for any help with this..!!  
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 04:58pm 21 Feb 2023
Copy link to clipboard 
Print this post

You could post a link to the PDF.

There are some rather old (ca-2020 etc) posts which might help, including some code (e.g. by Chopperp).

Maybe more on fruitoftheshed?

John
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 05:57pm 21 Feb 2023
Copy link to clipboard 
Print this post

Thanks John...

I will take a look around and see if I can find more on this...

Thanks for your help...  
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:19pm 21 Feb 2023
Copy link to clipboard 
Print this post

I was playing around with one-wire on the pico some time ago.
I came to the conclusion that the time between the write and following read is too long.

I did not follow on with the investigation unfortunately.

Can you try running the pico at maximum speed.

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:45pm 21 Feb 2023
Copy link to clipboard 
Print this post

It might sound silly, but have you tried treating as a DS18B20?
Use the TEMPR function and see what happens.

Jim
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 11:13pm 21 Feb 2023
Copy link to clipboard 
Print this post

Watching this thread with MUCH interest, as I am about to start playing with the DS28E07 memory IC on the 1-wire bus, but I will likely start my own thread on that - unless everything works and I have no issues, but I expect there might be some, as I too have never used the 1-wire commands.
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 08:35am 22 Feb 2023
Copy link to clipboard 
Print this post

If it's not fast enough going from Write to Read maybe a WriteAndRead is needed?

John
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 02:36am 23 Feb 2023
Copy link to clipboard 
Print this post

Evening Gents...

As it turns out, Tassy Jim was spot on... I took a look at both PDF data sheets and except for the I/O, they work the same protocol... Worked like a champ...  

I do think we need to figure out how to make the 1-wire functions work right... Maybe they do work right and I just don't know how to get an example working correctly... I think I saw the part answering the Read Scratchpad command before I could get the One wire read function called... I think it was causing the garbled data I was getting..  (not sure)...

Anyway, I think we should be able to connect more 1-wire ICs and figure out how to use the code... It would be awesome to have an easy function to handle the search & serial # handling too.. With 1 MPU I/O line you could make multi device nets...

I might buy some interesting 1-wire ICs and do some tinker...  

Thanks...
 
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