liupengjian
New Member
Hi, Now I am writing a C for 16F877A to communicate witch COM1 of my PC (PC side I use VB) , every thing is oK, but when I changed the chip to 16F877, with the same C program code, 877 I always got a synchronization error. I dont know why.
do {
sendPollPkt(i);
output_low(PIN_C5);
}while (gNewInfo == FALSE) //when newinfo comes do something else
//i represents the No. of PC need to be polled.
// i will set to 0 after reaching the max value.
but when there is an interrupt come in, the i automatically change to 0 for a while, then start to work normally again. (Actually, i should continuously increase)
So I want to know that whether the 877 and 877A got any timing or synchronization difference that effect my program?
Thanks
do {
sendPollPkt(i);
output_low(PIN_C5);
}while (gNewInfo == FALSE) //when newinfo comes do something else
//i represents the No. of PC need to be polled.
// i will set to 0 after reaching the max value.
but when there is an interrupt come in, the i automatically change to 0 for a while, then start to work normally again. (Actually, i should continuously increase)
So I want to know that whether the 877 and 877A got any timing or synchronization difference that effect my program?
Thanks