what do you mean by check porta.0 , read post2 and 4 ????? do you mean that the porta.0 is analog and I shouldn't use it for digital signals input????
anyway , I moved the echo signal to differents port.b's and port.a's and nothing changed.
I tested few portB input pins with infrared detectors ( which worked fine) but when the echo input signal, is connected to the same portb that i just tested , and the trigger signal output (connected to portb output pins that i tested with LEDs) of my srf04 are connected , nothing is working
can you tell me clearly what do you have in mind please???
Have you seen this?
http://www.picbasic.co.uk/forum/showthread.php?t=561
Dave
Always wear safety glasses while programming.
thank you so much. you are a star
finally everything is working with internal clock and measurements well displayed on the lcd.
wasn't that easy to understand the data sheet but because of all of you guys, with all your examples and suggestions , i managed to find the right settings.
again thank you guys
God bless you all
those 6 lines allowed me to use an accurate inside clock and to use all pins as digital input or outputs:
DEFINE OSC 4
INTRC_OSC_NOCLKOUT
INTRC_IO
OSCCON=%01101000
ANSEL=%00000000 'this comand disable all adc
CMCON=%00000111 'this bit disable all comparators
the two last commands fixed the problem to get just digital inpout and outpout on all 15 pins available, and disabled all adc and comparators.
Bookmarks