[TI-H] Re: PICs in general


[Prev][Next][Index][Thread]

[TI-H] Re: PICs in general




At 22:24 2002-04-29, you wrote:
>Pierre,
>         The 86 and 89/92 are similar electrically.  The link port
>consists of open collector transistors.  However internally the 89 is a
>bit more complex.  For the 86 all you have to do is read and write to a
>port on the Z80 and I believe the link port on the 89 is memory
>mapped...some one please confirm.

Yes, the link port is memory mapped, but that doesn't make it any harder.
only difference is the name of the instruction :)
(you use a general move instead of a specialized in/out instruction)
The only thing to think of is to first turn off the link hardware, which is 
as simple as setting bit 6 of port 0x60000C
(you often refer as the memorypositions for memorymapped hardware as 
"ports" even though there is no difference from modyfing any other 
memoryposition, except timeing in some)
You probably need to do something like this on the 86 too?
Then you have the pins on port 0x60000E. you read the state on bit 2 and 3 
and modify them on bit 0 and 1. couldn't be much simpler :)
One big advantage with memory mapped is that you can use any instruction to 
modify the port, not only in and out.
so you can set a single bit, shift it, apply some logic like AND or OR, or 
even multiply it directly if you feel the need...

///Olle




Follow-Ups: