1-wire routines in C

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1
Request group membership
By: Jon Cook, created: 2015-02-28 | updated: 2015-02-28

A 1-wire bus interface written entirely in C.

Examples are given with single or multiple 1-wire buses using DS18B20 temperature sensors.

Original File Upload
AttachmentSize
Package icon One-Wire.zip110.71 KB

Comments

Just the code I was looking for but it fails to find the sensor in the multiple cog version. I am using 0x22 devices and have made that adjustment.

Note in code asks why 'volatile' was discarded.  It isn't if all the prototypes etc are changed to volatile. Does it matter??

In multiple cogs I have now reduced ONE_WIRE_BUSES to 1 and portnum to 0  so it is the same in single cog.  Still does not find the sensor.

 

It seems as if FindDevices fails in the multiple code program but not in single cog - same code.

Continuing to investigate.