SXB Square Wave
Hello,
I have been trying Terry's sweep code with no luck. I am sure it me doing something wrong. I used a scope and an LCR circuit to see if I could get to resonance. If I use the interrupt without sweep at one frequency, it works.
Device SX28, Oschs2, Turbo, OptionX, StackX
Freq 50_000_000
OutPin Pin RA.0 Output
reload VAR BYTE
Interrupt NOCODE
OutPin =~ OutPin
Returnint reload
Program Start
Start:
FOR reload = 139 TO 111 STEP -1
PAUSE 1000 ' CHANGES SWEEP SPEED
NEXT
GOTO Start
End
I am trying to get resonance but the square wave produced is not accurate enough.
Thanks for any hints.
Cenlasoft
I have been trying Terry's sweep code with no luck. I am sure it me doing something wrong. I used a scope and an LCR circuit to see if I could get to resonance. If I use the interrupt without sweep at one frequency, it works.
Device SX28, Oschs2, Turbo, OptionX, StackX
Freq 50_000_000
OutPin Pin RA.0 Output
reload VAR BYTE
Interrupt NOCODE
OutPin =~ OutPin
Returnint reload
Program Start
Start:
FOR reload = 139 TO 111 STEP -1
PAUSE 1000 ' CHANGES SWEEP SPEED
NEXT
GOTO Start
End
I am trying to get resonance but the square wave produced is not accurate enough.
Thanks for any hints.
Cenlasoft
Comments
It is very possible that you don't have enough resoultion to get resonance. But with a 50MHz clock you can only vary the ON/OFF time by a minimum of 20nSec.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·