CHI035 + SRF005 not working

Hi,
I am playing with some SRF005 modules and don't seem to be getting anywhere.

I have connected the +5, 0v to the +v and 0v on the input side of the CHI035 board (with 18M2) fitted. I have connected the middle pin of the SRF005 to input 0 (C.0) of the CHI035 board. Hopefully the idea is to use a single pin I/O connection.

I have tried to use the flowchart loop given in the manual ie. Ultra 0,A > Debug > Wait 0.5 (repeated)

The circuit mounted LED on the SRF005 flashes every second but the Debug screen only shows zeros. I have been reading the other entries in the forum and have replaced the Ultra with an Inc. The Debug value does change!

I have tried this on two SRF005 modules and both do the same thing (not surprisingly!). I have looked around and can't see an idiots guide to this problem so thought that there would be someone out there who would know how to solve my problem.
 

Bill.b

Senior Member
Hi Robert

try this code. change c.4 to suit the input pin you are uning. the result shold be in w1

For more help, a schematic and code would help to solve you problem.

Code:
Symbol trig 	   = C.4			'SRF005 range sensor ADC input	
Symbol range            = w1
main:
	pulsout trig,2        		              ' produces about 20uS pulse (must be minimum of 10uS)
   	 pulsin trig,1,range  		' measures the range in 10uS steps
    	pause 10               		' SRF005 mandatory 10mS recharge period after ranging completes
    	let range = range * 10 /29 	              ' multiply by 10 then divide by 58 for 4meg or 28 for 8meg 
	debug
               pause 100
	goto main

Bill
 
Thanks for the idea. The code is the same as I tried earlier. Same effect - flashing led but no change to the values within the debug window.
I know that this is not quite what you asked for but hopefully it might give you a clue to what I have done.

I used your code and changed the trig to trig=C.0

chi035.png
 
Oops! I read the sheet wrong and thought that there was no connection on two of the pins. I have bridge the pins and now they are perfectly working as expected.
Thanks.
 
Top