From c3a77c85fa3b06405ef4c4f46dd2a4513dc25374 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Jan 2017 17:35:42 +0100 Subject: [PATCH] ATtiny85 external 16MHz dedicated timing (https://github.com/gioblu/PJON/issues/25 --- strategies/SoftwareBitBang/Timing.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/strategies/SoftwareBitBang/Timing.h b/strategies/SoftwareBitBang/Timing.h index e0db0d9400..9b58d57c11 100644 --- a/strategies/SoftwareBitBang/Timing.h +++ b/strategies/SoftwareBitBang/Timing.h @@ -93,6 +93,22 @@ #define SWBB_ACCEPTANCE 34 #define SWBB_READ_DELAY 10 #endif + #if F_CPU == 16000000L + /* External 16MHz oscillator */ + #define SWBB_BIT_WIDTH 40 + #define SWBB_BIT_SPACER 112 + #define SWBB_ACCEPTANCE 40 + #define SWBB_READ_DELAY 4 + #endif + #endif + #if SWBB_MODE == _SWBB_FAST + #if F_CPU == 16000000L + /* External 16MHz oscillator */ + #define SWBB_BIT_WIDTH 28 + #define SWBB_BIT_SPACER 66 + #define SWBB_ACCEPTANCE 28 + #define SWBB_READ_DELAY 4 + #endif #endif #endif