From 9bf5fa1c33a5ca0d9713106589e82e3a0e06d237 Mon Sep 17 00:00:00 2001 From: Anthony Good Date: Wed, 14 Mar 2018 12:17:40 -0400 Subject: [PATCH] 2018.03.14.01 SET_I2C_BUS_SPEED in settings file; set I2C bus speed to help address I2C I/O time impact serial port performance --- k3ng_rotator_controller/k3ng_rotator_controller.ino | 10 +++++++++- k3ng_rotator_controller/rotator_settings.h | 2 ++ .../rotator_settings_ea4tx_ars_usb.h | 3 +++ k3ng_rotator_controller/rotator_settings_m0upu.h | 2 ++ k3ng_rotator_controller/rotator_settings_test.h | 2 ++ k3ng_rotator_controller/rotator_settings_wb6kcn.h | 3 +++ 6 files changed, 21 insertions(+), 1 deletion(-) diff --git a/k3ng_rotator_controller/k3ng_rotator_controller.ino b/k3ng_rotator_controller/k3ng_rotator_controller.ino index e1e08ca..9e610e8 100644 --- a/k3ng_rotator_controller/k3ng_rotator_controller.ino +++ b/k3ng_rotator_controller/k3ng_rotator_controller.ino @@ -368,6 +368,9 @@ 2018.03.11.01 GPS performance tweak - now ignoring gps_data_available and reading all data available on GPS port + 2018.03.14.01 + SET_I2C_BUS_SPEED in settings file; set I2C bus speed to help address I2C I/O time impact serial port performance + All library files should be placed in directories likes \sketchbook\libraries\library1\ , \sketchbook\libraries\library2\ , etc. Anything rotator_*.* should be in the ino directory! @@ -378,7 +381,7 @@ */ -#define CODE_VERSION "2018.03.11.01" +#define CODE_VERSION "2018.03.14.01" #include #include @@ -7436,6 +7439,11 @@ void initialize_peripherals(){ ethernetserver0.begin(); #endif //FEATURE_ETHERNET + #ifdef SET_I2C_BUS_SPEED + TWBR = ((F_CPU / SET_I2C_BUS_SPEED) - 16) / 2; + #endif + + } /* initialize_peripherals */ diff --git a/k3ng_rotator_controller/rotator_settings.h b/k3ng_rotator_controller/rotator_settings.h index 87c4692..110ea08 100755 --- a/k3ng_rotator_controller/rotator_settings.h +++ b/k3ng_rotator_controller/rotator_settings.h @@ -336,4 +336,6 @@ You can tweak these, but read the online documentation! #define AUDIBLE_ALERT_AT_AZ_TARGET 1 #define AUDIBLE_ALERT_AT_EL_TARGET 1 +//#define SET_I2C_BUS_SPEED 800000L // Can set up to 800 kHz, depending on devices. 800000L = 800 khz, 400000L = 400 khz. Default is 100 khz + diff --git a/k3ng_rotator_controller/rotator_settings_ea4tx_ars_usb.h b/k3ng_rotator_controller/rotator_settings_ea4tx_ars_usb.h index b7ef91e..43a7686 100755 --- a/k3ng_rotator_controller/rotator_settings_ea4tx_ars_usb.h +++ b/k3ng_rotator_controller/rotator_settings_ea4tx_ars_usb.h @@ -325,3 +325,6 @@ You can tweak these, but read the online documentation! #define AUDIBLE_ALERT_AT_STARTUP 1 #define AUDIBLE_ALERT_AT_AZ_TARGET 1 #define AUDIBLE_ALERT_AT_EL_TARGET 1 + +//#define SET_I2C_BUS_SPEED 800000L // Can set up to 800 kHz, depending on devices. 800000L = 800 khz, 400000L = 400 khz. Default is 100 khz + diff --git a/k3ng_rotator_controller/rotator_settings_m0upu.h b/k3ng_rotator_controller/rotator_settings_m0upu.h index 9df7502..8f2f16a 100755 --- a/k3ng_rotator_controller/rotator_settings_m0upu.h +++ b/k3ng_rotator_controller/rotator_settings_m0upu.h @@ -326,3 +326,5 @@ You can tweak these, but read the online documentation! #define AUDIBLE_ALERT_AT_AZ_TARGET 1 #define AUDIBLE_ALERT_AT_EL_TARGET 1 +//#define SET_I2C_BUS_SPEED 800000L // Can set up to 800 kHz, depending on devices. 800000L = 800 khz, 400000L = 400 khz. Default is 100 khz + diff --git a/k3ng_rotator_controller/rotator_settings_test.h b/k3ng_rotator_controller/rotator_settings_test.h index 2417696..5a9c9b1 100755 --- a/k3ng_rotator_controller/rotator_settings_test.h +++ b/k3ng_rotator_controller/rotator_settings_test.h @@ -346,6 +346,8 @@ You can tweak these, but read the online documentation! #define AUDIBLE_ALERT_AT_AZ_TARGET 1 #define AUDIBLE_ALERT_AT_EL_TARGET +//#define SET_I2C_BUS_SPEED 800000L // Can set up to 800 kHz, depending on devices. 800000L = 800 khz, 400000L = 400 khz. Default is 100 khz + // ######## ######## ###### ######## // ## ## ## ## ## diff --git a/k3ng_rotator_controller/rotator_settings_wb6kcn.h b/k3ng_rotator_controller/rotator_settings_wb6kcn.h index 6a5b22b..1e7a266 100755 --- a/k3ng_rotator_controller/rotator_settings_wb6kcn.h +++ b/k3ng_rotator_controller/rotator_settings_wb6kcn.h @@ -327,4 +327,7 @@ You can tweak these, but read the online documentation! #define AUDIBLE_ALERT_AT_STARTUP 1 #define AUDIBLE_ALERT_AT_AZ_TARGET 1 #define AUDIBLE_ALERT_AT_EL_TARGET 1 + +//#define SET_I2C_BUS_SPEED 800000L // Can set up to 800 kHz, depending on devices. 800000L = 800 khz, 400000L = 400 khz. Default is 100 khz + \ No newline at end of file