From e8b7ebedce6414f75bf0e5c7050eb85935546654 Mon Sep 17 00:00:00 2001 From: Robert Leonard Date: Thu, 27 Jan 2022 09:57:51 -0500 Subject: [PATCH] Update Hotwire.h Setting `HOTWIRE_PWM_MAX` to 0xFFFF (65536) results in a 244Hz PWM frequency (see equation on page 134 of datasheet, 16.9.3). Hotwire's been running at the wrong frequency this whole time. No idea how I didn't catch that earlier. 0xFF (256) is the correct value for 62.5kHz PWM. --- hotwire/Hotwire.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotwire/Hotwire.h b/hotwire/Hotwire.h index 3c04921..4979f12 100644 --- a/hotwire/Hotwire.h +++ b/hotwire/Hotwire.h @@ -7,7 +7,7 @@ #include -#define HOTWIRE_PWM_MAX 0xFFFF +#define HOTWIRE_PWM_MAX 0xFF // EFFECTS: initializes the device for PWM on the hotwire output void Hotwire_init();