Shop OBEX P1 Docs P2 Docs Learn Events
useing a speeed ultrasonic sonar — Parallax Forums

useing a speeed ultrasonic sonar

nvale55@gmail.comnvale55@gmail.com Posts: 15
edited 2012-10-09 17:32 in Propeller 1
Hi

Im currently messing around with some Speeed Ultrasonic Sonar sensors, and would like to know if its possible to modify the Ping object so that the trigger pulse increases from 2 us to 10us? if so how?

Comments

  • ratronicratronic Posts: 1,451
    edited 2012-10-09 17:32
    nvale55 I do not know the sensor you describe but about the shortest delay you can specify in Spin is ~9.2us "waitcnt(381 + cnt)" with spin overhead. And it takes about 8us to go from one outa to the next in Spin. Here is the scope output of the code I listed. Maybe one of the experts here will pop in and let you know if this can be done in Spin instead of PASM.
    Con                                                         
                                                             
      _CLKMODE = XTAL1 + PLL16X                              
      _XINFREQ = 5_000_000  
      
    Var
      long a, b
    Obj
       
    Pub Main
      dira[a]~~   
      
      repeat
        outa[a]~
        
        outa[a]~~
    
    hantek28_1.gif
    800 x 480 - 21K
Sign In or Register to comment.