PE6: Simulation of dirsB seems to leave pins in odd state.

Buzby

Senior Member
Try this as a 20X2 in PE6 :

Code:
low b.0
high b.1
low b.2
high b.3
low b.4
dirsB = 0
do
loop
I would expect that after executing dirsB that all the pins would return to input, and show as grey.
However, the pins which are high when dirsB is executed now show as yellow.

The pins have all actually turned to inputs, so is this yellow trying to tell me something I don't really need to know ?
 

Technical

Technical Support
Staff member
That is correct, they are now inputs, which can be input high (yellow) or input low (grey).
Click on them to change state (in simulation you need to click on the pin to change state, in real life they would go to whatever the external circuit creates).
 

Buzby

Senior Member
Yes, I know they are now inputs, but they've not been clicked at all, so they should be grey.
 

Goeytex

Senior Member
After "dirsB = 0", as far as the simulator is concerned, the inputs are in an indeterminate state (floating). So I don't see why they should default to input low, ( gray). The simulator has no way of knowing what is connected to the pins.
 

Buzby

Senior Member
I disagree.

The state of any external signals, simulated or not, has not changed, so the pins should all show the same.
The simulated inputs should *not* be in an indeterminate state, unless they have somehow been 'clicked' while they were not ready.

EDIT : The pins do more than turn yellow, they now read as 'high' !.
 

Technical

Technical Support
Staff member
This is correct behaviour and will not be changed.
DirsX only changes the input/output state of the pin. It does not change the high / low state as you are incorrectly assuming.

Look at the 'pinsX' value. The bit is high and hence the input is high, hence coloured yellow.

If you want the inputs to be in a low state then that is also trivial to do

Code:
#ifdef _simulating
   let pinsB = 0
#endif
let dirsB = 0
 

Buzby

Senior Member
This is correct behaviour and will not be changed.
DirsX only changes the input/output state of the pin. It does not change the high / low state as you are incorrectly assuming.

Look at the 'pinsX' value. The bit is high and hence the input is high, hence coloured yellow. ...
I'm not going to fret too much about it, it's not a very common occurrence.
It's just that seeing yellow when I'm expecting green/black/grey made me see red !.
 
Top