Shop OBEX P1 Docs P2 Docs Learn Events
SX28 strange problem — Parallax Forums

SX28 strange problem

ZamuelZamuel Posts: 7
edited 2009-11-03 22:48 in General Discussion
I have just started to experiment with the SX28 and I'm doing a project there I have a signal that is sent from a computer and I want to detect it with the SX28 so I made a poll loop for that pin (one of the RA pins) and it works if the frequency of the oscillator is low. If I run upto about 30MHz it seems to work, but if I connect a higher frequency oscillator it nearly never works. It's like it miss the input signal. Sometimes it works, sometimes not. First I thought it was the input signal that was to fast so I had to go up in frequency but the signal is about 200ns long so it should be plenty of time and the problem seems to be the opposite to what I thought! I need to go down in speed! I have tried most of the settings. SYNC/NO SYNC, INPUT PULL UP, CMOS/TTL inputs and I have the clock defined as HS3
I'm using the Parallax SX28AC

Comments

  • JonnyMacJonnyMac Posts: 9,212
    edited 2009-11-02 23:35
    Seeing a schematic of the connection and the code you're using would help others help you.
  • ZamuelZamuel Posts: 7
    edited 2009-11-03 00:25
    Here is the code. I'm just waiting for a signal to go low on RA pin 3 and it works if the clock is lower then around 30MHz


    ··DEVICE··SX28,OSCHS3,TURBO

    IFDEF·__SASM· ;SASM Directives
    ··DEVICE··STACKX,OPTIONX
    ··IRC_CAL··IRC_SLOW

    ELSE··;Parallax Assembler Directives
    ··DEVICE··STACKX_OPTIONX
    ENDIF

    ··RESET··Initialize

    ;
    DEBUG SETTINGS

    ··FREQ·70_000_000

    ;
    INITIALIZATION ROUTINE

    initialize

    ·mode·$0F ··;Set Mode to allow Direction configuration
    ·mov·!RA,#%1100 ·;Port A bits 0-1 to output, rest inputs
    ·mov·RA,#%1110

    main

    wait·jb·RA.3,wait
    ·jmp·start

    start·clrb·RA.1
    ·jmp·start
  • ZamuelZamuel Posts: 7
    edited 2009-11-03 22:48
    I think I solved the problem now! I had an external 14pin DIL oscillator connected to the SX directly and then I looked on the frequency signal with a scope it looked alittle strange. Like a sinus wave and with an amplitude of around 12Volt, even that I only have 5V connected, so I put a inverter from a 74HC04 IC between the oscillator and the SX to "clean up" the signal and after that it works!
Sign In or Register to comment.