imranahmed
Advanced Member level 3
![Advanced Member level 3](/styles/images/ranks/glevel3.gif)
- Joined
- Dec 4, 2011
- Messages
- 817
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 1,298
- Location
- Karachi,Pakistan
- Activity points
- 6,493
Please let me know that how to toggle all bits of any port in PIC16f877a.
Code is attached please tell me any changes and in this code only PB0 blinks.
#include<htc.h>
#define _XTAL_FREQ 8000000
__CONFIG(FOSC_HS);
void main()
{
CMCON=7;
ADCON1=7;
TRISB=0;
while(1)
{
PORTB=1;
__delay_ms(500);
PORTB=0;
__delay_ms(500);
}
}
Code is attached please tell me any changes and in this code only PB0 blinks.
#include<htc.h>
#define _XTAL_FREQ 8000000
__CONFIG(FOSC_HS);
void main()
{
CMCON=7;
ADCON1=7;
TRISB=0;
while(1)
{
PORTB=1;
__delay_ms(500);
PORTB=0;
__delay_ms(500);
}
}