Zikzak - crummiest 8bit console/computer ever .. but I'm making it!


I hate those days when you finally get a free moment and decide to set up a new little test board, so you can do audio test with just 2 chips. Easy pleasey right?

- put down avr8, 2 caps, the 4 power pins, and a resistor and LED to blink so you can know its working

--> try program it .. errors from ISP

- check 'fuses' to verify it doesn't need a crystal; try a crystal anyway -> no luck

- verify 100 times the wiring and the ISP jumpers .. all good

- swap out USB cable -> no dice

- swap out ISP for another one of different kind -> still no dice

- try a different avr chip in case its popped.. no luck

- reboot to Windows, try it from official toolkit .. no luck

OKay, so everything has been swapped out, except the wires themselves; I guess maybe I have to check them all, see if they're screwy .. broken in the insulation or something, however unlikely. I've even moved it all around on the breadboard to try different cells.

Tried another existing board that was known to work back when I had free time 5-6 weeks ago (VGA black and white text test) -> no work

So, sure seems like _something_ is fubar'd in the .. PC? bad USB ports? pretty much swapped out everything, but now it 'just doesn't work'.

Theres a day shot, getting nowhere, when I've no time to waste.

*FARG!*

.. it does read the device-id correctly, and pulls the board voltage correctly. It claims to do a data dump okay, but can't really verify. Just fails to flash .....

edit: just to blow my mind, I jacked in my 'zikburner' eeprom burner which is on a perfboard, worked no problem to reflash. *mind blown* .. that one uses a crystal though.. hmm..
 
Last edited by a moderator:
aargh... I know that feeling, bro.
 
Tempted to find or make a cheapo reflow oven, but it seems as you get one tool to raise your technology wall, the next problem arises; once you get a reflow oven, you nearly need a laser cutter to make stencils for everything for it ;)

But I've got the (so far untested) hot air rework station (and also a heat gun, which should work in brute force single-chip situations.)

I ordered a metal QFP64 0.5mm stencil .. $11 from a nearby shop. I think I have solder paste, otherwise theres anothe nearby shop that sells it in tiny little tubes for just a couple bucks each. (Solder paste has an expiration date, and folks say the flux goes back when it warms so you have to keep it in the fridge; as such, its always expensive stuff.)

So once I get stencil, next attempt with these SMT chips shoudl be:

- put stencil on pcb

- apply paste with squeegee (I use a credit card :p )

- verify its all in the right place

- drop chip on

- verify _its_ in place using microscope

- hit it with the rework station point .. let the hot air wash over it, melt all the paste at once.. in theory, it should surface tension pull the IC right into place and poof, just work.

Will be fun to try that out in a few days or whatever.

--> for now, I'm still banging my head on the 'why doesn't a basic breadboard with a single avr on it, work at all?' .. I've proven my ISP and usb cable and usb ports.. programmer works okay, it flashes my eeprom burner perfboard just fine;  So w-t-f is going on on two breadboards, with two separtate single avrs on them, that they get 'timeout' error ... fricking weird. Losing my mind :)

Writing |                                                    | 0% 0.00savrdude: stk500v2_command(): warning: Command timed out
avrdude: stk500v2_paged_write: write command failed
 

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0002
 

Hmrf.

Hate to get stuck on such a basic thing I've set up a hundred times - single avr with blinking LED so you've got a working base, then add the fun bits; should've taken all of 5 minutes, and then a couple hours on the audio hacking; but now I've flushed about 5 hours down the drain getting nowhere.. so weird!

Next up .. checking the breadboard connections are okay, and replace the jumpers, and hit the o-scope on the power lines to see if theres fluctations.. I've swapped jumpers already, but maybe bad luck has had me swap bad for bad :p
 
apply paste with squeegee (I use a credit card)
Hmm.. why not use mica that you get of throw away packaging? Of course, a creditcard works too, best use for them.

Would it be all to expensive to redo all with new components? Maybe there is a hair thin conductive element that shortcircuits something?
 
I'd like to play with sound generator chips, but I really have no clue about what circuitry I'll need to get something audible out of them… And I can't be assed to search at the moment!

Got more various samples from a few chips makers, sampling is the best way to get chips you only want to mess with.

Right now I'm playing with led drivers, with and without PWM (I have even more samples ordered :p ). Pretty fun thingies to play with.

