Shop OBEX P1 Docs P2 Docs Learn Events
Need help with SX48 — Parallax Forums

Need help with SX48

Bill ZBill Z Posts: 3
edited 2008-05-21 01:43 in General Discussion
To All


·I am kind of new to the SX· micro controller and I am having trouble getting the SX48 to work.

·I would like to thank all of you for your posts, books magazine articles they have helped me quite a bit.

·I am switching from a SX28 to a SX48. I am having trouble getting input or out puts to work I had no problems with the SX28.

I am using an USB· SX-Key and a SX48 Proto Board.
I can get the program loaded I just can’t get any output or input.
What device settings would I need for the SX48 and is there anything else that is different from the SX28.

Thank you for your help

Bill

Comments

  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2008-05-20 03:58
    There are a few differences but going between the two chips isn't too hard. Before anyone can really help you need to explain a bit more what you are trying to do:

    - Are you writing your program in SX/B (compiled BASIC) or in assembly?

    - What are you using as your clock? Resonator, crystal, or internal?

    - Some of the example assembly programs use low memory for the first couple of variables. This may not be valid for the SX48 as it has two extra 8-bit ports.

    - What input/output do you expect?? Are there LED's connected, switches, etc. How is it wired?

    - If you post your code that will help!
  • pjvpjv Posts: 1,903
    edited 2008-05-20 04:31
    Hi Bill;

    As ROBOT said, without your code posted it is difficult for any of us to help much; however, if it is I/O that is troubling you in moving from the SX28 to the SX48 then I suspect you have overlooked the differences in the M codes for setting up the direction (and other) I/O registers. The SX28 uses M=$0F and the SX48 uses M=$1F.

    Cheers,

    Peter (pjv)
  • Bill ZBill Z Posts: 3
    edited 2008-05-20 13:29
    Thank you for your help. I am programming in SX/B I am using the internal clock (no external chips crystal on the proto board. I am using 10 k pullup resistors on the input switches and 330 ohm limiting resistors on the led.

    Here is the rough test code.

    DEVICE SX48 ‘ not sure what this should be.

    InputA PIN RB.0 INPUT
    OutputA PIN RC.2 OUTPUT

    Main:

    OutputA = InputB


    Goto Main


    Bill Z
  • BeanBean Posts: 8,129
    edited 2008-05-20 16:56
    You need your device line to be "DEVICE SX48, OSC4MHZ" to indicate that you are using the internal oscillator.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?

    www.iElectronicDesigns.com

    ·
  • Bill ZBill Z Posts: 3
    edited 2008-05-21 01:43
    Thank you all for your help

    I am now able to use inputs and outputs.

    Bill Z
Sign In or Register to comment.