Shop OBEX P1 Docs P2 Docs Learn Events
Is SX-48 code the same as SX-28 code? — Parallax Forums

Is SX-48 code the same as SX-28 code?

SteelSteel Posts: 313
edited 2007-07-30 16:34 in General Discussion
Other than the chip designator, could I just program the SX48 with the same code as the SX-28?

I am just wondering because I have to do a do a project revision which requires more pins.· Instead of re-writing the SXB code, I would like to just copy it over, and add the new elements that I need.

Thanks
Shaun

Comments

  • RsadeikaRsadeika Posts: 3,824
    edited 2007-07-30 16:24
    In theory that is the way that it is supposed to work. I used·JonnyMac's UARTsirc program that was written for the SX28, which worked as advertised, and I tried to run it straight up on an SX52 proto board, it did not work out. All I can say is that their are some subtle differences that you may be able to fix. I believe that SX/B is geared for the SX28, and that is how the support works out. I think Bean has worked with the SX48 more than I have, and he may have some advise as to what to watch out for.

    Ray
  • BeanBean Posts: 8,129
    edited 2007-07-30 16:34
    You should have very little problem getting SX/B code written for the SX28 to work on the SX48. The compiler handles the conversion. Just change the DEVICE line.

    Oh one "gotcha" is that the SX48 has 2 LESS bytes for normal (BYTE, WORD, BIT) variables. This is because the RD and RE port use the global memory area.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
Sign In or Register to comment.