6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 7:50 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Aug 02, 2022 11:15 am 
Offline

Joined: Tue Jul 07, 2020 10:35 am
Posts: 40
Location: Amsterdam, NL
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!
Attachment:
File comment: n8 Bit Special v2 schematic
n8%20Bit%20Special.pdf [366.6 KiB]
Downloaded 43 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


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2022 11:30 am 
Offline

Joined: Tue Jul 07, 2020 10:35 am
Posts: 40
Location: Amsterdam, NL
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!
Attachment:
File comment: n8 bit v2 free run test
n8bit_v2.jpg
n8bit_v2.jpg [ 3.05 MiB | Viewed 719 times ]

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.
Attachment:
File comment: overhead of n8 bit v2
n8bitv2_overhead.jpg
n8bitv2_overhead.jpg [ 2.9 MiB | Viewed 719 times ]
Attachment:
File comment: side of n8 bit v2
n8bitv2_side.jpg
n8bitv2_side.jpg [ 3.14 MiB | Viewed 719 times ]


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2022 6:06 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
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.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2022 6:29 pm 
Offline

Joined: Tue Jul 07, 2020 10:35 am
Posts: 40
Location: Amsterdam, NL
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!


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 02, 2022 7:11 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
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.

Attachment:
28l91_driving.pdf [573.32 KiB]
Downloaded 27 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 05, 2022 11:25 am 
Offline

Joined: Tue Jul 07, 2020 10:35 am
Posts: 40
Location: Amsterdam, NL
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: GlennSmith, Google [Bot] and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: