Professional Documents
Culture Documents
h>
#include "delay.c"
__CONFIG(0x3f72);
void main()
RBPU=0;
TRISB=0xf0;
TRISC=0x0f;
TRISD=0x00;
GIE=1;
RBIE=1;
RBIF=0;
PORTB=0;
PORTD=0;
while(1)
PORTB=0x0f;
DelayMs(250);
DelayMs(250);
DelayMs(250);
DelayMs(250);
PORTB=0x00;
DelayMs(250);
DelayMs(250);
DelayMs(250);
DelayMs(250);
if(RBIF)
RBIF=0;
PORTD=PORTB;
PORTD>>=4;