programming inputs of a picaxe 28x1, to AND 2 or more inputs b4 enabling an output

peter howarth

New Member
How do I go about programming a picaxe28x2 for ANDing 2 or more inputs before enabling allowing an output/s using preferably the flowchart platform..

Also what would be stopping my printer from properly printing out the flowchart diagrams.. at the moment the resulted printout leaves gaps etc in the printed diagram.. My printer works 100% on any other reason, on the same computer, to print anything else out..
 

westaust55

Moderator
I do not use the flowchart platform for programming PICAXE however the construct for the coding should be similar to the BASIC text based programming.

You need a construct like:
Code:
IF pinC.2 = 1 AND pinC.5 = 1 THEN
  HIGH B.5
ELSE
  LOW B.5
ENDIF
Another structure might be:
Code:
LOW B.5
IF pinC.2 = 1 THEN
  IF pinC.5 = 1 THEN
    HIGH B.5
  ENDIF 
ENDIF
This second would result in momentary low on the output pin each time the test is performed event if both inputs are high (= 1)
 

hippy

Technical Support
Staff member
The "Decision" flowchart command allows inputs to be matched against specified states.

So, for a positive AND of two inputs, the inputs used would be set to "1", unused inputs set to "-". And, when the two inputs are both 1 (high), the "Yes" branch will be followed, otherwise the "No" branch will be followed.
 
Top