This is an small project based on Atmega328PB at MHz, having as display MAX7219 and DS18S20 for temperature sensor .
The project it is an clock and thermometer . At every minute in the first 20 seconds is showing the temperature from DS18S20
The full code can be found here :
https://github.com/microelectronica-eu/Atmega328PB-Clock-and-DS18S20.git
The code must be compiled in order to have hex file .
The code is build with Atmel Studio 7.0
The code has SPI enabled for sending serial data to Max7219 , has also the timer enabled for clock function .
On PC2 and PC3 are connected the push buttons for incrementing our and minutes variables.
On PD0 is connected DQ pin from DS18S20 .
This code is not suitable to be ported to Atmega168PB because the second SPI enabled in Atmega328PB used to send data to MAX7219. This second SPI module is not present into Atmega168PB.
The fuse bits used in this project :
H_Fuse = 0xD9
L_Fuse = 0xCF
e_Fuse = 0x07
The Main dot C code .