2
\$\begingroup\$

I recently got TS68000 microprocessor. My final goal is to build a simple computer based on that CPU.

For now I am trying to find a way to single step it.

I found schematic below by John Tsiombikas and I tried to introduce it but I failed...

Below is run using 10MHz clock. I de-bounced my switch (used with pull-up resistor to revert the logic) and connected it to SN74LS93N (4 input NAND - Schmitt Trigger) - 3 pins are set HIGH and 1 is driven by button so when I press the button the output goes HIGH

Output of this gate is connected to MM74C74N (Dual D Flip Flop) - D-Flipflop - output(Q) is connected to second D-Flipflop Second Flip Flop Q' output are both connected to - dual Input NAND gate - output from this gate is what I am after(DTACK).

However when I press the button is stays HIGH for longer than 1 clock cycle as explained in John's video

Not sure what am I doing wrong...

P.S - I hope you can read my writing... I am not the best drawing schematics...

John's Diagram enter image description here

\$\endgroup\$
  • \$\begingroup\$ I'm confused by what you're trying to do with those 2 pull-up/pull-down resistors in your hand-drawn schematic. What you have there does not correspond with what is drawn in the 'How To' image above. \$\endgroup\$ – brhans May 6 at 16:12
  • 1
    \$\begingroup\$ In my TTL databook, the 74LS93 is a decade counter. The dual 4 input Schmidt NAND gate is a74LS13 - which are you really using? Your schematic shows a 560 Ohm resistor between Vcc and ground at the switch. If that resistor is intended to be a pull-up it needs to be on the other side of the switch - where it is now just wastes power. \$\endgroup\$ – Peter Bennett May 6 at 16:14
  • 1
    \$\begingroup\$ Or just set the Trace-bit, which is meant for single stepping \$\endgroup\$ – pipe May 6 at 16:26
  • \$\begingroup\$ @brhans - i didn't have a simple Schmitt Gate so I had to use NAND gate so I inverted the button logic. Pressed LOW \$\endgroup\$ – aberforth May 6 at 17:18
  • \$\begingroup\$ @Peter Bennet - yes it is 74ls13 \$\endgroup\$ – aberforth May 6 at 17:18
1
\$\begingroup\$

tl, dr: you don't need to make any circuit. Use 'trace' mode instead.

The 68000 has the ability to cause an exception on every instruction. This is the Trace bit, set in the Status Register (SR). When Trace is set, the 68000 executes one instruction, then branches to the trace exception handler routine whose address is at vector 9 / offset 0x24, from which it will branch to your debugger.

I also found reference to a complete design that includes the ability to single-step by manipulating DTACK*. Link here: https://github.com/jefftranter/68000/blob/master/TS2/v2/ts2.pdf

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I am not sure how this can help me. I need an ability to see the data/address bus content for each instruction. This is for me to help me understand the operations. Can I achieve this with Trace bit? \$\endgroup\$ – aberforth May 6 at 18:37
  • \$\begingroup\$ You will be able to see this from the debug console. Which means it's a good idea to add this to your design (a 16550 type UART or similar.) \$\endgroup\$ – hacktastical May 6 at 18:40
  • \$\begingroup\$ That is perfect! thanks a lot!. The only think I can't get is page 7 top left corner. Is that some kind of resistor on Chip? there is a 4.7k value so I guess it's 4700Ohm? \$\endgroup\$ – aberforth May 7 at 7:42
  • \$\begingroup\$ Yes. It’s a resistor pack with 8 4.7K resistors with a common tie, being used to pull up the signals. These were popular in the through-hole days, you don’t see them as much anymore. \$\endgroup\$ – hacktastical May 7 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.