68HC11 board for Fuzix work (and no doubt Flex)

193 views
Skip to first unread message

Alan Cox

unread,
Aug 1, 2019, 5:34:25 PM8/1/19
to retro...@googlegroups.com
I decided not to go the RC2014 route in the end given all the fun some of the peripherals turn up with non Z80 like busses.

The basic concept is pretty simple. Nail 512K of RAM to the address and data bus plus some GPIO pins for banking - completely ignoring any requirement to match the bits up (because only the CPU access the RAM and it's the only memory device..so who cares how it is wired ?) and take the onboard SPI, GPIO and serial out so I can hang SD card and the like off it.

I was going to stripboard it so used Fritzing but with a bit of very gentle persuasion and an oversized PCB Fritzing autorouted it and JLCPCB wanted peanuts to fab it. So far I've fixed a couple of errors where the power rails were not all connected together and cooked an econoreset because I missed the magic words 'viewed from below' but all the power now seems to be correct, the reset line works and all the other rails I've checked seem reasonable.

Next adventure is adding the CPU, which at least in the 68HC11 case can be its own step because the CPU can run with onboard UART and without external RAM attached as it can be set to download into the 256 bytes of RAM and run the result. Enough to test and run test programs for the RAM etc I hope.

The final goal is 512K RAM, SD card and maybe some other SPI devices as I've got a couple of chip select lines so room for a bit more than just an SD interface.

From the software side the CPU has 256 bytes of internal RAM which are thus not banked and should be enough to get by. If it works out then I may get a 68HC811 so I can put the bootstrap into EEPROM and boot off SD card nicely.

Alan


68HC11_schem.pdf

Steve Cousins

unread,
Aug 1, 2019, 7:34:59 PM8/1/19
to retro-comp
You be careful you don't get addicted to PCB design. If you do you can say goodbye to doing any more software development :(

Steve

Bill Shen

unread,
Aug 1, 2019, 10:11:48 PM8/1/19
to retro-comp
The wonderful thing about learning a new skill is you'll find exciting and new ways to make mistakes!
  Bill


Message has been deleted

Richard Lewis

unread,
Aug 2, 2019, 2:41:08 AM8/2/19
to retro-comp
Yep, I've gone down that rabbit hole as well. 

Alan Cox

unread,
Aug 4, 2019, 7:27:54 AM8/4/19
to retro-comp


On Friday, 2 August 2019 00:34:59 UTC+1, Steve Cousins wrote:
You be careful you don't get addicted to PCB design. If you do you can say goodbye to doing any more software development :(

 I did get some software done (Micro80 emulator, Banked CP/M for Micro80, put in the Fuzix mods for SD cards without pullups, write an initial Z80DMA emulation, clean up the RC2014 emulator code a chunk) but not as much as I wanted 8).

I've found a few more errors (missing pullup etc) from inspecting and checking stuff but I'm now stumped on the clock circuit which seems to involve a lot of magic and also disagree between various designs and data sheets.

The chip has XTAL and EXTAL pins. The data sheets shows a 10MOhm resistor across then then a crystal (usually 8Mhz) with 25pf capacitors from each side to ground and it should produce 1/4 of the crystal frequency on the E output of the CPU - which is not doing anything. If I try and measure the crystal circuit with a frequency meter I see some brief random values then DC so I suspect it's not working either but also that measuring it is enough to stop it anyway.

Actually boards seem to use various capacitors (22pF, 16pF, 27pF) and I have also seen comments about layout mattering so is there a good guide to getting the clock inputs working. I'm tempted for attempt 2 to just make the clock a jumper input so I can deal with it on its own.

I've also somewhat figured out Kicad and how to use labels for everything and skip almost all the annoying schematic layout nonsense 8)

Alan

Steve Cousins

unread,
Aug 4, 2019, 8:45:53 AM8/4/19
to retro-comp
Alan,

I can't believe you wrote: "use labels for everything and skip almost all the annoying schematic layout nonsense". LOL.

That's like a programmer using GOTO everywhere and claiming structure is "annoying nonsense".

A schematic layout is a form of art. When I look at a schematic I'm not familiar with, where it has been drawn with just labels, I often get too few visual clues and find it difficult to follow. If I look at one where every connection is drawn with a separate line, I often have trouble following those connections through the stagette. The happy compromise is the art form. 

