This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: main.c | |
* Author: Bahtiyar Bayram | |
* | |
* Created on 20 July 2022, 14:54 | |
*/ | |
#include "main.h" | |
#define GPIO_OUTPUT 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: main.c | |
* Author: Bahtiyar Bayram | |
* | |
* Created on 20 July 2022, 14:54 | |
*/ | |
#include "main.h" | |
#define GPIO_OUTPUT 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#define MAX_TLM_DATA 32 | |
/* Encode function */ | |
void encode(uint8_t *data, uint16_t *dataCounter, uint32_t val, uint8_t bitSize) { | |
uint8_t dataIndex; | |
for(uint8_t i = bitSize; i > 0; i--) { | |
dataIndex = (*dataCounter) / 8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PIC16F1508 Configuration Bit Settings | |
// 'C' source line config statements | |
// CONFIG1 | |
#pragma config FOSC = INTOSC // Oscillator Selection Bits (INTOSC oscillator: I/O function on CLKIN pin) | |
#pragma config WDTE = OFF // Watchdog Timer Enable (WDT disabled) | |
#pragma config PWRTE = OFF // Power-up Timer Enable (PWRT disabled) | |
#pragma config MCLRE = ON // MCLR Pin Function Select (MCLR/VPP pin function is MCLR) | |
#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: main.c | |
* Author: elektroneo | |
* | |
* Created on July 5, 2019, 10:31 PM | |
*/ | |
// PIC16F1508 Configuration Bit Settings |