Tricka90
Member level 1
I've been testing for days and days my PICs, Programmer, connections ecc in order to understand what is the problem.
Now I've decided to ask your help.
I have these two codes:
FIRST
SECOND
The FIRST should make a LED turn On after some time. But the LED just turns On immediately!
The SECOND should make a LED blink continuously. But the LED, after some time, turns On and just stays On forever.
I'm using PIC 16F628A and PIC 16F876, if you have you can use them, else you can use similar PIC from 16F family.
Please I really need you to tell me if you get the same results I get, so I can finally understand what is the problem, after days and days of work and hundred of tests
Now I've decided to ask your help.
I have these two codes:
FIRST
Code:
void main(void) {
unsigned long i;
TRISA = 0;
PORTA = 0;
while(i++ <= 50000);
while(1)
PORTA.RA2 = 1;
}
SECOND
Code:
long i = 0;
void main() {
TRISA = 0;
PORTA = 0;
while(1)
{
i++;
if(i >= 50000)
{
PORTA.RA2 = ~PORTA.RA2;
i = 0;
}
}
}
The FIRST should make a LED turn On after some time. But the LED just turns On immediately!
The SECOND should make a LED blink continuously. But the LED, after some time, turns On and just stays On forever.
I'm using PIC 16F628A and PIC 16F876, if you have you can use them, else you can use similar PIC from 16F family.
Please I really need you to tell me if you get the same results I get, so I can finally understand what is the problem, after days and days of work and hundred of tests