Dear all,
I have a problem with my microcontroller.
My mircocontroller should perform certain job when the satuts of an input port (lets say PORTB.RB1) is set to 1.
So if (PORTB.RB1==)
{
// do the job
}
My problem: sometimes I receive paraist effect on the port. In other words sometimes there is electronic noise at this input.
So the job is done even if PORTB.RB1==0 !!
For long time I tried to understand. Then I understood that the problem could be related to my laptop near to my microcontroller. Every time I connect my laptop to power, suddenly there is anoise generated on my microcontroller port.
Even I have another electronic devcie close to my microcontroller. When I connect it to power, I receive this noise.
Can you please tell me how can I avoid this problem? can I put a capacitor at the input port of my microcontroller to filter it ?
Thank you and bests regards,
I have a problem with my microcontroller.
My mircocontroller should perform certain job when the satuts of an input port (lets say PORTB.RB1) is set to 1.
So if (PORTB.RB1==)
{
// do the job
}
My problem: sometimes I receive paraist effect on the port. In other words sometimes there is electronic noise at this input.
So the job is done even if PORTB.RB1==0 !!
For long time I tried to understand. Then I understood that the problem could be related to my laptop near to my microcontroller. Every time I connect my laptop to power, suddenly there is anoise generated on my microcontroller port.
Even I have another electronic devcie close to my microcontroller. When I connect it to power, I receive this noise.
Can you please tell me how can I avoid this problem? can I put a capacitor at the input port of my microcontroller to filter it ?
Thank you and bests regards,