Shop OBEX P1 Docs P2 Docs Learn Events
_xinfreq = 5_000_000 and 6_250_000 clock speed — Parallax Forums

_xinfreq = 5_000_000 and 6_250_000 clock speed

JkaneJkane Posts: 113
edited 2014-05-16 13:25 in Propeller 1
Hello

I have a question on the xinfreq parm,

_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000 'Set to standard clock mode and frequency (80 MHz)

I purchased the 6.250 crystal, so the statement looks like this

_clkmode = xtal1 + pll16x
_xinfreq = 6_250_000 'Set to standard clock mode and frequency (100 MHz)

and replaced the crystal on the demo board,

then I wrote some assembler to test it, my scope results showed 12.5 ns as the min (toggling a pin)

1/80,000,000 = 0.0000000125

but when I replaced the crystal with 6.25 Mhz I expected 10 ns but I received the 12.5 again

1/100,000,000 = 0.000000010

but in reading it seems that 80Mhz is the limit, regardless, and above 6.25 mhz things get slightly unstable.

my assembler was simply

time = cnt
time + delta
:loop
xor pin ' toggle pin
waitcnt(time,delta) ' the lowest delta I could get was 4, below that there was no toggle
jmp #:loop

anyway, I was just curious, I would like 100Mhz, it I can get it.

regards

Jeff

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2014-05-09 18:32
    your code has many errors... am typing on a tablet, so i cant correct it

    the minimum loop would be

    mov dira,#1 ' enable P0 for output

    loop xor outa,#1
    jmp #loop

    which would take 8 clock cycles

    scope should show 5Mhz square wave with 5mhz xtal, and 6.25mhz with 6.25mhz crystal
  • JkaneJkane Posts: 113
    edited 2014-05-09 18:38
    Hello,

    5Mhz would give you 200ns, by using the x16 multipler you get much faster, but what I was getting at is that yes, there are 8 cycles, but the cycles are faster, therefore the switch is faster and the toggle should happen faster. but since I am not getting what it think I got it wrong.

    regards

    Jeff
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-09 19:00
    If you post your actual code instead of pseudo code, we might be able to help you better.

    Make sure and use code tags when posting code.
    [noparse]
    ' your code here
    
    
    [/noparse]

    will show up as:
    ' your code here
    
    
  • Jeffrey KaneJeffrey Kane Posts: 48
    edited 2014-05-15 07:04
    Hello,

    I moved over to the super carrier board, works correctly

    thanks

    Jeff
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-15 16:52
    Hello,

    I moved over to the super carrier board, works correctly

    thanks

    Jeff

    I'm confused. How did switching to a board for the Basic Stamp fix your Propeller issue?
  • JkaneJkane Posts: 113
    edited 2014-05-16 13:07
    I was using the propeller activity board, my connections were probably bad, so the clocking seemed to get messed up, when i converted to the propeller project board and did better connections, things seemed to be exactly what i expected.

    regards

    jeff
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-16 13:25
    Jkane wrote: »
    I was using the propeller activity board, . . . when i converted to the propeller project board

    That explains things. Just a mix up on the name.

    Thanks.
Sign In or Register to comment.