Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
403 B
3
Indexable
Never
//display the values of multipes of 5 from 100 to 200 on 8led
//delay 2000 ms
// after finsh the turn the buzzer for 1000ms rc2
unsigned int x;
int i;
void main(){
trisb=0x00; //output
trisd.f7=0; // 0 led on
trisc.f2=0;  //0  buzzer on
while(1){
 for(i=100;i<=200;i+5){
 x=i;
 portb=x;
 portd.f7=1;
 portc.f2=0;
 delay_ms(2000);
 }
 portd.f7=0;
 portc.f2=1;
 delay_ms(1000);
}

 }