[sci.electronics] 8520 twiddling

bryan@cs.utexas.edu (Bryan Bayerdorffer) (08/19/88)

	See, I have this strange little device, which has an even stranger
single-wire half-duplex serial port on it.  The port circuit looks like this:

				Vdd  (+5V)
				|
				|
				R  4.7k
				|
				|
	Input to device <-------+
				|
				V  (diode)
				=
				|
	Output from device >----+-------<-> To/from outside world

	The specs for the port are 1 start bit, 8 data bits, 3 to 4 stop bits,
with a bit time of 104 microseconds (9600 baud).  Ok, so far so good, but here's
the really evil part:  The start bit is always generated by the strange device,
regardless of the communication direction.  That means, if I'm on the other
end of this wire and it's my turn to send, I have to be in input mode to detect
the falling edge of the start bit, switch to output mode within <104 usec, send
my 8 data bits plus 3 stop bits, and switch back to input mode to await the
next start bit.  Sheesh.  
	Now, loony as I am, I want to connect this thingy to the 8520-A via a
couple of pins on the Amiga parallel port.  My questions are:

	1. How best to buffer this on the 8520 end so that nothing gets fried.
	E.g., can I just wire it straight in to one bit of an 8520 peripheral
	data register?  Or maybe duplicate the above diode logic on my end and
	use two bits of the 8520 (I can't see how this would help)?

	2. (for comp.sys.amiga.techies) Does anyone have any example code of
	twiddling the Amiga's 8520s?  The old, first-edition RKM/hardware manual
	published by C-A lists only the physical addresses for the 8520's
	registers.  While I don't see any reason for the memory map to change,
	I'd like my code to run on my A3000 :-)  Is there a more approved way
	to get at these registers than to use a hardcoded address?  

AdvThanksance for any and all responses.
 ______________________________________________________________________________ 
/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/_____/
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|
_No dark sarcasm in the classroom|_____|_____|_____|_____|_____|_____|_____|___
|____Teachers leave the kids alone__|_____|_____|_____|_bryan@cs.utexas.edu___|
___|_____|_____|_____|_____|_____|_____|{ihnp4,seismo,...}!cs.utexas.edu!bryan_
|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|

rusty@hocpa.UUCP (M.W.HADDOCK) (08/19/88)

In article <3191@cs.utexas.edu> bryan@cs.utexas.edu writes:
   >
   >couple of pins on the Amiga parallel port.  My questions ar:
   >
   >
   > 2. (for comp.sys.amiga.techies) Does anyone have any example code of
   > twiddling the Amiga's 8520s?  The old, first-edition RKM/hardware manual
   > published by C-A lists only the physical addresses for the 8520's
   > registers.  While I don't see any reason for the memory map to change,
   > I'd like my code to run on my A3000 :-) Is there a more approved way
  > to get at these registers than to use a hardcoded address?

Yes, Phillip Lindsay of CBM wrote a program call PAROUT that
demostrated how to talk to the bits on the parallel port "nicely".
It used system resources and it's the way CBM would like us
programmers to use.  If you don't have it I can mail it to you --
it's not that large.

Myself, I'd like to know if the parallel port signals (i.e. 8520
output pins) are TTL compatable or am I going to have to do some
level translations before it gets to my circuit's latch?

			-Rusty-
-- 
Rusty Haddock {uunet!likewise,cbosgd,rutgers!mtune}!hocpa!rusty
AT&T Consumer Products Laboratories - Human Factors Laboratory
Holmdel, New Joyzey 07733   (201) 834-1023  rusty@hocpa.att.com