embpic
Advanced Member level 3
- Joined
- May 29, 2013
- Messages
- 742
- Helped
- 80
- Reputation
- 160
- Reaction score
- 77
- Trophy points
- 1,308
- Location
- india
- Activity points
- 5,213
Hello master's
i had used till now 8051 family but from few days ago i started to work on PIC family and controller is 16f876a and compiler is xc. i am using jdm programmer and PICpgm software to load hex file.
so my problems are as
1. when i start PICpgm software to load program 1st warming encountered as
2. after writing 1st program as
it create hex file but on controller as checked port pins voltage it says something different as 2.11 volts on each pin instead of 0x55.
3. How to set config in XC conpiler.
4. My circuit diagram is as follows very simple
i had used till now 8051 family but from few days ago i started to work on PIC family and controller is 16f876a and compiler is xc. i am using jdm programmer and PICpgm software to load hex file.
so my problems are as
1. when i start PICpgm software to load program 1st warming encountered as
2. after writing 1st program as
Code:
#include<htc.h>
#include<xc.h>
#include <stdio.h>
#include <stdlib.h>
void delay(unsigned char del);
int main(void)
{
TRISB = 0x00;
while(1)
{
PORTB = 0x55;
// delay(100);
// PORTB = 0;
// delay(100);
}
return 0;
}
void delay(unsigned char del)
{
unsigned char i;
for(;del>0;del--)
for(i=0;i<120;i++);
}
it create hex file but on controller as checked port pins voltage it says something different as 2.11 volts on each pin instead of 0x55.
3. How to set config in XC conpiler.
4. My circuit diagram is as follows very simple