FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

akkoyun/DS28C: DS28C Serial ID IC Library · GitHub

/ DS28C Public

Repository files navigation

DS28C Library (v2.0.1)


Introduction

The DS28C library reads the factory-programmed 64-bit ROM ID from DS28C serial ID devices over I2C.

Features

  • Read raw 64-bit serial ID bytes with CRC validation.
  • Low RAM by default (no internal persistent serial string buffer).
  • Generate 16-character hexadecimal serial string on demand.

API

  • bool Begin() Initializes I2C and attempts a serial ID read.

  • bool ReadSerialID(uint8_t *serialId) Reads 8 bytes in device order: [CRC][S5][S4][S3][S2][S1][S0][FAMILY].

  • bool ReadSerialIDHex(char *serialHex) Writes a 16-char uppercase hex string plus null terminator (char[17]).

Use stack/local buffers when you need data:

uint8_t id[8];
char hexId[17];

if (sensor.ReadSerialID(id)) {
    // raw bytes available in id
}

if (sensor.ReadSerialIDHex(hexId)) {
    // formatted text available in hexId
}

Notes

  • The library validates ROM bytes with Dallas/Maxim CRC8 before returning success.
  • The library avoids dynamic String usage to reduce heap fragmentation on small MCUs.

Contributing

We welcome contributions to this library. If you have any ideas or suggestions, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Special thanks to akkoyun for developing this library and contributing to the field of electronics engineering.


About

DS28C Serial ID IC Library

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL