Help with short very short delays
Nick L
Posts: 3
Hi,
Can any one tell me a how to generate a short delay? The 1ms time base of the Pause command is too coarse, I need to generate varing delays with units of microseconds. What's the equivalent to a NOP in a BS2? If you can't tell I'm just starting to use a BS2. I tried a quick search of·the archives and forums, but nothing came up.
Thanks for any and all help,
-Nick L
Can any one tell me a how to generate a short delay? The 1ms time base of the Pause command is too coarse, I need to generate varing delays with units of microseconds. What's the equivalent to a NOP in a BS2? If you can't tell I'm just starting to use a BS2. I tried a quick search of·the archives and forums, but nothing came up.
Thanks for any and all help,
-Nick L
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
As Jon has stated SX/B is the way to go. It has a command "PAUSEUS" for pause microseconds. If the delay value is a constant you can even use fractional values. For example "PAUSEUS 65.5". Of course the resolution depends on the clock frequency of the SX chip.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"Ability may get you to the top, but it takes character to keep you there."
·
Yeah, for that resolution, use the SX-28, 48, or 54 modules; with the SX/Basic toolkit from Parallax.
I'll look at the sx modules. So even a loop that does nothing can't be used for a short delay?
Hi Alan,
The time you mention for the BS2 to prepare the caommand, is that for every 'pulsout' command? If it is than what I want to do isn't going to work. I'm trying to generate IR commands to trigger a camera. The pulses are in hundreds of microseconds followed by delays of hundreds of microseconds. I can't have milliseconds of delay between the pulses.
Wish I seen some information about this in the Parallax·documention some place. Maybe I should just learn to program in PIC assembly? Think the SX modules could generate IR control signals?
Thanks
Nick L
To achieve the precision you are looking for you would need an SX. A pic would also work, but SXs are heavily supported not only by the community but by Parallax employees whose only job is to help customers. There are 3 employees (Jon, Chris and Ryan) who are on the forums all the time (frequently even late at night), there are also an additional handful of Parallax employees who make regular appearances in the forums in an additional support role. Even the CEO (Ken Gracey) is on almost everyday answering questions (mainly to do with business end type questions, but also the occasional tech question). I have not found any other company which provides this level of dedicated support. Also when you compare the raw power of SXs to other commonly availible microcontrollers, the SX runs circles around them in most respects. I carefully researched various microcontroller platforms for 2 1/2 years before deciding on the SX, and I have never regretted the decision.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Post Edited (Paul Baker) : 1/21/2006 2:22:09 PM GMT
My last post unintentionally downplayed Jon Williams' role in the company. He is sort of thier Renaissance man, answering questions, creating new applications for the Stamp and SX, writing the articles for Nuts and Volts, and an additional career as an actor·having appeared in·several Hollywood movies (and Im probably forgetting other things he does).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
Thanks
Nick L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
And the SX/B lets you use a basic variant, which is nice. The SX-Key kit lets you download, debug and single step on the processor while connected to your PC.