Shop OBEX P1 Docs P2 Docs Learn Events
SX48 RD as output pins won't go high — Parallax Forums

SX48 RD as output pins won't go high

JCCraigJCCraig Posts: 9
edited 2006-11-14 04:18 in General Discussion
I'm using the SX48 Proto Board (I like it a lot!) but I'm having trouble getting the RD output pins to go high. With the code that follows the RE pins go high just fine, but all the RD pins stay low.· I've tried two different boards, with same result, so I suspect it's something I'm doing rather than a static zapped board.· Here's my stripped down code...

'
Device Settings
DEVICE········· SX48, OSCHS3
FREQ··········· 50_000_000
ID············· "JCC"
'
IO Pins
Leds··VAR·RDE
'
Constants
'
Word Variables
'
Byte Variables
'
Bit Variables
'
Interrupt Handler
INTERRUPT 100_000
GOTO HandleInterrupt
'
Start of Program
PROGRAM Start
'
Subroutine Declarations·······················
'
Interrupt Handler Code
HandleInterrupt:
RETURNINT································
'
Initialization
Start:
· TRIS_A = %0000··'
· TRIS_B = %00000000··'
· TRIS_C = %00000000··'
· TRIS_D = %00000000··'
· TRIS_E = %00000000··'
'
Main Loop
Main:
· Leds = %11111111_11111111
· Pause 500
GOTO Main
'
Subroutines
'
User Data
Pgm_ID:
· DATA· "Testing", 0

Comments

  • JCCraigJCCraig Posts: 9
    edited 2006-11-11 16:59
    Okay, with some more research I have a partial answer.· The following code change (to just the Main loop part of the previously posted code) does work correctly. ..

    Main:
    · Leds = %11111111_11111111
    · RD = Leds_MSB
    · RE = Leds_LSB
    · Pause 500
    GOTO Main
    Digging further into the assembly source output by SX/B I see the following automatically generated lines.· Look closely at the last line shown, as it seems to point the MSB of RDE to the same place in memory as the LSB of RDE...

    · ; DEFINE SYSTEM VARIABLES
    __RAM········ EQU· $00
    RBC·········· EQU· $06
    RBC_LSB······ EQU· $06
    RBC_MSB······ EQU· $07
    RCD·········· EQU· $07
    RCD_LSB······ EQU· $07
    RCD_MSB······ EQU· $08
    RDE·········· EQU· $08
    RDE_LSB······ EQU· $09
    RDE_MSB······ EQU· $09
    Later in the listing is the output for the code that doesn't seem to load RD correctly...

    · MOV Leds_LSB,#%11111111_11111111 & 255 ;· Leds = %11111111_11111111
    · MOV Leds_MSB,#%11111111_11111111 >> 8
    What this looks like to me is that RDE_MSB and RDE_LSB are pointing to the same place, and that the compiled code is causing RE to be loaded twice accidentally.· So now the question is, is this a bug in the compiler?· Or am I looking at this goofy?

    Thanks in advance for any insight!

    -John
  • JCCraigJCCraig Posts: 9
    edited 2006-11-12 22:30
    So my question now is if this is indeed a SX/B compiler bug???

    ; DEFINE SYSTEM VARIABLES
    __RAM EQU $00
    RBC EQU $06
    RBC_LSB EQU $06
    RBC_MSB EQU $07
    RCD EQU $07
    RCD_LSB EQU $07
    RCD_MSB EQU $08
    RDE EQU $08
    RDE_LSB EQU $09
    RDE_MSB EQU $09

    That last line doesn't look right to me.
    Thanks,
    John
  • JCCraigJCCraig Posts: 9
    edited 2006-11-12 22:32
    Actually, it's the next to last line that doesn't look right. Anyway, my question still stands... Is this a compiler bug?
  • BeanBean Posts: 8,129
    edited 2006-11-12 23:36
    You need to get the latest version of the compiler.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • JCCraigJCCraig Posts: 9
    edited 2006-11-13 02:15
    I'm using Version 3.2, which I downloaded a couple weeks ago. I think this is the latest.
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2006-11-13 04:09
    JCCraig,

    they keep changing like crazy.· the newest is 3.2.3·· It is on the SX downloads page.

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


    It's Only A Stupid Question If You Have Not Googled It First!!
  • BeanBean Posts: 8,129
    edited 2006-11-13 11:47
    You want SX/B version 1.51.03.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • JCCraigJCCraig Posts: 9
    edited 2006-11-13 14:42
    Hi Bean-

    Thanks, I downloaded the latest version and yes, the problem I described has been fixed. The name of the installation file I downloaded shows file version 3.53.346.0, and the About box in the environment shows program version 3.2.3.· You mention yet another number (1.51.03), but I'm not sure where to find that one. Where do I look?

    -John
  • BeanBean Posts: 8,129
    edited 2006-11-13 15:56
    Open the Help->About dialog box.
    Then click on the IDE version # line and it will cycle through the version numbers of the componets.
    The third version # list should be "SXB Ver: 1.51.03"

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • JCCraigJCCraig Posts: 9
    edited 2006-11-14 04:18
    Cool! That worked, and I can now verify that I'm working with the latest. Thanks muchly!

    -John
Sign In or Register to comment.