Hi Chris,
Looking at the data sheet of HP88 (Assuming you have
V2).
Switches are only connected to:
A0 to A4 (J14 must be connected to Digital side)
&
B0 to B7.
On your flowchart your using an input on the
Entire Port A
then means IF:
BYTE=1 is only checking switch connected to A0
BYTE=2 is only checking switch connected to A1
BYTE=4 is only checking switch connected to A2
BYTE=8 is only checking switch connected to A3
BYTE=16 is only checking switch connected to A4
BYTE=32 is only checking switch connected to A5 (Switch Does not exist)
BYTE=64 is only checking switch connected to A6 (Switch Does not exist)
BYTE= 128 is only checking switch connected to A7 (Switch Does not exist)
So with BYTE= 128, your testing for a sinlge switch input that's not even physically place on the test board.
No other switches will be tested, so it will show on hardware as no switches are working.
You have a few options
For say switch connected to A2
Use i/p icon and select
single Bit, then select 2
Thant means only A2 input is read.
So now if switch connected to A2 is closed then BYTE = 1
otherwise BYTE = 0
Or
Useful for reading multiple switches at a time or just having more than one switch connected :
On the input icon, select
Entire Port and
Use Masking instead of single Bit.
Then only select switches you want to use e.g switches connected to A1 and A4 then select 1 & 4
Then the:
BYTE=2 is only checking switch connected to A1
&
BYTE=16 is only checking switch connected to A4
Applies
If both switches are held down simultaneously
then the value of BYTE = 2 + 16 = 18
See attached Flowchart:
switches with LCD V2b.fcf
You can then use the switch icon:
See attached Flowchart:
switches with LCD V2a.fcf
Note if only using 2 or less switches:
For 2 switches right click on a switch on your control panel and select Ext Properties.
From that you can just select number of switches your using.
Or just use single switches instead of switch bank.
There is also a third option to detect switches pressed and that is using the switch component macro and ReadState.
I can post an example if you wish, but currently ran out of time.
What you could find very helpful is watching the variable values:
To do that just with Flowchart paused (or with flowchart stopped press F8 on your keyboard)
A Variables window will pop up.
Right click in the window and select Add Variable, then just add the variables your interested in watching.
Then you can either single step by keep pressing F8 , or use 'View', 'Project Options' then choose a slower simulation speed, since if the default 'As fast as possible' is selected the the variables in the watch window will disappear.
Martin