SadE
Newbie level 4
Hi ,
I'm testing Hitech C with this little sample program that normally toggle A0 & A1 ... But PORTA never blinks ... When I look at the asm code , the XOR is well generated !!! Coud you explain me why it doesn't work please ?
#include <pic.h>
#define XTAL_FREQ 20MHZ
__CONFIG(WDTDIS & HS & PWRTDIS & BORDIS);
main(void)
{
unsigned int i;
PORTA=0x03;
TRISA=0x00;
for(;
{
for (i=0;i<1000;i++);
PORTA^=0x03;
}
}
I'm testing Hitech C with this little sample program that normally toggle A0 & A1 ... But PORTA never blinks ... When I look at the asm code , the XOR is well generated !!! Coud you explain me why it doesn't work please ?
#include <pic.h>
#define XTAL_FREQ 20MHZ
__CONFIG(WDTDIS & HS & PWRTDIS & BORDIS);
main(void)
{
unsigned int i;
PORTA=0x03;
TRISA=0x00;
for(;
{
for (i=0;i<1000;i++);
PORTA^=0x03;
}
}