Testing The Limits Of Home PCB Etching

[Quinn Dunki]’s Veronica, a homebrew computer based on the 6502 CPU, is coming along quite nicely. She’s just finished the input board that gives Veronica inputs for a keyboard and two old Nintendo gamepads. [Quinn] is building this computer all by her lonesome, including etching all the PCBs. She’s gotten very, very good at etching her own boards, but this input board did inspire a few facepalming moments.

In an earlier post, [Quinn] went over her PCB etching capabilities. As demonstrated by the pic above, she’s able to print 16 mil traces with 5 mil separation. This is just about as good as you can get with homebrew PCBs, but it’s not without its problems.

[Quinn] is using a photographic process for her boards where two copies of a mask is printed on an acetate sheet, doubled up, and laid down on a pre-sensitized copper board. The requirement for two layers of toner was found by experience – with only one layer of toner blocking UV light, [Quinn] got some terrible pitting on her traces and ground planes.

Two photographic masks means the masks must be precisely aligned. This example shows what happens when the acetate sheets are ever so slightly misaligned. With a 5 mil gap between traces, [Quinn] needs to align the masks to within ±2.5 mils; difficult to do by eye, and very hard once you factor in flexing and clamping them down to the copper board.

Even when this process goes perfectly, [Quinn] is pushing the limits of a laser printer. When printing at 600 dpi, the pixels of the print are about 1.5 mils. While GIMP, printer drivers, and the printer itself have some fancy software to help with the interpolation, [Quinn] is still seeing ‘bumps’ on the edges of perfectly aligned parts. This is one of those things that really makes you step back and realize how amazing fabbing PCBs at home actually is.

With most of the hardware for Veronica out of the way, it’s just about time for [Quinn] to start programming her baby. We’re not expecting a full-blown operating system and compiler, but those NES gamepads are probably crying out for some use.

Veronica Gets A Pair Of Gamepads And A Bugged Chip

veronica

[Quinn Dunki]’s awesome 6502-based computer is coming right along, and she decided it’s time to add one of the most important features found in the 80s microcomputers she’s inspired by – gamepads.

There were two ways of implementing gamepads back in the 80s. The Apple II analog joysticks used a potentiometer for each joystick axis along with a 556 timer chip to convert the resistance of a pot into a digital value. Analog controls are awesome, but a lot of hardware is required. The other option is the Atari/Commodore joystick that uses buttons for each direction. Surprisingly, these joysticks are inordinately expensive on the vintage market but a similar hardware setup – NES gamepads – are common, dirt cheap, and extremely well documented.

[Quinn] wrote a few bits of 6502 assembly to read these Nintendo controllers with Veronica’s 6522 VIA with the help of an ATMega168, and then everything went to crap.

In testing her setup, she found that sometimes the data line from the controller would be out of sync with the clock line. For four months, [Quinn] struggled with this problem and came up with one of two possible problems: either her circuit was bad, or the 6522 chip in Veronica was bad. You can guess which option is correct, but you’ll probably be wrong.

The problem turned out to be the 6522. It turns out this chip has a bug when it’s used with an external clock. In 40 years of production this hasn’t been fixed, but luckily 6502 wizard [Garth Wilson] has a solution for this problem: just add a flip-flop and everything’s kosher. If only this bug were mentioned in the current datasheets…

Now Veronica has two NES controller inputs and the requisite circuitry to make everything work. Video evidence below.

Continue reading “Veronica Gets A Pair Of Gamepads And A Bugged Chip”

The Most Minimal Homebrew Computer

Perfection is achieved not when there is nothing more to add, but when there is nothing left to fail. Going by that metric, [Stian]’s three-chip 6502 homebrew computer is the epitome of perfection. It’s a real, working, homebrew retrocomputer using only three chips: a CPU, some RAM, and a microcontroller to bootstrap the computer and provide a video output,

The key to this minimalist build is having the entire boot process controlled by an ATMega16 microcontroller, This interfaces to the 6502 through a dual-port SRAM, a 1 kilobyte Cypress CY7C130. This dual-port RAM allows the CPU and microcontroller to access the same bit of memory, making it easy to bootstrap a computer from a bit of AVR code.

Output is provided with [Stian]’s ATMega video text generator putting a 37×17 characters on any television with an RCA jack. While input isn’t handled yet, [Stian] says it should be possible with his AVR PS/2 keyboard library.

While other 6502 homebrew computers such as [Quinn Dunki] Veronica can reach unparalleled heights of complexity, there is a lot to be said about the minimalism of [Stian]’s three-chip computer. With some clever coding and a modified parts list, it may well be possible to put a retrocomputer in the hands of everyone with a bare minimum of cost and parts.

