diff --git a/prosjekt.X/nbproject/configurations.xml b/prosjekt.X/nbproject/configurations.xml
index 6efab0a..ff5c2b4 100644
--- a/prosjekt.X/nbproject/configurations.xml
+++ b/prosjekt.X/nbproject/configurations.xml
@@ -1,3 +1,4 @@
+<<<<<<< Updated upstream
@@ -178,3 +179,192 @@
+=======
+
+
+
+
+ themistor-temp.h
+ uart.h
+ voltage.h
+ fan_speeeed.h
+
+
+ Makefile
+
+
+
+
+ main.c
+ thermistor-temp.c
+ uart.c
+ voltage.c
+ fan_speeeed.c
+
+
+
+ .
+
+ Makefile
+
+
+
+ localhost
+ AVR128DB48
+
+
+ nEdbgTool
+ XC8
+ 2.46
+ 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ false
+
+
+
+
+
+
+ false
+ false
+
+ false
+
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+>>>>>>> Stashed changes
diff --git a/prosjekt.X/nbproject/project.xml b/prosjekt.X/nbproject/project.xml
index 9d6ede3..9ac6a37 100644
--- a/prosjekt.X/nbproject/project.xml
+++ b/prosjekt.X/nbproject/project.xml
@@ -1,23 +1,25 @@
-
-
- com.microchip.mplab.nbide.embedded.makeproject
-
-
- prosjekt
- 928a6534-8606-496e-8a74-8a6544316339
- 0
- ISO-8859-1
-
-
-
-
- default
- 2
-
-
-
- false
-
-
-
-
+
+
+ com.microchip.mplab.nbide.embedded.makeproject
+
+
+ prosjekt
+ 928a6534-8606-496e-8a74-8a6544316339
+ 0
+ ISO-8859-1
+
+
+ .
+
+
+
+ default
+ 2
+
+
+
+ false
+
+
+
+
diff --git a/prosjekt.X/voltage.c b/prosjekt.X/voltage.c
index 2983dfb..3a26823 100644
--- a/prosjekt.X/voltage.c
+++ b/prosjekt.X/voltage.c
@@ -1,11 +1,6 @@
#include "voltage.h"
#include "uart.h"
-void sensor_init(void) {
- /* Disable digital input buffer */
-
-}
-
void ADC0_init(void) {
/* Initializing ADC0 pin*/
PORTD.PIN6CTRL &= ~PORT_ISC_gm;
@@ -32,9 +27,15 @@ uint16_t ADC0_read(void) {
return ADC0.RES;
}
-uint16_t voltage_values(void) {
- /* Gets values */
- uint16_t adcVal = ADC0_read();
- VREF.ADC0REF = VREF_REFSEL_VDD_gc;
+uint16_t diode_voltage_read(void){
+ /* Gets value for the diode */
+ uint8_t adcVal = ADC0_read();
+
return adcVal;
+}
+uint16_t internal_voltage_read(void) {
+ /* Gets value for the internal voltage reffreance*/
+
+ VREF.ADC0REF = VREF_REFSEL_VDD_gc;
+
}
\ No newline at end of file
diff --git a/prosjekt.X/voltage.h b/prosjekt.X/voltage.h
index 221b741..381f8fd 100644
--- a/prosjekt.X/voltage.h
+++ b/prosjekt.X/voltage.h
@@ -44,16 +44,17 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-// Initializing of the sensor pins
-void sensor_init(void);
+
// Initializing of the ADC0 pins
+
void ADC0_init(void);
//
//void ADC0_start(void);
//Start ADC conversion
uint16_t ADC0_read(void);
// Gets the value from sensor and internal voltage
-uint16_t voltage_values(void);
+uint16_t internal_voltage_read(void);
+uint16_t diode_voltage_read(void)
#ifdef __cplusplus
}
#endif /* __cplusplus */