Skip to content

Instantly share code, notes, and snippets.

@wildan3105
Created June 23, 2018 13:07
Show Gist options
  • Save wildan3105/1cdd53c3754713e81f2a502725f41d2e to your computer and use it in GitHub Desktop.
Save wildan3105/1cdd53c3754713e81f2a502725f41d2e to your computer and use it in GitHub Desktop.
#define FCY 8000000UL // FCY = FOSC / 2
#include "libpic30.h"
#include "stdio.h"
#include "stdlib.h"
#include "p30f2020.h"
#include "xc.h"
#include "config.h"
int main(void){
U1BRG = 12; // 38400 baudrate
U1MODEbits.UARTEN = 1; // enable UART
printf("test \n");
while(1);
return -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment