"Wanting" to do something is not, of course, the same thing as "being
able to do it". And, I suspect, my wishes are impossible to achieve.
(I wish to do this in order to interface with a slow device with no
additional hardware. By running in single chip mode, I can control
the port lines connected to the external address, data and control
lines in software.)
It appears to me that the only way of dynamically switching modes is
to write to the MDA bit of the HPRIO register. BUT, the Motorola docs
explicitly forbid this unless the chip is running in a special mode.
HOWEVER, documentation for the "MIT robot project" clearly states that
they do precisely this! Appendix B.8 states:
"1. Start [in expanded mode] by copying a software driver
from external system memory into the 256 bytes of
internal memory.
2. Begin execution of the driver...:
* Place the 6811 into single-chip mode...
* Execute a low-speed transaction...
* Place the 6811 into expanded mode;
* Return to the main program in external memory."
Now the MIT documentation does indicate that this exploits an "obscure
feature".
Examination of the schematic of the MIT board, Fig. B.9, shows
that the MODA pin is connected to GND upon power-up and, after a
delay, to +5V (after non power-up reset) and the MODB to GND; i.e. the
MODA, MODB pair is either 00 or 10. In short, the chip is ALWAYS in
one of the special modes; either the bootstrap special or the special
test mode.
OK, so that's how MIT does it. THREE questions:
1) CAN it be done in normal mode?
2) Motorola states that the special test mode is "intended
primarily for factory testing". What disadvantages, if any,
arise from using this mode in PROTOTYPE designs? What is the
TEST1 register that Motorola refers to and how can ordinary
users exploit it?
3) Do people "on the net" consider the "special mode" operation
used in this way to be:
a) a KLUDGE
b) a CLEVER idea
c) a bit of `a' and a bit of `b'; not quite the same thing as...
d) a CLEVER KLUDGE
e) none of the above (please explain!).
Am I missing anything here?
Thanks in advance for any comments or answers to the questions.
--
Ken Clowes (kcl...@ee.ryerson.ca) Phone: (416) 979-5000 ext 6099
Electrical & Computer Engineering Fax: (416) 979-5047
Ryerson Polytechnic University, Toronto, Canada, M5B 2K3
I havn't had a chance to examine the 6.270 robot board in depth
yet (that project will be put off until this summer) but I have
heard that the printf command to print to the LCD display switches
the board to single chip mode. You might try looking in the IC
libraries that Fred Martin wrote to see how they do this.
hope this helps,
Doug Chapman - Kansas State University