Show Posts
Pages: 1 [2] 3 4 ... 16
16  Products / Arduino Due / Re: Comunicating ADC+ Arduino DUE with the protocol 1-wire on: March 16, 2014, 12:58:05 pm
Quote
This library is only for the sensor DS18S20

Not really the OneWireLib (http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip) is for the OneWire Protokol, the Lib from Miles Burton is specialy for the DS18S20. You need only the Onewirelib for your use. If you tell us the name of you ADC may we can give you an hint to comunicate with it.

Btw. take a look at this http://code.google.com/p/gfb/source/browse/arduino/DS2450/?r=22
17  Products / Arduino Due / Re: Comunicating ADC+ Arduino DUE with the protocol 1-wire on: March 16, 2014, 07:45:07 am
Did you try this?

http://www.pjrc.com/teensy/td_libs_OneWire.html

Works with the Due
18  Products / Arduino Due / Re: DUE PWM Frequency on: March 14, 2014, 11:18:26 am
to change the PWM frequency of all pins.. that means also the ones not in range 6,7,8,9.. you should change also TC_FREQUENCY in variant.h.

this works perfectly. i get a nice 330 kHz period for all pins now.
How did you do it in detail?
19  Development / Other Software Development / Re: 1-Wire Slave on: February 26, 2014, 03:06:33 am
I am just starting with Arduino. Do I understand right that this is not a code which can be loaded with the Arduino IDE?
Is it possible to convert it into Arduino code?

Best regards,

Christian

Yes it's doable for sure, but there are some thinks that have to be looked good at because it hat to work on all Arduino's.
20  Development / Other Software Development / Re: 1-Wire Slave on: February 22, 2014, 08:30:48 am
just for discussion,

I would like to try something similar,
I want to integrate dht22 temperature and humidity sensor to 1-wire network. Usually humidity devices for 1-wire based on some other sensors, like Honeywell HIH-3605, cause they provide data using analog pin, and it can be connected to ds2438, but having program slave based on attiny85 looks more interesting for me:)
I experimenting with usb9097 bus master, bought on ebay from China, and Arduino Due for, and code in this thread doesn't seem to work out of box, in OneWireViewer slave device appear for a second and then disappear, and it harms other 1-wire devices connected to net: ds18b20 doesn't report temperature until arduino is disconnected. I believe, there's some issue with timings.
I have idea to rewrite lib to make it fully interrupt-based, cause as for me, delayMicroseconds() in several places look ugly. Also, I have idea to refactor it to split to different classes bus-access code and device logic implementation, since I would like to be able to register two virtual 1-wire devices using 1 chip (as long as my dht22 reports both temperature and humidity, why don't simulate 2 simple devices?). The issue is only that I'm just learning microcontrollers development, I have big experience of desktop "corporate" development on different technologies, but during research of this code I learned there are so many caveats...

Yes the timing is a challenge. I would like to see an fully interrupt-based version, I only modify the Resetpulse detection and added an functions to read commands, there is an DS emulation on the web that based on interrupt and timer http://www.tm3d.de/index.php/1-wire-device-mit-avr its in german...
21  Products / Arduino Due / Re: 3.3v logic levels interface with standard TTL/CMOS logic - How to do it... on: February 03, 2014, 07:37:39 am
So to get back to the OP's questing.
The attached PDF gives you some options.

Really good paper should read from everyone, helps to keep equipment alive.
22  Development / Other Software Development / Re: 1-Wire Slave on: December 20, 2013, 09:05:54 am
Hi,

I'm a total newbie when it comes to Arduino, but I'm researching the possibility of emulating a DS1990A or similar on Arduino. The aim is to receive serial data from another device, take the necessary data (which would fit in the 48bit ROM serial number) and rewrite it as an iButton ROM ID. Then the virtual DS1990A would be set present and the attached device would read the ROM and process the serial number further, at which point the virtual iButton could be made not present and rewritten based on new incoming data.

The reason for this is that both of the existing devices have limited I/O capabilities, and this is basically the only feasible way to transmit data from one to the other.

Is this possible with the current library, or reasonable at all, in your opinion?

Should be. Look at the Tech-paper from the DS1990A what it needed I think it only response it ID so far after all
23  Development / Other Software Development / Re: 1-Wire Slave on: December 20, 2013, 08:48:36 am
Since DS2423 is discontinued, I plan to use software emulation for this device.

Do you plan to adapt your code to emulate this one ?
Yes I'm looking foward to it, at first without the overdrive support but yes it's the next step maybe in the next weeks, can you please post what you have changed so I can adopt it.
24  Development / Other Software Development / Re: 1-Wire Slave on: December 17, 2013, 03:42:19 am
I added the following to OneWireSlave.h and removed a reference to "Serial" in OneWireSlave.cpp that was not commented out.

Code:
#elif defined(__AVR__) //ATTiny
  #if dsslavepin == 0
  #define dsslaveassignedint 0
  #elif dsslavepin == 1
  #define dsslaveassignedint 1
  #elif dsslavepin == 2
  #define dsslaveassignedint 2
  #elif dsslavepin == 3
  #define dsslaveassignedint 3
  #elif dsslavepin == 4
  #define dsslaveassignedint 5
  #elif dsslavepin == 5
  #else
  #error "Not an Interrupt Pin"
  #error "Use 0, 1, 2, 3, 4 or 5"
  #define dsslaveassignedint -1
  #endif

The 0x44 is working. The 0xBE is not.
After a short while running it no longer is detected by the master does not detect the 0x44.

My program that uses the library does not use any interrupts. Another chip does all the work and communicates using an interruptable shiftIn style communications to pass data to the OWSlave chip. An LED on the second chip informs me that the 0x44 was received and the userdefined function executed. Only 0xFFFF's are reported as being read from the scratchpad.

Ian

Did someone know the rest of the "defined" for the other Arduino Modells so I can maybe complete it better
25  Development / Other Software Development / Re: 1-Wire Slave on: December 17, 2013, 03:07:12 am
More testing today and the library is working as expected. Yeah!!

I still have a problem that it stops responding after awhile, That is a strange one but I have a starting point with working communications.

thanks
Btw. did you make some other changes anyway, may can you post you Sketch?
26  Using Arduino / Networking, Protocols, and Devices / Re: OneWire library with overdrive support on: December 17, 2013, 02:47:48 am
Really nice, did you test it with an Teensy 3 allready?

May I bring the overdrive inside the OneWire Slave Library some day but I think an 16Mhz AVR would not fit it, so it would only make sense for an Due or Teensy 3 and above
27  Development / Other Software Development / Re: 1-Wire Slave on: December 16, 2013, 01:54:10 pm
Th ATTiny85 can clock internally at either 1mhz or 8mhz or externally with a crystal at 20mhz.
I run it a 8mhz.

May the internal RC is not accurate enough for it
28  Development / Other Software Development / Re: 1-Wire Slave on: December 16, 2013, 04:52:40 am
The ATTiny85 running at 8mhz, although the chip is capable of running at 20mhz with external clocking.

Crystal or internal RC?

At the moment I don't know if the Leonardo I tested it sometimes get out of step or it's a load problem, I have run it on two Teensy 3 for hours with one miss on temp conversions.

I know if I let run an Leonardo direct against an other, the on who pretends an DS18B20 can't response in time with 2 real DS18B20 in chain it works most the time, only a few "temp conversions" are dropped.
29  Development / Other Software Development / Re: 1-Wire Slave on: December 15, 2013, 06:20:40 am
More testing today and the library is working as expected. Yeah!!

I still have a problem that it stops responding after awhile, That is a strange one but I have a starting point with working communications.

thanks

How often did you poll your uC to get the informations? The Problem is if the uC is too often called he would get out of sync and can't responce anymore, at the moment I have no idea for it. How fast is the ATTiny?
30  Development / Other Software Development / Re: 1-Wire Slave on: November 04, 2013, 05:41:44 am
I am receiving the following errors when compiling

. . ./OneWireSlave.h:133:4: error: #error "Not an Interrupt Pin"
. . ./OneWireSlave.h:134:4: error: #error "Use 2 or 3"

Any ideas?

Ian
Oh I know, the  ATTiny85 is not part in the lib can you give me the pins in the IDE where the ATTiny85 has interrupts so I can adopt it for somethink like this.

Code:
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) //Arduino Mega
  #if dsslavepin == 2
  #define dsslaveassignedint 0
  #elif dsslavepin == 3
  #define dsslaveassignedint 1
  #elif dsslavepin == 18
  #define dsslaveassignedint 5
  #elif dsslavepin == 19
  #define dsslaveassignedint 4
  #elif dsslavepin == 20
  #define dsslaveassignedint 3
  #elif dsslavepin == 21
  #define dsslaveassignedint 2
  #else
  #error "Not an Interrupt Pin"
  #error "Use 2, 3, 18, 19, 20 or 21"
  #define dsslaveassignedint -1
  #endif

so your uC can be supported.
Pages: 1 [2] 3 4 ... 16