Guest Rant: From Bits To Atoms

I’ve been a software developer for quite a while. When you spend long enough inside a particular world, it’s easy to wind up with an ever-narrowing perspective. You start seeing everything from a software point of view. As the saying goes, when your only tool is a hammer, you tend to treat every problem as NP-Complete. Or something. I forget how that goes.

Anyway, the point is, it’s always good to broaden one’s horizons, and solve as many different kinds of problems as possible. To that end, I started to get into hobby electronics recently. The journey has been very enlightening in a number of ways.

Continue reading “Guest Rant: From Bits To Atoms”

SparkFun Ponders Women In STEM Fields

sparkfun-ada-loveless-day

Tuesday was [Ada Lovelace] day and to recognize it SparkFun posted an article about women in their workforce and the STEM initiative. [Ada Lovelace] is credited with forging a path for women in mathematics and computing. The STEM acronym represents a movement to get more of America’s students into Science, Technology, Engineering, and Mathematics fields in order to keep up with the rest of the developed world. But part of the issue includes drastically increasing the interest of young women in these fields and their access to it. The thing is, I feel the same way about the community at Hackaday.

Obviously some of the biggest names in the hobby electronics and engineering enthusiast industry are women. The name that seems to top lists is always [Limor Fried] who you may know better as [Lady Ada]. She founded Adafruit industries. But there are couple of other notables that stick out in our minds. [Jeri Ellsworth] has been huge name around here forever. Just this week Hackaday was celebrating the Kickstarter for her latest project. [Becky Stern] has had a ton of awesome project featured, mostly in conjunction with her work at Adafruit but her knitting machine hack when she was with MAKE has always stuck out in our minds. And of course, there’s [Quinn Dunki] who has long been building her own 6502 computer from the ground up (Incidentally we’re running a Guest Rant from her at midday on Friday).

What I’m missing is the grass-roots hacks from women. I know they’re out there because I see them at monthly meetings at the local hackerspace. We featured [Caroline’s] bathymetric book, and [Robin]’s collaboration that produced solar powered supercap jewelry. Both are members of Sector67.

So I call for all Hackaday readers to make this a friendly environment for anyone who wants to participate. If you’re a female reader who has been lurking around rather than sending in links to your gnarly hacks please take the plunge and send us a tip! If your female friends have awesome projects, offer to help them document it for a feature. You may not have thought of it, but sharing your projects makes you a role model for young readers.

By trade I’m an orchestra musician — a field that was completely closed off to women until well into the last century. While gender equality hasn’t been reached in all orchestras, the Regional Orchestras I have and do play with, show equal representation of gender throughout. Let’s make the same thing happen with STEM!

Building RAM Into Veronica – The 6502 Computer

ram-for-veronica

It seems strange that RAM is being added to a computer so late in the build, but [Quinn Dunki] must have had it in the back of her mind the whole time because it turns out to be a rather painless experience. For those of you keeping score, this makes her Veronica project Turing complete.

The brightly colored rats nest pictured above connects the new components to the 6502 computer backplane seen in the upper left. [Quinn] decided to go with two 32K SRAM modules which need very little in the way of drive hardware (it’s hanging out on the breadboard to the left). The RAM module will simply listen for its address and react accordingly. There is one hitch regarding a two-phase clock and the need to protect the RAM from erroneous data during the first of those phases.

Getting this all to work actually pointed out a bug in the ROM module she had long ago completed. After picking up on the problem she was able to correct it simply by cutting traces and soldering in jumper wires.

Veronica 6502 Computer Reaches Hello World Stage

veronica-hello-world

The screenshot on the right shows [Quinn Dunki’s] computer project displaying a Hello World program. Well, it’s only showing the word Hello right now, but the concept is the same. This proves that native 6502 code is running on the processor and reliably outputting data through its VGA hardware. That’s a welcome achievement after watching so much work go into this project.

But with anything this complex you can’t expect to make progress without finding bugs. And this step in the journey had a pretty big one in store for [Quinn]. After writing the assembly code and loading it into the machine she was dismayed to find that there were dropped characters all over the place. Now she shows a screenshot and says it’s easily recognizable as a race condition — proving she has a bigger brain than us.

The problem is a pair of uninterruptible processes running on the same AVR chip (part of the GPU she built). They are fighting with each other for control of the processor cycles and she fixed it by making the daughter board seen in the image above. It moves one of the time-critical processes out of that single AVR chip to fix the issue by using an IDT7200L FIFO SRAM chip.