SX48 RD as output pins won't go high
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
'
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
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
; 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
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
·
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!!
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
·
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
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
·
-John