From 43afbbee83f065bfc6da2fb67036aee39323b63b Mon Sep 17 00:00:00 2001 From: Nick <53413353+nickpalladino@users.noreply.github.com> Date: Fri, 27 Sep 2024 00:44:58 -0400 Subject: [PATCH] Disable internal resistors --- tcg_counter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tcg_counter.c b/tcg_counter.c index 0c3247a..eb642dc 100644 --- a/tcg_counter.c +++ b/tcg_counter.c @@ -97,6 +97,8 @@ uint16_t __attribute__ ((noinline)) cmd_segment_on(){ uint8_t bits = segment_to_bits(segment); + // disable internal resistors + P1REN &= 0x00; // set output direction P1DIR |= bits | BIT0; // set specified segment 1.5V, set segment z common electrode = 0V @@ -124,6 +126,8 @@ uint16_t __attribute__ ((noinline)) cmd_segment_off(){ uint8_t bits = segment_to_bits(segment); + // disable internal resistors + P1REN &= 0x00; // set output direction P1DIR |= bits | BIT0; // set specified segment 0V, set segment z common electrode = 1.5V @@ -151,6 +155,8 @@ uint16_t __attribute__ ((noinline)) cmd_segment_high_z(){ uint8_t bits = segment_to_bits(segment); + // disable internal resistors + P1REN &= 0x00; // put in input mode for high z state P1DIR &= ~bits & ~BIT0;