Shop OBEX P1 Docs P2 Docs Learn Events
SX/B mode question — Parallax Forums

SX/B mode question

SawmillerSawmiller Posts: 276
edited 2006-01-21 04:18 in General Discussion
another question for the SX/B experts...
im programming a sx48
it uses 5 bits for mode if i'm reading things right , versus 4 for the sx28

so i am getting a warning in my sxkey compiler when i try to clear the timer1 using the sx/b comand
CLEART1
the warning says
MODE register value truncated to 4 bits
i dont get this when i switch modes a lil farther in my code using asm...
whats up with the warning, i belive its just due to programming a sx48 and the complier reconizing such
thanks for any input, you dont want to see my code... its terrible
dan

Comments

  • BeanBean Posts: 8,129
    edited 2006-01-15 16:39
    Dan,
    That appears to be a bug in the compiler. You're right that should be:

    MOV W,#$10
    MOV M,W

    I will alert Parallax to the problem.
    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

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • SawmillerSawmiller Posts: 276
    edited 2006-01-16 01:25
    hey bean ,

    I'm wondering about the alias's too

    if you go timeL = T1CPL· when you go to the list it shows you MODE $00 , where in assembly

    its always mov w, #$00

    ·············· mov m,w

    ·············· mov !rb,w

    etc

    stilll puzzling.. confused.gif
  • BeanBean Posts: 8,129
    edited 2006-01-16 03:16
    I'll have to check, but I THINK that MODE will clear bit 5 of mode. Hmmm Does anyone know for sure ?
    Does MODE reset bit 5 of M or does it leave it alone ?
    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

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • pjvpjv Posts: 1,903
    edited 2006-01-16 04:24
    Hi Bean;

    It leaves it alone.

    See my post of Dec 13, this forum titled "SX asm snippet" at 10:05

    Cheers,

    Peter (pjv)

    Post Edited (pjv) : 1/16/2006 4:42:31 AM GMT
  • BeanBean Posts: 8,129
    edited 2006-01-16 12:32
    Thanks Peter.
    Do you know if that is in the manual ? I didn't see 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

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • pjvpjv Posts: 1,903
    edited 2006-01-16 15:39
    Hi Bean;

    I have very little in the way of "manuals", but I don't recall reading that anywhere, or reading it in the Ubicom docs on the SX 48/52.

    It's just one of those things you find out along the way......the hard way.

    By the way what is an easy way of pointing to a previous post or thread?

    Cheers,

    Peter (pjv)
  • dkemppaidkemppai Posts: 315
    edited 2006-01-18 23:14
    pjv said...
    I have very little in the way of "manuals", but I don't recall reading that anywhere, or reading it in the Ubicom docs on the SX 48/52.

    It's just one of those things you find out along the way......the hard way.

    Peter (pjv)
    Been there done that!· I don't recall it being documented anywhere very well...·· ...but usually
    isn't a problem until you have to access the upper registers (M.5 =1)...

    It·was a rather long and frustrating time with the mode register when I first ran into the trouble...

    Glad you guys are finding the bugs in SX-B...·· ...when I finally get around to ti, it should be
    bug free!

    -Dan
    ·
  • BeanBean Posts: 8,129
    edited 2006-01-19 00:49
    Dan,
    I think SX/B is very reliable on the SX28 the SX48 is a relative new addition. As the C compiler coders have found, the SX is kind of a odd architecture (RAM Banks, code pages, call to 1st half of pages). SX/B was designed from the ground up specifically for the SX processor. I would encourage members to post anything that does not seem to work as-it-should. It could be an unfound bug, if you just "code around" the problem the bug may never get fixed.

    I think most would agree that Parallax has been good (much better than most) about updates and bug fixes.

    And Dan, what are you waiting for... I know SX assembly very well and if you look at the code to my video module you will see that alot of it is in SX/B. Life it too short to code everything in assembly. Check it out (SX/B that is) and I think you'll be glad you did.

    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

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • John R.John R. Posts: 1,376
    edited 2006-01-19 03:14
    Bean (Hitt Consulting) said...

    I think most would agree that Parallax has been good (much better than most) about updates and bug fixes.

    Bean.

    In addition to being very proactive, kudos also should be passed out to the openness and honesty when bugs are found. In stead of saying something to the effect "we'll pass the information on to QA for evaluation" there is a very timely and frank acknowledgement, and open discussion.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.

    8 + 8 = 10
  • dkemppaidkemppai Posts: 315
    edited 2006-01-21 04:18
    Bean (Hitt Consulting) said...
    And Dan, what are you waiting for... I know SX assembly very well and if you look at the code to my video module you will see that alot of it is in SX/B. Life it too short to code everything in assembly. Check it out (SX/B that is) and I think you'll be glad you did.



    I've looked at it a few times. I've even stolen some of the compiled code (optimized, of course). The problem is the majority of my code is very time critical, and very very lean. (I've critically timed events happening every 9 clock cycles).·It would be just too difficult to do that with SX/B.

    Oh, don't worry, I will have a use for it someday.·I will take the proper time to learn it then! [noparse]:)[/noparse]

    -Dan
    ·
Sign In or Register to comment.