Created
November 12, 2015 20:02
-
-
Save JHeld07/06eeb4db32c534e2bc16 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
#include <18f4520.h> | |
#use delay (clock=20000000) | |
#fuses HS, NOWDT, NOLVP | |
#include "../Library/18f4520ptr.h" | |
#include "../Library/modifiedlcd.h" | |
int push=1; | |
#INT_EXT | |
void int_ext_isr(){ | |
push++; | |
*CCPR1=25; | |
*CCPR1=*CCPR1*Push; | |
if(push==4){ | |
push=1; | |
*CCPR1=25; | |
} | |
} | |
main(){ | |
*TRISB=0x01; | |
*TRISC=0x00; | |
T2CON->TMR2ON=1; | |
CCP1CON->CCPxMx=12; | |
*CCPR1=25; | |
*PR2=100; | |
INTCON->GIE=1; | |
INTCON->PEIE=1; | |
INTCON->INT0IE=1; | |
INTCON2->INTEDG0=1; | |
while(1){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment