SxSim v2.08.06 issue with I/O panel
Peter Verkaik
Posts: 3,956
Gunther,
When I make a single pin of rb an output (eg. output rb.2),
the I/O panel shows rb pins 7-4 also as outputs.
This only happens when using SX48/52
regards peter
When I make a single pin of rb an output (eg. output rb.2),
the I/O panel shows rb pins 7-4 also as outputs.
This only happens when using SX48/52
regards peter
Comments
thank you for your bug report.
Please let me check it - I'll report later...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
tried to repeat this problem here with no result, i.e. here the control panel shows only such pins as output that were defined as outputs before.
Which version of SXSim are you using, and could you please send me a code snippet showing this bug?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
The attached program merely sets rb.0 as output,
but rb.7-rb.4 show up as outputs too.
Compile with sxb 2.00.11
regards peter
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bad spellers of the world untie!
Upon powerup the tris_b register is read and stored in __param1.
Then b0 gets cleared (eg. make pin 0 output) and this new value
is written to the tris_b register.
I don't see how b7-b4 get cleared, unless they're clear
when reading the tris_b register, which cannot be
as pins are inputs upon powerup.
regards peter
then I only see pin0 as output.
But when reading tris_b, W should not be written to tris_b.
Edit:
It looks like sxsim retains the value of w prior to reading tris_b (which is $0F without the extra MOV)
That would explain why we see p7-p4 as output too.
regards peter
Post Edited (Peter Verkaik) : 2/16/2009 4:13:37 PM GMT
The following incorrect answer was done under duress - Monday morning with no coffee....
Looking at this with an earlier version of the compiler, the code compiles the same way - to initialize the pins to input, it uses the same asm as in your rbio.sxb.·Is value of·W at line 134 of the rbio.sxb LIST embedded in the compiler to set the pins as input?
·
For this purpose, wouldn't the standard code be:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bad spellers of the world untie!
Post Edited (mojorizing) : 2/17/2009 4:33:25 AM GMT