Steve

Bill Shen

unread,
Aug 4, 2019, 12:06:32 PM8/4/19
to retro-comp
I like the 'go to' analogy. In the old days it is known as 'air wire' and very much frown upon. It is allowed in limited cases, but you are required to annotate every locations on the schematic that the air wire connected to. Power and ground are allowed to be air wires, so are buses, if they are drawn with bus symbols. Each company has its own way of drawing schematic. It is up to the senior engineers to set & enforce the schematic style, much like the software coding style. Of course as a hobbyist, you can do whatever you like.
Bill

Mark T

unread,
Aug 4, 2019, 2:10:35 PM8/4/19
to retro-comp
Hi Alan
Maybe just remove the crystal and resistor and wire from the rc2014 bus and use an rc2014 clock module. Better to get the first version working with wire adds before making version 2.

I find the most annoying schematic style is where a bus is routed in between every component and then every signal goes in or out of this single bus. Labels on every pin is not so bad as this, but better to group gates with wires and put the glue logic wired to the major components.

Mark

Richard Lewis

unread,
Aug 4, 2019, 5:51:38 PM8/4/19
to retro-comp

My evolution in schematic design has been:

1. Wires everywhere: everything connected to everything else with wires. I generally only have free time on the weekends so would come back to it a week later and would get lost in my own schematic
2. Busses everywhere: an improvement but a roadblock for me exists in KiCad. Busses work until you split the schematic onto hierarchical sheets and then realise that the bus cannot be made global. 
3. Global signal tags everywhere, "air wires": Solved my problem with #2 but then as Steve pointed out was hard to follow sometimes. I did get used to it but then wondered "Why am I sticking labels on glue logic gates?"
4. Hybrid: I now generally use local wire labels on the top sheet, group common signals together on a bus, gates are wired together with only inputs and output labeled, sheets have hierarchical  labels that only specify input and output pins so I can reuse in other designs. Really cool. 

Finally though I agree with Bill's statement: "Of course as a hobbyist, you can do whatever you like."

-Richard

Richard Lewis

unread,
Aug 4, 2019, 7:01:02 PM8/4/19
to retro...@googlegroups.com
I've gone away from crystals and use external clock oscillators instead. Then I don't need to deal with the load capacitors at all. Fortunately most of the chips I've been working with can deal with either. The only downside with an external oscillator is making sure the logic level is matched. Generally oscillators that produce HCMOS or LVTTL will work with TTL. As far as which load capacitors to use and what layout is best I generally found this information in the datasheets. 

I work mostly with the SI5351 that lets you program 3 outputs from low khz to 250mhz using I2C. Only downsides are that its SMD and you need to level convert the LVCMOS output. 

-Richard

Alan Cox

unread,
Sep 7, 2019, 3:02:50 PM9/7/19
to retro-comp


On Sunday, 4 August 2019 19:10:35 UTC+1, Mark T wrote:
Hi Alan
Maybe just remove the crystal and resistor and wire from the rc2014 bus and use an rc2014 clock module. Better to get the first version working with wire adds before making version 2.

I finally had time to look at it. Nothing more complicated wrong than the difference between a 1M and 10M resistor. I now have a proper looking E clock out. Next step is to try and run some code, which since it can accept programs over the serial port is hopefully not as horrible as bringing up some CPUs

Alan

Alan Cox

unread,
Sep 14, 2019, 10:30:00 AM9/14/19
to retro-comp
I now have the 68HC11 sending an 0xFF (actually a break) signal when it comes up, accepting 256 bytes of stuff, echoing it back and then stopping echo (which it should as it should at that point be running the stuff sent). When I have a bit of time the next job is to feed it 256 bytes of actual real 68HC11 code not junk and see if I can make it say Hello World, then start testing the RAM interface.

I'm beginning to think I should have added decode for a ROM from the beginning and stuck Buffalo on it.

Alan

Alan Cox

unread,
Sep 23, 2019, 6:34:59 PM9/23/19
to retro-comp
After a certain amount of annoyance I ended up writing my own loader for the HC11 and with as11 and a bit of messing around getting the asm right I now have the HC11 accepting actual code from the PC and running it. So far it has said hello and echoed input.

Now I actually have to fit the external RAM and address latch.

Alan

Reply all
Reply to author
Forward
0 new messages