From 249fa2dd7bcd8ed0be64a1a1b36da499d6bbaca1 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 29 Apr 2019 09:31:55 -0400 Subject: base code, initial commit of code --- .gitignore | 4 ++++ LICENSE | 52 ---------------------------------------------------- Makefile | 24 ++++++++++++++++++++++++ board.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ board.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ main.c | 30 ++++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+), 52 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 board.c create mode 100644 board.h create mode 100644 main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aebd027 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.*.swp +.*.swo +*.o +*.elf diff --git a/LICENSE b/LICENSE index f288702..0a2daba 100644 --- a/LICENSE +++ b/LICENSE @@ -620,55 +620,3 @@ copy of the Program in return for a fee. END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cdfb395 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CC = msp430-gcc +CFLAGS = -mmcu=msp430g2553 -std=gnu99 \ + -Os + +CSRC = board.c \ + main.c +COBJ = $(patsubst %.c, %.o, $(CSRC)) + +ELF = main.elf + +all: $(ELF) + +clean: + @echo " CLEAN" + @rm -f $(ELF) $(COBJ) + +$(ELF): $(COBJ) + @echo " CC " $@ + @$(CC) $(CFLAGS) $(COBJ) -o $(ELF) + +%.o: %.c + @echo " CC " $< + @$(CC) $(CFLAGS) -c $< -o $@ + diff --git a/board.c b/board.c new file mode 100644 index 0000000..26db473 --- /dev/null +++ b/board.c @@ -0,0 +1,47 @@ +/** + * @file board.c + * Provides board configuration and initialization. + * + * Copyright (C) 2019 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "board.h" + +static void boardInitWatchdog(void); +static void boardInitPins(void); + +void boardInit(void) +{ + boardInitWatchdog(); + boardInitPins(); +} + +void boardInitWatchdog(void) +{ + WDTCTL = WDTHOLD | WDTPW; +} + +void boardInitPins(void) +{ + // All pins are output + P1DIR = PORT1_PINS; + P2DIR = PORT2_PINS; + + // All pins should start at a low state + P1OUT = 0; + P2OUT = 0; +} + diff --git a/board.h b/board.h new file mode 100644 index 0000000..c521e7e --- /dev/null +++ b/board.h @@ -0,0 +1,47 @@ +/** + * @file board.h + * Provides board configuration and initialization. + * + * Copyright (C) 2019 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef BOARD_H_ +#define BOARD_H_ + +#include +#include + +// Port 1 pins +#define LED (1 << 0) +#define TEMP_SCL (1 << 6) +#define TEMP_SDA (1 << 7) + +#define PORT1_PINS (LED | TEMP_SCL | TEMP_SDA) + +// Port 2 pins +#define LCD_DAT (0x0F) +#define LCD_E (1 << 4) +#define LCD_RW (1 << 5) +#define LCD_RS (1 << 6) + +#define PORT2_PINS (LCD_DAT | LCD_E | LCD_RW | LCD_RS) + +/** + * Initializes pins and core functionality. + */ +void boardInit(void); + +#endif // BOARD_H_ diff --git a/main.c b/main.c new file mode 100644 index 0000000..ed788a5 --- /dev/null +++ b/main.c @@ -0,0 +1,30 @@ +/** + * @file main.c + * Main program entry point. + * + * Copyright (C) 2019 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "board.h" + +void main(void) +{ + // Prepare processor and IO + boardInit(); + + while (1); +} + -- cgit v1.2.3 From f8887251a7dd158490c7bcb3ba4cd7757fb7f2f7 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 29 Apr 2019 10:20:40 -0400 Subject: temperature sensor draft --- .gitmodules | 3 +++ Makefile | 2 ++ board.c | 4 +++ board.h | 1 + i2c | 1 + main.c | 5 ++++ temp.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ temp.h | 31 ++++++++++++++++++++++ 8 files changed, 132 insertions(+) create mode 100644 .gitmodules create mode 160000 i2c create mode 100644 temp.c create mode 100644 temp.h diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2fbd7ce --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "i2c"] + path = i2c + url = https://github.com/heliocapella/msp430g2553_i2c diff --git a/Makefile b/Makefile index cdfb395..7653660 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ CFLAGS = -mmcu=msp430g2553 -std=gnu99 \ -Os CSRC = board.c \ + i2c/i2c.c \ + temp.c \ main.c COBJ = $(patsubst %.c, %.o, $(CSRC)) diff --git a/board.c b/board.c index 26db473..27af0da 100644 --- a/board.c +++ b/board.c @@ -43,5 +43,9 @@ void boardInitPins(void) // All pins should start at a low state P1OUT = 0; P2OUT = 0; + + // Set I2C pins to the proper mode + P1SEL |= TEMP_SDA | TEMP_SCL; + P1SEL2 |= TEMP_SDA | TEMP_SCL; } diff --git a/board.h b/board.h index c521e7e..abbc952 100644 --- a/board.h +++ b/board.h @@ -45,3 +45,4 @@ void boardInit(void); #endif // BOARD_H_ + diff --git a/i2c b/i2c new file mode 160000 index 0000000..6c90102 --- /dev/null +++ b/i2c @@ -0,0 +1 @@ +Subproject commit 6c90102daca09c221d62391ddf2fe989cc0a1ce7 diff --git a/main.c b/main.c index ed788a5..257cebf 100644 --- a/main.c +++ b/main.c @@ -19,12 +19,17 @@ */ #include "board.h" +#include "temp.h" void main(void) { // Prepare processor and IO boardInit(); + // Prepare temperature sensor + if (tempInit() != 0) + while (1); // Sensor error, halt + while (1); } diff --git a/temp.c b/temp.c new file mode 100644 index 0000000..38e873d --- /dev/null +++ b/temp.c @@ -0,0 +1,85 @@ +/** + * @file temp.c + * Provides support for the TMP006 temperature sensor. + * + * Copyright (C) 2019 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "board.h" +#include "i2c/i2c.h" + +// TMP006 I2C address +#define TEMP_ADDR (0x40) + +// TMP006 registers +#define TMP006_CONFIG (0x02) +#define TMP006_VOBJ (0x00) +#define TMP006_TAMB (0x01) +#define TMP006_MANID (0xFE) +#define TMP006_DEVID (0xFF) + +// TMP006 CONFIG register parameters +#define TMP006_CFG_RESET (0x8000) +#define TMP006_CFG_MODEON (0x7000) +#define TMP006_CFG_1SAMPLE (0x0000) +#define TMP006_CFG_2SAMPLE (0x0200) +#define TMP006_CFG_4SAMPLE (0x0400) +#define TMP006_CFG_8SAMPLE (0x0600) +#define TMP006_CFG_16SAMPLE (0x0800) +#define TMP006_CFG_DRDYEN (0x0100) +#define TMP006_CFG_DRDY (0x0080) + +static void tempI2CWrite(uint8_t reg, uint16_t value); +static uint16_t tempI2CRead(uint8_t reg); + +int tempInit(void) +{ + // Prepare I2C + I2C_init(TEMP_ADDR); + + // Initialize the TMP006 sensor + tempI2CWrite(TMP006_CONFIG, TMP006_CFG_MODEON | TMP006_CFG_DRDYEN | + TMP006_CFG_16SAMPLE); + + // Check that the device is in fact the TMP006 + if (tempI2CRead(TMP006_MANID) != 0x5449 || + tempI2CRead(TMP006_DEVID) != 0x67) + return -1; + + return 0; +} + +void tempI2CWrite(uint8_t reg, uint16_t value) +{ + uint8_t data[3] = { + reg, + value >> 8, + value & 0xFF + }; + I2C_write(3, data); +} + +uint16_t tempI2CRead(uint8_t reg) +{ + uint8_t data[2] = { + reg, + 0 + }; + I2C_write(1, data); + I2C_read(2, data); + return *((uint16_t *)data); +} + diff --git a/temp.h b/temp.h new file mode 100644 index 0000000..184becd --- /dev/null +++ b/temp.h @@ -0,0 +1,31 @@ +/** + * @file temp.h + * Provides support for the TMP006 temperature sensor. + * + * Copyright (C) 2019 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef TEMP_H_ +#define TEMP_H_ + +/** + * Attempts to initialize the TMP006 temperature sensor. + * @return Zero on success, non-zero on failure + */ +int tempInit(void); + +#endif // TEMP_H_ + -- cgit v1.2.3 From ea4ee734b20dbc5511beb9ec400fb7ffe52ea87e Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 29 Apr 2019 10:26:32 -0400 Subject: removed submodule so files can be edited --- .gitmodules | 3 -- Makefile | 2 +- i2c | 1 - i2c.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ i2c.h | 26 ++++++++++++ temp.c | 2 +- 6 files changed, 164 insertions(+), 6 deletions(-) delete mode 100644 .gitmodules delete mode 160000 i2c create mode 100644 i2c.c create mode 100644 i2c.h diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 2fbd7ce..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "i2c"] - path = i2c - url = https://github.com/heliocapella/msp430g2553_i2c diff --git a/Makefile b/Makefile index 7653660..54bba86 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CFLAGS = -mmcu=msp430g2553 -std=gnu99 \ -Os CSRC = board.c \ - i2c/i2c.c \ + i2c.c \ temp.c \ main.c COBJ = $(patsubst %.c, %.o, $(CSRC)) diff --git a/i2c b/i2c deleted file mode 160000 index 6c90102..0000000 --- a/i2c +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6c90102daca09c221d62391ddf2fe989cc0a1ce7 diff --git a/i2c.c b/i2c.c new file mode 100644 index 0000000..a10141c --- /dev/null +++ b/i2c.c @@ -0,0 +1,136 @@ +/* + * i2c.h + * + * Created on: 28 de abr de 2017 + * Author: helio.capella + * + * Based on msp430g2xx3_uscib0_i2c_12.c by D. Dang + * + * Modified by tcsullivan: + * 04/29: Modified pin macros to work with project + */ + +#include +#include "i2c.h" +#include "board.h" + +#define I2CSEL P1SEL +#define I2CSEL2 P1SEL2 +#define I2CSCL (TEMP_SCL) +#define I2CSDA (TEMP_SDA) + +void I2C_init(uint8_t slaveAddress){ + // Port Configuration + I2CSEL |= I2CSDA + I2CSCL; // Assign I2C pins to USCI_B0 + I2CSEL2|= I2CSDA + I2CSCL; // Assign I2C pins to USCI_B0 + +// isRx = 0; // State variable - possibly useless + + //USCI Configuration + UCB0CTL1 |= UCSWRST; // Enable SW reset + UCB0CTL0 = UCMST + UCMODE_3 + UCSYNC; // I2C Master, synchronous mode + UCB0CTL1 = UCSSEL_2 + UCSWRST; // Use SMCLK, keep SW reset + + //Set USCI Clock Speed + UCB0BR0 = 12; // fSCL = SMCLK/12 = ~100kHz + UCB0BR1 = 0; + + //Set Slave Address and Resume operation + UCB0I2CSA = slaveAddress; // Slave Address passed as parameter + UCB0CTL1 &= ~UCSWRST; // Clear SW reset, resume operation +} + + +void I2C_write(uint8_t ByteCtr, uint8_t *TxData) { + __disable_interrupt(); +// isRx = 0; + //Interrupt management + IE2 &= ~UCB0RXIE; // Disable RX interrupt +// while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent + IE2 |= UCB0TXIE; // Enable TX interrupt + + //Pointer to where data is stored to be sent + PTxData = (uint8_t *) TxData; // TX array start address + TxByteCtr = ByteCtr; // Load TX byte counter + + //Send start condition + // while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent + UCB0CTL1 |= UCTR + UCTXSTT; // I2C TX, start condition + + __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts + while (UCB0CTL1 & UCTXSTP); +} + +void I2C_read(uint8_t ByteCtr, volatile uint8_t *RxData) { + __disable_interrupt(); +// isRx = 1; + + //Interrupt management + IE2 &= ~UCB0TXIE; // Disable TX interrupt + UCB0CTL1 = UCSSEL_2 + UCSWRST; // Use SMCLK, keep SW reset + UCB0CTL1 &= ~UCSWRST; // Clear SW reset, resume operation + IE2 |= UCB0RXIE; // Enable RX interrupt + + //Pointer to where data will be stored + PRxData = (uint8_t *) RxData; // Start of RX buffer + RxByteCtr = ByteCtr; // Load RX byte counter + + //while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent + + //If only 1 byte will be read send stop signal as soon as it starts transmission + if(RxByteCtr == 1){ + UCB0CTL1 |= UCTXSTT; // I2C start condition + while (UCB0CTL1 & UCTXSTT); // Start condition sent? + UCB0CTL1 |= UCTXSTP; // I2C stop condition + __enable_interrupt(); + } else { + UCB0CTL1 |= UCTXSTT; // I2C start condition + } + + __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ interrupts + while (UCB0CTL1 & UCTXSTP); // Ensure stop condition got sent +} + +#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) +#pragma vector = USCIAB0TX_VECTOR +__interrupt void USCIAB0TX_ISR(void) +#elif defined(__GNUC__) +void __attribute__ ((interrupt(USCIAB0TX_VECTOR))) USCIAB0TX_ISR (void) +#else +#error Compiler not supported! +#endif +{ + if(IFG2 & UCB0RXIFG){ // Receive In + if (RxByteCtr == 1) + { + *PRxData = UCB0RXBUF; // Move final RX data to PRxData + __bic_SR_register_on_exit(CPUOFF); // Exit LPM0 + } + else + { + *PRxData++ = UCB0RXBUF; // Move RX data to address PRxData + if (RxByteCtr == 2) // Check whether byte is second to last to be read to send stop condition + UCB0CTL1 |= UCTXSTP; + __no_operation(); + } + RxByteCtr--; // Decrement RX byte counter + } + + else{ // Master Transmit + if (TxByteCtr) // Check TX byte counter + { + UCB0TXBUF = *PTxData; // Load TX buffer + PTxData++; + TxByteCtr--; // Decrement TX byte counter + } + else + { + UCB0CTL1 |= UCTXSTP; // I2C stop condition + IFG2 &= ~UCB0TXIFG; // Clear USCI_B0 TX int flag + __bic_SR_register_on_exit(CPUOFF); // Exit LPM0 + } + } +} + + + diff --git a/i2c.h b/i2c.h new file mode 100644 index 0000000..987d109 --- /dev/null +++ b/i2c.h @@ -0,0 +1,26 @@ +/* + * i2c.h + * + * Created on: 28 de abr de 2017 + * Author: helio.capella + */ + +#ifndef I2C_H_ +#define I2C_H_ + +#include + +uint8_t *PTxData; // Pointer to TX data +uint8_t *PRxData; // Pointer to RX data + +uint8_t TxByteCtr; +uint8_t RxByteCtr; + +//uint8_t isRx; + +void I2C_init(uint8_t slaveAddress); +void I2C_write(uint8_t ByteCtr, uint8_t *TxData); +void I2C_read(uint8_t ByteCtr, volatile uint8_t *RxData); + +#endif /* I2C_H_ */ + diff --git a/temp.c b/temp.c index 38e873d..95b74f7 100644 --- a/temp.c +++ b/temp.c @@ -19,7 +19,7 @@ */ #include "board.h" -#include "i2c/i2c.h" +#include "i2c.h" // TMP006 I2C address #define TEMP_ADDR (0x40) -- cgit v1.2.3 From 728c98d9870d472a7497f23a864ef37ed6f46169 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 29 Apr 2019 11:28:55 -0400 Subject: delay draft --- Makefile | 1 + delay.c | 37 +++++++++++++++++++++++++++++++++++++ delay.h | 27 +++++++++++++++++++++++++++ main.c | 8 ++++++-- 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 delay.c create mode 100644 delay.h diff --git a/Makefile b/Makefile index 54bba86..f56590a 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CFLAGS = -mmcu=msp430g2553 -std=gnu99 \ -Os CSRC = board.c \ + delay.c \ i2c.c \ temp.c \ main.c diff --git a/delay.c b/delay.c new file mode 100644 index 0000000..a259fe3 --- /dev/null +++ b/delay.c @@ -0,0 +1,37 @@ +/** + * @file delay.c + * Delay support using a timer. + * + * Copyright (C) 2019 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "board.h" + +static unsigned int delayTicks = 0; + +void delayInit(void) +{ + TACCTL0 |= CCIE; + TACCR0 = 1000; + TACTL |= TASSEL_1 | MC_1; +} + +__attribute__((__interrupt__(TIMER0_A0_VECTOR))) +static void delayInterruptHandler(void) +{ + P1OUT ^= LED; + delayTicks++; +} diff --git a/delay.h b/delay.h new file mode 100644 index 0000000..1a46286 --- /dev/null +++ b/delay.h @@ -0,0 +1,27 @@ +/** + * @file delay.h + * Delay support using a timer. + * + * Copyright (C) 2019 Clyne Sullivan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef DELAY_H_ +#define DELAY_H_ + +void delayInit(void); + +#endif // DELAY_H_ + diff --git a/main.c b/main.c index 257cebf..8a4b74a 100644 --- a/main.c +++ b/main.c @@ -19,6 +19,7 @@ */ #include "board.h" +#include "delay.h" #include "temp.h" void main(void) @@ -26,9 +27,12 @@ void main(void) // Prepare processor and IO boardInit(); + delayInit(); + __enable_interrupt(); + // Prepare temperature sensor - if (tempInit() != 0) - while (1); // Sensor error, halt + //if (tempInit() != 0) + // while (1); // Sensor error, halt while (1); } -- cgit v1.2.3