<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 24 Jan 2007 20:49:39 +0000
From   : pete@... (Pete Turnbull)
Subject: user ports and signal sharing

Jules Richardson wrote:

> I'm assuming that I can just use a resistor to 'tie' the common signal line to 
> logic high in the situation when no beebs have CB1 set as an output.

Yes.

> I'm also 
> assuming that I can change CB1's state between input and output at will, 
> without disturbing any of the other signal lines on the User port?

No, you can't.  CB1 and CB2 are intended as handshake lines for PB0..7 
or to control the shift register.  You can't directly set CB1 to a fixed 
state.  However you can change the PCR to set CB2 to one of 8 states, of 
which state 6 is "low output" and state 7 is "high output".  You can do 
the same for CA2.  The other way to use CB1 is as the shift register 
output.  People have been known to do dexterous things with that.

> I suppose one of my main worries is at switch-on, before application control 
> programs the User port's VIA; if more than one system powers up and just 
> happens to default to CB1 as an output, and one machine happens to be 
> outputting a logic high whilst the other's outputting a logic low, then it'll 
> appear as a dead short on the common signal line and probably toast something. 
> Are there any guarantees as to power-up state of the VIA?

Yes, Chuck Peddle got that one right.  RESET makes all I/O lines inputs; 
it also disables the timers, disables the shift register, and disables 
interrupts.

-- 
Pete                                           Peter Turnbull
                                               Network Manager
                                               University of York
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>