Shop OBEX P1 Docs P2 Docs Learn Events
SXB Square Wave — Parallax Forums

SXB Square Wave

CenlasoftCenlasoft Posts: 265
edited 2009-03-26 16:15 in General Discussion
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

Comments

  • Old_LadyOld_Lady Posts: 20
    edited 2009-03-26 15:50
    Can you post a schematic so we can see the circuit? I'm not clear by what you mean when you say "resonance". What do you want the output pin to do? What is your waveform period? (How much time do you want to see between two rising edges of your "outpin" waveform?)
  • BeanBean Posts: 8,129
    edited 2009-03-26 16:15
    Cenlasoft,
    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...

    ·
Sign In or Register to comment.