cachomachine
Senior Member
I have a HC-SR04 connected to pin C.6 (Trigger) and C.5 (Echo) of a 18M2.
As long as i keep B.4 low, the HC-SR04 keeps reading the distance correctly, if i turn b.4 high, the HC-SR04 stops reading and pulsin command times out.(even with the B.4 pin floating in the air)
Turning any other ''B'' pin ON does not cause this problem.
B.4 is used to turn ON a LED (connected to the cathode through a 100 ohm resistor)
Is it there a relation between C,5,C.6 and B.4 ? or do I have a defective 18M2 ?
My program is as simple as possible:
#picaxe 18M2
#no_data
start0:
dirsb=%11011111
dirsc=%10001111
pinsb=%00000111
main: pulsout c.6,4 '10us pulse
pulsin c.5,1,w1 ' Get response
debug
goto main
Any tought
As long as i keep B.4 low, the HC-SR04 keeps reading the distance correctly, if i turn b.4 high, the HC-SR04 stops reading and pulsin command times out.(even with the B.4 pin floating in the air)
Turning any other ''B'' pin ON does not cause this problem.
B.4 is used to turn ON a LED (connected to the cathode through a 100 ohm resistor)
Is it there a relation between C,5,C.6 and B.4 ? or do I have a defective 18M2 ?
My program is as simple as possible:
#picaxe 18M2
#no_data
start0:
dirsb=%11011111
dirsc=%10001111
pinsb=%00000111
main: pulsout c.6,4 '10us pulse
pulsin c.5,1,w1 ' Get response
debug
goto main
Any tought