Introducing the n8 Bit Special v2 SBC

For discussing the 65xx hardware itself or electronics projects.
Post Reply
Procrastin8
Posts: 40
Joined: 07 Jul 2020
Location: Amsterdam, NL

Introducing the n8 Bit Special v2 SBC

Post by Procrastin8 »

At long last I have received PCBs for the 2nd iteration of my SBC: the n8 Bit Special. The n8 Bit Special is an open-source 65C02 SBC with core functionality on a 100x100mm 4-layer PCB and 3 ports for small and focused expansion cards. Hardware information, PCBs, GAL code, etc. can be found here on github.

Some notable elements of this design are:
  • centered around a 65C02 in a PLCC package
  • built-in SC28L92 DUART for timing and serial connection
  • a USB micro port connected to a CH340X USB-to-serial SOP so it can be directly connected to and powered by another computer
  • glue logic is handled by an ATF22V10 so address space and memory topography is configurable
  • 48k RAM and 16k ROM (though as stated above, this is completely configurable!)
  • runs at 3,6864 Mhz (eventually. ROM code still uses an R65C51 that maxes out at 2 Mhz so while I bootstrap 28L92 drivers, it runs at half that, 1,8432 Mhz)
  • 3 n8 Bus expansion ports (definition, template PCBS, and more of this "standard" is provided on github)
I posted the schematic (buried deep) on another post but at that time it wasn't tested. Now it is!
n8%20Bit%20Special.pdf
n8 Bit Special v2 schematic
(366.6 KiB) Downloaded 62 times
Right now it's basically running the ROM from v1 of the board with very few changes and has a VIA and ACIA in expansion slots. Will post real-life photos on a 2nd post :D
Procrastin8
Posts: 40
Joined: 07 Jul 2020
Location: Amsterdam, NL

Re: Introducing the n8 Bit Special v2 SBC

Post by Procrastin8 »

As promised here are some real-world photos of the n8 Bit Special in action! My first test was a free-run test. I hardcoded $EA on the databus and observed the low 6 address bits from an expansion port. A very complicated clock divider!
n8 bit v2 free run test
n8 bit v2 free run test
Next I hooked up RAM (x2), ROM, a VIA and an ACIA. It's running an old version of the ROM that isn't SC28L92 aware. Here i have both the ACIA and SC28L92 hooked up to my computer so I can bootstrap an SC28L92 driver.
overhead of n8 bit v2
overhead of n8 bit v2
side of n8 bit v2
side of n8 bit v2
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: Introducing the n8 Bit Special v2 SBC

Post by floobydust »

Hi Nate,

Congrats on the SBC V2... looks nice... tidy layout. A few things to note:

- It would have been more flexible to have separate the clocks for the CPU and the SC28L92.
- Looking at your WinCUPL config, you shouldn't qualify RAM selects with Ph2 of the clock, only the Read/Write lines, which you did. It might create some odd timings and put things on the edge.
- If you were to just connect A15 to the /CS line of the lower RAM, you could free up a line on the 22V10 and generate the Read and Write signals for ROM/RAM, I/O without the 74HC00.

Of course, the last comment states that the first 32KB will always be RAM.

Lastly, feel free to look at my GitHub page... I have BIOS code that configures and runs the SC28L92 for both serial ports and the counter/timer used as a jiffy clock.
Procrastin8
Posts: 40
Joined: 07 Jul 2020
Location: Amsterdam, NL

Re: Introducing the n8 Bit Special v2 SBC

Post by Procrastin8 »

floobydust wrote:
- It would have been more flexible to have separate the clocks for the CPU and the SC28L92.
Yes it would, but one of my major goals was to just make it as compact as possible to get that sweet JCB PCB price point, $8 for 5 4-layer boards as of this writing. In the future, if things go well, I can double the clock to 7,something (not going to do the math right now :D ) and just change some DUART settings
Quote:
- Looking at your WinCUPL config, you shouldn't qualify RAM selects with Ph2 of the clock, only the Read/Write lines, which you did. It might create some odd timings and put things on the edge.
I no longer qualify them on the GAL. I need to upload my latest (there are some changes made to GAL and ROM that aren't reflected in the repo right now)
Quote:
- If you were to just connect A15 to the /CS line of the lower RAM, you could free up a line on the 22V10 and generate the Read and Write signals for ROM/RAM, I/O without the 74HC00.
This is an intriguing idea for the future. I did pipe CLK and R~W into the GAL for these exact kinds of reasons. Will play with this but maybe in a month or two. The high of a working new design hasn't worn off yet.
Quote:
Lastly, feel free to look at my GitHub page... I have BIOS code that configures and runs the SC28L92 for both serial ports and the counter/timer used as a jiffy clock.
I will do this. I am running into trouble where interrupts aren't firing!
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Introducing the n8 Bit Special v2 SBC

Post by BigDumbDinosaur »

As flooby said, you should drive your 28L92 with its own oscillator (3.6864 MHz for standard bit rates). In my POC units, I use a 50 PPM part for that, since the system clocks are ultimately driven by a jiffy IRQ from the L92, and I'm a bit of a fuss-budget when it comes to clock stability. :D The oscillator that powers the MPU is a standard 100 PPM unit run through a flip-flop to strengthen the signal and assure it’s symmetric. Ø2 symmetry at low clock rates isn't important, but becomes so as you close in on the MPU’s maximum clock rating.

The other thing, as flooby noted, is to not use Ø2 to qualify chip selects. Doing so not only creates the potential for weird timing problems, it grossly narrows the window in which reliable device access is possible, which will lower the Ø2 frequency ceiling.

Procrastin8 wrote:
I am running into trouble where interrupts aren't firing!

Which interrupts?

Aside from reviewing flooby's code, do a search on the 28L92 here. There's a fair amount of stuff to be found that might help you. The attached might also be of some help, although it was written for the 28L91 and is not complete.

28l91_driving.pdf
(573.32 KiB) Downloaded 45 times
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Procrastin8
Posts: 40
Joined: 07 Jul 2020
Location: Amsterdam, NL

Re: Introducing the n8 Bit Special v2 SBC

Post by Procrastin8 »

It turns out the interrupts weren't firing because I was writing to $05 (the IMR offset) instead of DUART_BASE+$05 :( All cleared up now. So far no problems running both the system and 28L92 from same 3,6Mhz main clock source.

I also pushed actual GAL PLD code which does not qualify CLK with any CS signals.
Post Reply