MahmoudHassan
Full Member level 6
While working with PC16 and other microcontroller series . i found there are a lot of practical tips that could be forgot during programming like noise considerations .When implement pic in a circuit board it's performance is different from environment with high noise than other such as controlling high power motors that generate spikes in control signals from push buttons and sensors and produce erratic performance in relays that control motors ,so we have to program PIC such that it check the conditions twice with delay between them
if(RB0_bit == 1)// check button pressing
{
delay_ms(3000)
if(RB0_bit ==1) // make sure that this press is not noise spikes
{
....Instruction list...
while(RB0_bit ==1)
{
/*done to ensure that when pressing button the condition is executed only one time*/
}
}
}
I am not expert in this field and i need help for other tips .....
PLZ if you have other tips write them
Thanks in advance
if(RB0_bit == 1)// check button pressing
{
delay_ms(3000)
if(RB0_bit ==1) // make sure that this press is not noise spikes
{
....Instruction list...
while(RB0_bit ==1)
{
/*done to ensure that when pressing button the condition is executed only one time*/
}
}
}
I am not expert in this field and i need help for other tips .....
PLZ if you have other tips write them
Thanks in advance