| ??? 02/10/01 19:52 Read: times |
#9189 - RE: P2 as general output |
ANSWER: Yes, but it can be complicated.
FIRST: How much external addressing are you using? You question suggests that that A15 and A14 aren't being used and therefore you have 16K externally mapped for some purpose. IF SO: Are you using the external memory space as code space? If so, P1 and P2 will be used to present a address when accessing that memory block. This will use A15 and A14 making their other use a little complicated. As long as you can be sure that A15 and A14 won't be used by the microcontroller WHILE you are accessing something through their use, you can juggle A15 and A14 to recover needed IO pins. HOWEVER, be careful selecting the type of IO pins you assign for their use. Output signals that are meaningless unless enabled by a pin on P3 would be good candidates. For example, if you have a serial output you could use A15 and A14 possibly as clock and data AS LONG as you BOTH have a safe P3 (not RD or WR) signal to enable the serial device so the memory addressing won't affect it AND that you ensure that NO external code runs while you are accessing that serial port. That includes interrupts etc which are better located internally anyway. Its up to you to make sure the duality of A15 and A14 remain mutually exclusive. Failure to do so can create so diabolical system bugs. Tell us more about your circuit and we can give more specific assistance and reduce the confusion factor a little. :) Good Luck! aka j http://www.geocities.com/mingpzong |
| Topic | Author | Date |
| P2 as general output | 01/01/70 00:00 | |
| RE: P2 as general output | 01/01/70 00:00 | |
| RE: P2 as general output | 01/01/70 00:00 | |
| RE: P2 as general output | 01/01/70 00:00 | |
| RE: P2 as general output | 01/01/70 00:00 | |
| RE: P2 as general output | 01/01/70 00:00 | |
| RE: P2 as general output | 01/01/70 00:00 | |
| RE: P2 as general output | 01/01/70 00:00 | |
RE: P2 as general output | 01/01/70 00:00 |



