Thank you
Connect the +5 volt signal and gnd , but I did not connect the shield
But there is a problem
There is only one gnd circuit
Gnd the microcontroller and circuit common
So I shield connected to common ground?
pier wrote:Hi Mohammad.
I doubt that the problem is due to the length of the cable (2 m only) but to remove any doubt you can try to connect the sensor directly to the micro without the cable.
If that works then you can try lowering the pull up resistor as said Deluca and connect the shield of the cable only on the micro side (do not connect the shield even from the sensor side).
For the clock frequency you must obviously enter the correct value that you want using in the "$crystal =" directive.
If it does not work and you're sure of what you have done, I would think to sensor problems.
Users browsing this forum: No registered users and 5 guests