I may have found one that do what I need easily, the AS1130. (otherwise, I'll stick with the Max7221 :D )

Wait & see!
 
okay, solved this particular waste of 2 days of life.

Turns out _both_ the avr mcu's I'd been trying to test with are zapped, somehow; they were both on the same giant breadboard.. possibly when I picked it up, they got static zapped? (coldest dryest day of the year?)

*blast* .. wasting 2 days trying to figure it out, swapping every single component, even swapping mcu's.. to find _both_ of them are shot. Scronged up a third, and poof, everything good.

Not to mention 2 mcu's down the toilet for reliability.. so annoying :/

Still, at least I can move on with the blasted audio testing... and now have a hard hard deadline at work, so no free time for a few days likely. *garg* :)

..

The ay-3-8910 (and ay-3-8912 in particular) are designed really well .. you can get by with almost no hookups; power, and the data buss pins, and then ignore or ground most of the other pins. The 8912 chip has less 'extra unused serial ports' on it, whereas the 8910- has 2 full ports; 8912 is 28 pin, and 8910 is 40pin; but in both, you really only need hook up what, 8 + 2 + 3 wires to get it going (plus a 1-2MHz crystal); but then you have to bitbang send in registers and so on to generate the music.. and well, I have _no_ idea how music and sound work; its not in me.

I'm hitting up the old ST and arcade and spectrum demo sites, see if I can grab some sample data to send into the chip :) Will let you know soon, now that I'm back up..

jeff

--

What do you need LED drivers for? Are they just a 'line driver', which basicly just means they can serve out the amps and voltage needed? ie: I've learned you can't just dump 16 LEDs on a mcu, they draw too much and freak it out. So you do mcu -> line driver -> LED and no problem. So "LED driver" I've never looked up, but just assume they're the same as line driver.. or do they have some fun logic in them?
 
Last edited by a moderator:
[...]

Right now I'm playing with led drivers, with and without PWM (I have even more samples ordered :p ). Pretty fun thingies to play with.

I may have found one that do what I need easily, the AS1130. (otherwise, I'll stick with the Max7221 :D )

Wait & see!
[...]

What do you need LED drivers for? Are they just a 'line driver', which basicly just means they can serve out the amps and voltage needed? ie: I've learned you can't just dump 16 LEDs on a mcu, they draw too much and freak it out. So you do mcu -> line driver -> LED and no problem. So "LED driver" I've never looked up, but just assume they're the same as line driver.. or do they have some fun logic in them?
The Max7221 in particular is more than 'just' a line driver. They can work in different 'modes' and do smart stuff when driving 7-segment displays. Expensive as hell too: ~$12.00 each on Digikey/Mouser. There are plenty of chinese knock-offs for more reasonable prices on ebay. Most of them work well if you just want to play around with them, but I wouldn't count on the fakes in production.
That AS1130 looks convenient. I2C and everything!
 
Registers are octal? I'd have totally missed that!


I'm doing 2 wire as well .. Totally ignore that one line. They seem wasteful with pins .. All those lines for chip select / address that almost no one uses, forcing you to multipurpose he data lines everyone uses ... But at least you can hook up with minimal pincount.


Jeff
 
[...]


What do you need LED drivers for? Are they just a 'line driver', which basicly just means they can serve out the amps and voltage needed? ie: I've learned you can't just dump 16 LEDs on a mcu, they draw too much and freak it out. So you do mcu -> line driver -> LED and no problem. So "LED driver" I've never looked up, but just assume they're the same as line driver.. or do they have some fun logic in them?
It's still for the elevator project, making a nice display in the elevator and some simpler ones for each level.


Led driver aren't just line driver, they add quite a few functions like PWM, dot correction (if some leds are brighter than others) and others, to unload the MCU.

The Max7221 in particular is more than 'just' a line driver. They can work in different 'modes' and do smart stuff when driving 7-segment displays. Expensive as hell too: ~$12.00 each on Digikey/Mouser. There are plenty of chinese knock-offs for more reasonable prices on ebay. Most of them work well if you just want to play around with them, but I wouldn't count on the fakes in production.


That AS1130 looks convenient. I2C and everything!
I didn't know that the max7221 was so pricey… I got four 7221 and four 7219 for free as samples from Maxim. I guess I'll keep playing with those but if I want one in my project, I'll rather get cheap chinese knock-off.

I'm still not decided if I'm going to use led matrix display or 7-segments display. 7-segments display are really easy to use and cheap, but led matrix display allow fun things and IMHO looks prettier.


AS1130 looks really nice on the paper, I'm waiting for the delivery to get a more accurate opinion.


It can drive up to 132 leds using charlieplexing technique (they call that "crossplexing" which sounds better IMHO). Main problem with this technique is if one led fail, your whole display is more or less unusable. So if I use that chip, I'll have to make it easy to replace a whole led matrix in case of failure.


It can display pictures and play animation from its internal memory, can fade to black and scroll what's displayed (if you use multiple AS1130, you can even scroll content from one to another from what I understood).
 
Last edited by a moderator:
OKay, how long until someone makes a LED-cube? 32x32x32 or 64x64x64 looks pretty sweet ;)

MAXIM does samples eh? Daaayum, theres a few of those voltage level adjusters and RS232 voltage adjusters could use, and the usual serial chips etc .. mmmm :)

These guys and their samples.. it works; I'm loyal to TI for life due to their service :eek:

jeff
 
Weird oddity.. did a basic wire-up of atmega644 -> ay-3-8912; added a 2.5MHz oscilator to drive the clock on it (may be too fast.. data sheet wants 1.8MHz, but as this is a new chip, figured it might go more, and I don't have any lesser oscilator without bitbanging a clock myself :p ) .. I think I've got the wiring right. Need to check if the data bus is MSB or LSB..

But wrapping the speaker +/- around the 3.5mm speaker plug I've got here for some shitty desktop speakers, I just get the radio picking up :) Wow :) Nice and clear, no less.

Time for some chores, but at least its close .. got some basic code thrown dfown, which looks right.. but all I get are 'ticks' and radio. Not sure how to mask out the radio, and need to figure out why the audio chip isn't doing anything. Could be the clock is too fast.. I may need to drop a CD4060 (divider) on there .. I've got a 2.5MHz osc and a 3.6MHz osc.. the 3.6 divided by 2 woudl be the 1.8 the datasheet wants, anyway.

jeff
 
Real GI brand chips are probably a bit picky about the clock frequency. Microchip ones can take like 8 MHz bus speed and still work from my experience.
 
The one I'm using is _branded_ Microchip; whose to say if it is _actually_ Microchip is entirely different story :)

Any idea how to filter out radio, or is it.. once I've got real signal from the AY it'll 'drown out' the radio thats picking up on the long speaker wire?

jeff

edit: ah, got it; the pinout diagram, for the oscilator I have is backwards.. found another datasheet thats correct (duh), and boom, got audio playing out of the pokey nicely :) I'll see if I can find a cute demo song, and then I can chalk that up as 'easy to use component' for zikzak. And then onto STM32 and VGA at long last :)
 
Last edited by a moderator:
We never had that problem with picking up radio. Once you get a signal, it'll be more than enough to drive a line level. I'd try halving the clock. And remember you need to hold the bus when talking to the chip for a chip clock or two.

EDIT: Also, be careful about what order you release the bus signals in.
 
Last edited by a moderator:
Forgot to post the results of last nights fiddling. Its remarkably straight forward ..

Amazing how a single chip did so much for so many computers, consoles and arcade machines .. add one chip and boom, theres your audio system. And the crap they pulled on the ST to play samples back through this chip :)

Anyway, I found someone else had made an array of a little song, so I pulled tht to make a test demo loop. I'll have to work on a .ym to register-dump converter so I can get some Atari ST demo music playing here, but I think I've proven how to hook that guy up.. so definately PSG audio going into the zikzak design.

Next up STM32 VGA and then redo the schematic, and start plannign the pcb phase..

jeff

https://www.youtube.com/embed/1kcWd2ApRe4?feature=oembed
 
Last edited by a moderator:
Nice :)

The .ym file format is goofy but reasonably well documented; theres a 32B header with some junk, and then some free form frames for some drum samples and such, and some null-terminated strings for song-name and artist.. and the rest is register dump; 1 frame per 50hz, each frame 16b, one byte per register; they sometimes stripe it .. all the r0, then all the r1, etc, and sometimes packed r0, r1, r2, ... r0, r1, r2 .. and thats that.

So I figured, write up a little script that cuts the header out, writes out a C-array of the register dump, and good to go. That format doesn't do timing, it just updates all registers 50times per second, sort of ugly, but it woudl let me get some fun playback.

But I'm not here to make an instrument (tempting as that may be), so dont' want to spend too much time here.. wire it up, works, move onto next neato bit. But so easy to get distracted.. I do love ST demoscene :)

A lot of people have gone down the ...-8910 and YM route; googling and a lot of projects. So much love for a little chip :)
 
I wrote up a quick tool that makes a lot of assumptions, but seems to work pretty well at extracting useful data out of .ym files (at least for Atari ST demos and games.)

I'm currently only using 1 analog channel out of 3, so I can play A, or B, or C .. need to combine them.

I bet I could do an R2R ladder type thing to merge the 3 channels together, or perhaps I need a proper mixer.

Off the top of your heads, anyone know what was traditionally done to mix/combine the 3 channels on their way to speaker?

jeff
 
In my blog post, there is a link to a datasheet. In that datasheet, near the bottom, they have a test circuit with all three channels + an LM386 for amplification.
 
Back
Top