From 4b3cfc1ca852bace1368289577ddd47c16e47d1d Mon Sep 17 00:00:00 2001 From: William Miceli Date: Sun, 27 Jun 2021 16:04:55 -0400 Subject: [PATCH] Added to initialization for I2C on the B2 USCI --- Telem_Debug/Debug_RTC/usci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Telem_Debug/Debug_RTC/usci.c b/Telem_Debug/Debug_RTC/usci.c index 7e599d6..029857b 100644 --- a/Telem_Debug/Debug_RTC/usci.c +++ b/Telem_Debug/Debug_RTC/usci.c @@ -148,7 +148,12 @@ void usci_B1_init(void){ void usci_B2_init(void){ UCB2CTL1 |= UCSWRST; // Software Reset Enable - Set high, disabling the USCI module; Changes to USCI configuration registers can only be made when the UCSWRST bit = 1 - UCB2CTL0 &= ~0b10000000; // Using 7-bit addressing mode + UCB2CTL0 &= ~UCA10; // Use 7-bit addressing mode for itself + UCB2CTL0 &= ~UCSLA10; // Use 7-bit addressing mode for slaves + UCB2CTL0 &= ~UCMM; // Single-master environment only + UCB2CTL0 |= UCMST; // Master mode selected + UCB2CTL0 |= UCMODE_3; // I2C mode selected for the USCI + UCB2CTL1 |= UCSSEL__SMCLK; // Use SMCLK as the USCi's clock source } /*************************************************************************/