Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file

Dependencies:   net 1-wire lpc1768 crypto clock web fram log

/media/uploads/andrewboyson/heating.sch

/media/uploads/andrewboyson/heating.brd

/media/uploads/andrewboyson/eagle.epf

Revision:
1:ccc66fdf858d
Child:
5:82197a6997fd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main/periphs.c	Sun Jan 28 14:41:12 2018 +0000
@@ -0,0 +1,25 @@
+#include "defs.h"
+
+void PeriphsInit (void)
+{
+    //Peripheral power - Table 46
+    LPC_SC->PCONP  = 0;
+    LPC_SC->PCONP |= 1 <<  1; //TIMER0
+    LPC_SC->PCONP |= 1 <<  2; //TIMER1
+    LPC_SC->PCONP |= 1 <<  3; //UART0
+    LPC_SC->PCONP |= 1 <<  4; //UART1
+    LPC_SC->PCONP |= 1 <<  9; //RTC
+    LPC_SC->PCONP |= 1 << 10; //SSP1
+    LPC_SC->PCONP |= 1 << 15; //GPIO
+    LPC_SC->PCONP |= 1 << 30; //ENET                 
+
+    //Peripheral clock must be selected before PLL0 enabling and connecting
+    //Default is 00 == divide by 4; need 01 to have divide by 1
+    LPC_SC->PCLKSEL0  = 0;
+    LPC_SC->PCLKSEL1  = 0;
+    LPC_SC->PCLKSEL0 |= 1 <<  2;  //TIM0
+    LPC_SC->PCLKSEL0 |= 1 <<  4;  //TIM1
+    LPC_SC->PCLKSEL0 |= 1 <<  6;  //UART0
+    LPC_SC->PCLKSEL0 |= 1 <<  8;  //UART1
+    LPC_SC->PCLKSEL0 |= 1 << 20;  //SSP1
+}