PDA

View Full Version : how to pause 10us



PoTeToJB
- 9th May 2006, 20:30
hello
i want pause 10us
can some one help me
realy need help

BigWumpus
- 9th May 2006, 20:49
Pauseus 10 ???

Melanie
- 9th May 2006, 23:03
Caution... The minimum value for PauseUS is 24uS at 4MHz clock. You have to have a clock around 10MHz or greater before you can achieve 10uS.

You can use a series of @ NOP statements, each of which will delay 1uS at 4MHz.

PoTeToJB
- 10th May 2006, 02:26
thank for help..

melanie..
can i use this for transmit the signal for ultra sonic sensor

start:
high portb.0
low portb.1
pauseus 10
low portb.0
high portb.1
pauseus 10
goto start

end

NOP?
i dont know.
can u tell me

Macgman2000
- 10th May 2006, 03:10
I don't mean to sound snippy, but do you have a PICBASIC PRO manual? You can view it on line if not. You have several options, the syntax is easy for your application.

1). write inline assembly in the middle of PicBasic for the tx routine
2). use a for loop to toggle through your tx routine X-number of times (number of cycles) using the pauseus running at > 10Mhz clock.
3). write it all in assembly and run whatever clock frequency you want.

Best Regards,
Nick