Shop OBEX P1 Docs P2 Docs Learn Events
No changes with CLRb or SETb — Parallax Forums

No changes with CLRb or SETb

EmptyBitEmptyBit Posts: 72
edited 2006-03-15 17:37 in General Discussion
I am in the middle of a project using the SX48 prototype board. I wrote·the code that ran well on the SX28 and tried running it on the 48 with only changes to the DEVICE line to reflect the program for the 48.

The program assembles and loads fine. It even steps through. Yet when it comes to a CLRb or SETB, no outputs change state on the debug register or the output terminal.

So, I tried running the simple TEST1.SRC(blinking LED) to see if it was poor code, but the same thing happens. Stepping through does not change the output RB.0 in either statement. It seems to the same with other RB.X as outputs.

At this point, I do not know what I am missing. I have not found much instruction for the prototype boards that state if I need jumpers on the board or a different header setting up the chip.




DC

·

Comments

  • BeanBean Posts: 8,129
    edited 2006-03-15 11:57
    DC,
    · Please post your code so we can help you better.
    · Sounds like a MODE problem.
    · On the SX28 MODE $0F sets the TRIS registers, but on the SX48 you must use $1F and you have to use the W register.

    Change: MODE $0F

    ····· To: MOV W,#$1F
    ···········MOV M,W

    See if that fixes it...

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Wise men know when they're right. The wisest also·know when they're wrong."
    ·
  • EmptyBitEmptyBit Posts: 72
    edited 2006-03-15 17:37


    Thanks Bean,

    I will give this a try. This should help greatly. I did·find this now, in·Günther's book·within the mode·setting tables, and see the logic behind it. The·48/52 having 5 bit mode verses 4 bit for the 18/28.

    However I never·came across·mode setting examples(or made the correlation)·in the text descriptions of differences between the 28 and 48 versions using the indices of all the books I have available currently.

    ·I am new to the SX, but I really liked the format in the Basic stamp books that laid out the differences with examples for each BS version while on a particular topic. All of the tutorials applications and example refer to the·SX28 for the most part.·The information is within the data tables·for the SX 48, assuming one knows how to apply it. If there is something definitive to clarify this subject further, I would like that resource.

    I will read the post I just seen here on 28/48pin ·compatibility issues too. Any other suggestions?

    Sincerely appreciate you pointing me in the right direction.

    DC


    ·
Sign In or Register to comment.