From ccd45ee2cac05c1459136859b8988dd613e4de2f Mon Sep 17 00:00:00 2001 From: John Seibel Date: Thu, 21 Dec 2017 16:22:48 -0500 Subject: [PATCH] All modifications were comments to state that no pull-ups and pull-downs were to be used in hardware or in the INPUT port configuration for the uC. No functionality changes. --- README.md | 5 ++++- examples/ts4231_config_example/ts4231_config_example.ino | 5 +++++ library.properties | 2 +- ts4231.cpp | 4 ++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3fdbd45..5210448 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,10 @@ Installation instructions: **** Next, set up your hardware and run the example application ************ -**** IMPORTANT NOTE BEFORE BEGINNING -- The TS4231 is a 3.3V device and must only be used with a 3.3V Arduino board. Failure to do so will damage the TS4231. +**** IMPORTANT NOTES BEFORE BEGINNING +**** 1) The TS4231 is a 3.3V device and must only be used with a 3.3V Arduino board. Failure to do so will damage the TS4231. +**** 2) DO NOT add pull-up or pull-down resistors to the D and E signals. +**** 3) DO NOT configure the Arduino INPUT ports that connect to the D and E signals with a pull-up or pull-down function. They must be floating. 1) First, install the TS4231 Arduino library by following the instructions here: diff --git a/examples/ts4231_config_example/ts4231_config_example.ino b/examples/ts4231_config_example/ts4231_config_example.ino index b6cff3b..0db3815 100644 --- a/examples/ts4231_config_example/ts4231_config_example.ino +++ b/examples/ts4231_config_example/ts4231_config_example.ino @@ -35,6 +35,11 @@ #include #define light_timeout 500 //500ms is a placeholder as this number will be system dependent + +//IMPORTANT NOTE: If porting the TS4231 library code to a non-Arduino architecture, +//be sure that the INPUT ports assigned to the E and D signals are configured as +//floating inputs with NO pull-up or pull-down function. Using a pull-up or +//pull-down function on the inputs will cause the TS4231 to operate incorrectly. #define device1_E_pin your_E_pin //User must replace your_E_pin with their pin number (compile error will occur if no number defined) #define device1_D_pin your_D_pin //User must replace your_D_pin with their pin number (compile error will occur if no number defined) diff --git a/library.properties b/library.properties index 44a176b..926c4b6 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=TS4231 Library -version=1.0.2 +version=1.0.3 author=Triad Semiconductor maintainer=Triad Semiconductor sentence=Triad Semiconductor library for configuring the TS4231 Light to Digital Converter. diff --git a/ts4231.cpp b/ts4231.cpp index eeb4a72..b874aee 100644 --- a/ts4231.cpp +++ b/ts4231.cpp @@ -39,6 +39,10 @@ #include "ts4231.h" #include +//IMPORTANT NOTE: If porting the TS4231 library code to a non-Arduino architecture, +//be sure that the INPUT ports assigned to the E and D signals are configured as +//floating inputs with NO pull-up or pull-down function. Using a pull-up or +//pull-down function on the inputs will cause the TS4231 to operate incorrectly. TS4231::TS4231(int device_E_pin, int device_D_pin) { configured = false;