Close

Further functional checks

A project log for 6809 SBC

A 6809-based SBC with DES encryption hardware.

philmacphailPhil.macphail 01/10/2021 at 19:170 Comments

With the computer running code correctly I could start to verify the other features of the design. The upper 32k of the memory map has both RAM and ROM in parallel. Writes to this space go to the RAM, but reads come from the ROM after reset, however the ROM can be disabled so that reads come from the RAM. This is important if I want to run Flex, as I need RAM at the top of memory. Reset set a 74HC74 used as a SR flip-flop, and the output of this is used to gate the chip-select signals, diverting reads to ROM. Writing to a memory location resets this flip-flop, so this is easy to test. Using the monitor to write to $F2C0 crashed to computer, and I could see with a logic probe that the ROM wasn’t selected at all. Now how to continue correct program execution? This turns out to be quite easy. Re-assembling the Assist09 code to produce a S-record output gave me a file that I could download to the SBC using the Assist09. True bootstrapping! This gives identical memory contents in both RAM and ROM, so switching between them should be invisible to the CPU. Writing to $F2C0 once more didn’t crash the processor, and I could read, modify and verify memory contents that were previously located in the ROM space.The second memory feature is that the space $D000-DFFF is mapped to any 4k block through the 512k of the RAM chip. With the ROM disabled I could now ‘see’ this space, and see if it works. Again, the monitor let me do this very quickly. The sequence used was

This all worked perfectly, so for now I can confirm that the memory paging is working correctly. All good so far, and no need to write any code so this all took less than an hour. The only thing left to verify was the 68681, and again I could do initial checks with the monitor.
The PCB has two LED’s connected to the output port of the 68681, so writing to the correct register should be able to turn them on and off. Again, the monitor made this simple and I could control the LED’s as expected. At this point I realised that the state of these outputs is defined at reset; I could use one output to control the ROM select, so that I can switch it in and out as required rather than just at reset. Removing the 74HC74 and soldering a wire on the underside of the board took a few moments, and worked perfectly.
This was all going too well, and it was at this point that I realised I couldn’t check the DES chip - it requires a clock input at twice the bus frequency, and I had connected this to the crystal oscillator running at four time frequency. This will require a bit of surgery, so perhaps I will leave this for now.

Discussions