Shop OBEX P1 Docs P2 Docs Learn Events
SX48 Versus SX28 — Parallax Forums

SX48 Versus SX28

DigitalDjDigitalDj Posts: 207
edited 2008-03-12 23:34 in General Discussion
I have some simple code to write for the SX48 but I have never used it yet, is there any differeneces when first using a code template? I know in the beginning the SX28 calls this out:
 
DEVICE          SX28, OSC4MHZ, TURBO, STACKX, OPTIONX
FREQ            4_000_00


Do I just change the SX28 to SX48 and is there any differences I need to look out for?

I am just writing some basic code with or without pwm(not sure yet) and will just read data statements as sequences for animating buttons on my juke. I want these to do some patterns etc. when there is no music, which detecting no music I will work out later.

Thanks,
Kevin


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-03-11 04:53
    Hello Kevin,

    On the SX48 you can usually leave of the TURBO, STACKX, and OPTIONX. As an example I usually run the SX48 at 20Mhz and have the following in my code:

    ' Configure SX48 options and setup to use OSCXT2 (external 20mhz resonator)

    DEVICE SX48, OSCXT2
    FREQ 20_000_000

    I've been going back and forth between the two processors and haven't had any trouble. If you are going to use SX/B then it takes care of a lot of the dirty work behind the scenes.

    Robert
  • DigitalDjDigitalDj Posts: 207
    edited 2008-03-12 00:11
    Can I run the internal 4mhz and if I do still use the same line of code for setup as the sx28 as I listed in my first post?

    Thanks,

    Kevin




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

  • BeanBean Posts: 8,129
    edited 2008-03-12 00:48
    Yep, just leave out the TURBO, OPTIONX, STACKX directives.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • DigitalDjDigitalDj Posts: 207
    edited 2008-03-12 02:34
    Thanks Guys!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2008-03-12 13:16
    As additional information:

    You should leave out TURBO, STACKX, and OPTIONX because the SX48 does not have the options like the "smaller" SX28 to run in "compatibility" mode, i.e. operate similar to microcontroller produced by another manufacturer. The SX48 always has the instruction pipeline active, i.e. runs in TURBO mode, and it has always an extended 8-level call stack, and the exetended OPTION register.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • DigitalDjDigitalDj Posts: 207
    edited 2008-03-12 23:34
    Ok Thanks Guenther!

    Kevin



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Sign In or Register to comment.