mikrokontrollersystemer-pro.../prosjekt.X/main.c

53 lines
1009 B
C
Raw Normal View History

/*
* File: main.c
* Author: Sebastian H. Gabrielli
*
* Created on March 6, 2024, 12:34 PM
*/
#include "voltage.h"
#include "uart.h"
#define RTC_PERIOD (511)
#define DELAY_TIME 1000
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <string.h>
#include <stdbool.h>
2024-04-09 13:39:11 +00:00
//#define F_CPU 4E6
#include <stdio.h>
#include <stdlib.h>
#include "uart.h"
#include <util/delay.h>
#include <stdint.h>
#include "themistor-temp.h"
2024-03-20 14:27:59 +00:00
#include "fan_speeeed.h"
int main() {
init_uart((uint16_t)9600);
stdout = &USART_stream;
TCA0_init ();
2024-04-16 11:25:51 +00:00
//PORT_init();
//test
TCB0_Init();
EVSYS_Init();
PORT_Init();
TCB3.INTCTRL = 0b00000001; // Bit 0 ? CAPT Capture Interrupt Enable
2024-04-10 12:53:17 +00:00
sei();
while (1) {
2024-04-16 11:25:51 +00:00
//printf("loop");
//uint16_t yo = TCB3.CNT;
//printf("CNT %u", yo);
2024-04-10 13:52:07 +00:00
2024-04-16 11:25:51 +00:00
//uint16_t stewui = TCB3.CCMP;
//printf("CCMP %u", stewui)
;
}
2024-03-06 14:36:24 +00:00
}