TB Test AT89C55WD chip port bit

Command Command description Controller response Default
mode
(N/A - not available)
Service
Mode
(N/A - not available)
xTBy Test port bit of AT89C55WD chip. y: 0 = P0.0; 14 = P1.4; 37 = P3.7 Returns to 0, if port input is low, or to 1 if it is high Yes Yes
 
SYNTAX    xTBy, where x - controller (axis) number.
PARAMETER y is port address of AT89C55WD chip. y= 0 if P0.0; y=14 if P1.4; y=37 if P3.7
Range 0...7, 10...17, 20...27, 30...37.
DESCRIPTION This command tests the port input.
Example: 1TB35 command tests right limit switch. It returns to 0, if switch is connected short (ground voltage level), or to 1 if switch is off. 1TB36 command tests left limit switch. It returns to 0, if switch is connected short (ground voltage level), or to 1, if switch is off.
RETURNS  0 or 1
REL. COMMANDS SB, CB
EXAMPLES: 5 tb25     ||    3tB 15   ||   2345Tb0