sairfan1
Full Member level 1
- Joined
- Jun 12, 2010
- Messages
- 97
- Helped
- 4
- Reputation
- 8
- Reaction score
- 7
- Trophy points
- 1,288
- Location
- Regina, Canada
- Activity points
- 2,384
Hi, im working with EasyPIc7 at 3.3v 18F45K22 MCU and MikroC compiler.
unable to run this simple program, i checked with volt meter, when i press button RD6 there is logic 1 at RD6 of MCU. plz help
unable to run this simple program, i checked with volt meter, when i press button RD6 there is logic 1 at RD6 of MCU. plz help
Code:
void main() {
ANSELA = 0;
ANSELB = 0;
ANSELC = 0;
TRISB = 0;
TRISD = 0xFF;
PORTB = 0xFF;
//PORTD = 0x00;
Delay_ms(1500);
while(1){
// if (LATD7_bit == 1) // also checked
if (PORTD.RD6 == 1){
PORTB = ~PORTB;
Delay_ms(250);
}
}
}
Last edited: