Strange behavior on the Onewireslave library

Status
Not open for further replies.
ATM I try to get an Slave working full interrupt based (Arduino style) but with less results...
 
Last edited:
I used your DS18B20_Slave_Interrupt_T3 example using a Teensy3.0 as a base. I'm using pin 9 as the dsslavepin.
With the 1.0.6/1.22 IDE, the code compiles and communicates just fine.
View attachment 4071
With the 1.6.3/1.22 IDE the code compiles, but seems to get stuck sending a stream of presence pulses.
View attachment 4072

So I find my Teensy 3.0, sad but true it doesn't work, so the Teensy 3.0 and 3.1 share the same Direct I/O defines and the teensyduino is also the same, the guys from Arduino have, had changed something that only affect the Teensy 3.0 what is a little bit strange

Update:
Same for all speeds of the Teensy 3.0
Also it doesn't work well on different speeds on the Teensy 3.1

Btw. Paul are there any differences in the files or the compiler that write in the IDE Versions?
 
Last edited:
So jimmayhugh lets take the facts together:

1.0.6/1.22 IDE
...........................T3.0.................T3.1.................T-LC
working..................yes..................???...................???

1.6.3/1.22 IDE
...........................T3.0.................T3.1.................T-LC
working..................no....................yes...................no

I'm out of town this week, jimmayhugh can you confirm the rest? And did older versions work on it, may I have make something wrong.

So may we can find out whats going on!?
 
Last edited:
So jimmayhugh lets take the facts together:

1.0.6/1.22 IDE
...........................T3.0.................T3.1.................T-LC
working..................yes..................???...................???

1.6.3/1.22 IDE
...........................T3.0.................T3.1.................T-LC
working..................no....................yes...................no

I'm out of town this week, jimmayhugh can you confirm the rest? And did older versions work on it, may I have make something wrong.

So may we can find out whats going on!?

Using your OneWireSlave.zip from here, and your DS18B20_Slave_Interrupt_universal_analogread.ino example, wlth pin 9 as dsslavepin, here are the results:

1.0.6/1.20 IDE
...........................T3.0.................T3.1.................T-LC
working................YES..................YES...................N/A

1.0.6/1.22 IDE
...........................T3.0.................T3.1.................T-LC
working.................NO..................NO.....................NO

1.6.3/1.22 IDE
...........................T3.0.................T3.1.................T-LC
working.................NO..................YES....................NO
 
Thanks for the detailed answer.

In post #24 you say 1.0.6/1.22 IDE works with the Teensy 3.0, now you mention no for it.

May I'm a little bit cheeky but I think Paul changed something somewhere but I can not piont a direction where.
 
Thanks for the detailed answer.

In post #24 you say 1.0.6/1.22 IDE works with the Teensy 3.0, now you mention no for it.

May I'm a little bit cheeky but I think Paul changed something somewhere but I can not piont a direction where.

That was a typo, corrected now...
 
Think at the moment its a problem somewhere between interrupts (trigger state problems) or the delay (timing problems) function my minimum interrupt based OneWireslave sketch works only as single device may it helps to find the problem. with an search sketch to show only the ID.

You can test this.
 

Attachments

  • BareMinimum_Onewire_last_done.ino
    10.5 KB · Views: 862
  • Dallas_only_search_ROM.ino
    876 bytes · Views: 396
Last edited:
Using your BareMinimum and Dallas_only .ino files (with mods to use the pins I use for the 1-Wire lan), using 1.63/1.22, all three devices respond between 1 and 6 times to the MasterResetPulse before failing to respond further.

The MasterResetPulse() debug value shows up at 480us +- 2us when they do respond.
 
Using your BareMinimum and Dallas_only .ino files (with mods to use the pins I use for the 1-Wire lan), using 1.63/1.22, all three devices respond between 1 and 6 times to the MasterResetPulse before failing to respond further.

The MasterResetPulse() debug value shows up at 480us +- 2us when they do respond.

Yeah I know they work or better said it work very less. But when all devices work (even only 1 time) on an other teensy as an only slave interrupts and delay are working only the option "CHANGE" is used in the function attachinterrupt in the lib instead of changing interrupt options to detect the RESET and other pulses of the Onewire-Bus in the BareMinimum.

So may the attachinterrupt CHANGE option isn't working well.
 
Compiler optimization flags have changed. Maybe that's causing timing differences?

When you run these tests, what device is acting as the 1-wire master?
 
I've managed to get the Teeny3.1 and Teensy3.0 working with the library in 1.63/1.22, with some caveats. It looks like it's a timing issue.
Both the Teensy3.0 and Teensy3.1 seem to work (so far) at 96Mhz, The Teensy3.1 works at 48Mhz, while the Teensy3.0 does not. I have been unable to get the Teeny-LC to co-operate at all.

More investigations...
 
I've got the Teensy-LC responding, it's definitely a timing issue.

I'm gonna need a few more Teensy-LCs to test my other boards...:eek:

Does the Teensy-LC support the watchdog timer ala the Teensy3.x?
 
Last edited:
I've got the Teensy-LC responding, it's definitely a timing issue.

I'm gonna need a few more Teensy-LCs to test my other boards...:eek:

Does the Teensy-LC support the watchdog timer ala the Teensy3.x?

Can you show me what you did, I think my Teensy LC has arrived get a message about a packet
 
Good to see, will look at your changes what Value did you use as Pullup-Resistor?

I use a simple level shifter circuit consisting of two N-channel MOSFETs and two 10K resistors to convert the TeensyX 3.3v signals to 5v for the mini-lan.

TeensyNetLevelConverter.png
I have the option to include a 4k7 resistor on all of the boards, but rarely use it.
 
Hi Guys,

I'm also trying to build a 1-Wire Slave device to emulate a temperature sensor, which will actually get the temperature from a PID Temperature Controller via an RS485 link.

However, this is my first T 3.1 project and so I'm wondering how you guys have interfaced the 1-wire data line to the T 3.1 as I've never used one before and so I'm not real sure about the 3.3v and 5V tolerant inputs and how that affects the 1-Wire interface.

My 1-wire master is a LinkUSB 1-Wire USB adaptor connected to a Linux VM running Ubuntu and OWFS.

Regards

Alex Shepherd
 
Status
Not open for further replies.
Back
Top