altipatlar006
Newbie level 5
Hi all;
I had a UNI ds-3 development kit with PIC18f4520 on it
I want to toggle some LEDs connected to PORT B of PIC18F4520.I wrote a simple c code,it is given below
void main() {
TRISB = 0;
LATB = 0b01010101;
while(1) {
LATB = ~ LATB;
delay_ms(1000) ;
}
}
There is no problem with toggling in portb but when toggling occurs, LEDs connected to RD5 and RD4 of PIC18f4520 are also toggling.
Where am I making a mistake?
Thank you very much
I had a UNI ds-3 development kit with PIC18f4520 on it
I want to toggle some LEDs connected to PORT B of PIC18F4520.I wrote a simple c code,it is given below
void main() {
TRISB = 0;
LATB = 0b01010101;
while(1) {
LATB = ~ LATB;
delay_ms(1000) ;
}
}
There is no problem with toggling in portb but when toggling occurs, LEDs connected to RD5 and RD4 of PIC18f4520 are also toggling.
Where am I making a mistake?
Thank you very much