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

Committer:
andrewboyson
Date:
Sun Jan 28 14:41:12 2018 +0000
Revision:
1:ccc66fdf858d
Child:
5:82197a6997fd
Updated libraries

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 1:ccc66fdf858d 1 #include "defs.h"
andrewboyson 1:ccc66fdf858d 2
andrewboyson 1:ccc66fdf858d 3 void PeriphsInit (void)
andrewboyson 1:ccc66fdf858d 4 {
andrewboyson 1:ccc66fdf858d 5 //Peripheral power - Table 46
andrewboyson 1:ccc66fdf858d 6 LPC_SC->PCONP = 0;
andrewboyson 1:ccc66fdf858d 7 LPC_SC->PCONP |= 1 << 1; //TIMER0
andrewboyson 1:ccc66fdf858d 8 LPC_SC->PCONP |= 1 << 2; //TIMER1
andrewboyson 1:ccc66fdf858d 9 LPC_SC->PCONP |= 1 << 3; //UART0
andrewboyson 1:ccc66fdf858d 10 LPC_SC->PCONP |= 1 << 4; //UART1
andrewboyson 1:ccc66fdf858d 11 LPC_SC->PCONP |= 1 << 9; //RTC
andrewboyson 1:ccc66fdf858d 12 LPC_SC->PCONP |= 1 << 10; //SSP1
andrewboyson 1:ccc66fdf858d 13 LPC_SC->PCONP |= 1 << 15; //GPIO
andrewboyson 1:ccc66fdf858d 14 LPC_SC->PCONP |= 1 << 30; //ENET
andrewboyson 1:ccc66fdf858d 15
andrewboyson 1:ccc66fdf858d 16 //Peripheral clock must be selected before PLL0 enabling and connecting
andrewboyson 1:ccc66fdf858d 17 //Default is 00 == divide by 4; need 01 to have divide by 1
andrewboyson 1:ccc66fdf858d 18 LPC_SC->PCLKSEL0 = 0;
andrewboyson 1:ccc66fdf858d 19 LPC_SC->PCLKSEL1 = 0;
andrewboyson 1:ccc66fdf858d 20 LPC_SC->PCLKSEL0 |= 1 << 2; //TIM0
andrewboyson 1:ccc66fdf858d 21 LPC_SC->PCLKSEL0 |= 1 << 4; //TIM1
andrewboyson 1:ccc66fdf858d 22 LPC_SC->PCLKSEL0 |= 1 << 6; //UART0
andrewboyson 1:ccc66fdf858d 23 LPC_SC->PCLKSEL0 |= 1 << 8; //UART1
andrewboyson 1:ccc66fdf858d 24 LPC_SC->PCLKSEL0 |= 1 << 20; //SSP1
andrewboyson 1:ccc66fdf858d 25 }