BYTEBUS  (ARMweb only) -- OBSOLETE, use P1(pin)
 
Syntax

BYTEBUS ( control ) 
Description


BYTEBUS reads or writes the 8 bit + 2 control lines on Port1 of the LPC2138.  The control field sets the state of the 2 control lines, with the intention of line 0 being used as a R/W line and line 1 being used as a CS line-

     0 -- set control line 0 low,  and pulse line 1 low 
     1 -- set control line 0 high, and pulse line 1 low
     2 -- set control line 0 low,  and pulse line 1 high 
     3 -- set control line 0 high, and pulse line 1 high

     4 -- use the 10 lines as a block of inputs or outputs  (added in version 7 firmware)

For 0-3:

    The pulsewidth on line 1 is 250 nsec for write, and 550 nsec for read.

    Back to back operations occur 2.4 usec apart for writes, 2 usec for read.

None of these lines are driven on reset, and should be biased with resistors if devices connected to this bus require it.

Example


'write to byte bus - negative true CS and W
BYTEBUS(0)  = $A5

'read from byte bus - negative true CS, R-notW line
x = BYTEBUS(1)

block control added in version 7 firmware-
'write to 10 pins as a block
BYTEBUS(4)  = $2A5

'read from 10 pins as a block
x = BYTEBUS(4)

Differences from other BASICs

See also