Last active
August 16, 2017 04:38
-
-
Save wildan3105/e3edb736829ce79e218e500797f6fd1b to your computer and use it in GitHub Desktop.
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: newmain.c | |
* Author: Wildan S. Nahar | |
* | |
* Created on April 27, 2017, 7:01 PM | |
*/ | |
#define FCY 16000000UL | |
#include <xc.h> | |
#include <libpic30.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <config.h> | |
int main(){ | |
ADPCFG = 0xffff; // Setup A/D PORT CONFIGURATION REGISTER as digital | |
ADPCFGbits.PCFG0 = 1; // configures pin RD0 as digital | |
TRISDbits.TRISD0= 0; // configures pin RD0 as output | |
while(1){ | |
LATDbits.LATD0 = 1; // led ON | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment