tag:blogger.com,1999:blog-84518175413459855062009-07-06T20:43:22.286-04:00The PaleotechnologistUsing high-tech methods to preserve old-school goodness. Or vice-versa. Or just figuring out cool things to do with technology.M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-8451817541345985506.post-66824952774425158472009-06-12T09:07:00.003-04:002009-06-12T09:19:50.147-04:00The end of an eraTV in the US <a href="http://www.cnn.com/2009/TECH/06/12/digital.TV/index.html">goes digital</a> today.<br /><br />As someone who has seen firsthand the magic that the Digital Revolution has brought us, I know that this is a Good Thing(tm). As a card-carrying Paleotechnologist (not to mention child of the 70's), though, I can't help feeling a little nostalgic for good old analog TV.<br /><br />TV was simpler then -- in Northern Virginia, our TV choices were channels 4, 5, 7, 9, 20, and 26 (plus some UHF channels if we aimed the antenna just right and occasionally channel 3 from Richmond if we aimed the antenna right *and* the moon was in the seventh house yadda yadda.)<br /><br />Not better, mind you -- just simpler. Paleotechnologist or no, I still wouldn't give up our age of TiVo, YouTube, Hulu, DVDs, and flat-panel screens -- even if the 70s did have <a href="http://www.wikipedia.org/wiki/John_Denver">better</a> <a href="http://www.wikipedia.org/wiki/Jim_Croce">music.</a><br /><br /><a href="http://www.wikipedia.org/wiki/Loran">Loran</a> is probably next. They already did away with Omega, and with the Galileo navigation system coming online, there will be an alternative to GPS.<br /><br />At least we technological dinosaurs will have our memories -- from watching Sesame Street on a 1975 Ford TV (which I still have and which still works!), to navigating from Norfolk to Milwaukee and back with a Compaq Plus suitcase computer and a Loran-C receiver (GPS was for rich folks back then.)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-6682495277442515847?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com2tag:blogger.com,1999:blog-8451817541345985506.post-37267932176143880802009-05-09T13:32:00.003-04:002009-05-09T13:52:01.036-04:00Quadrupedal locomotionOkay, this is unexpected. <br /><br />I mean, I like old technology and all, but why would an electronics geek -- even a Paleotechnologist -- be reading a 127-year-old <a href="http://www.archive.org/details/horseinmotionass00stilrich">book</a> on The Horse in Motion (with a study on quadrupedal locomotion?)<br /><br />For a while now, inspired by <a href="http://www.youtube.com/watch?v=XnmO0E2JGJ4">some</a> <a href="http://www.youtube.com/watch?v=Gz9kZh8PNVM">cool</a> <a href="">YouTube</a> <a href="http://www.youtube.com/watch?v=b2bExqhhWRI">videos</a>, I've been playing with the idea of creating a quadruped robot. The low-level stuff is pretty straightforward; stick a bunch of servos together, connect them with some brackets (3D printers and Google SketchUp are a dangerous combination -- more on this later), and control the positions using pulse-width modulation. No problem.<br /><br />The hard part turns out to be figuring out what joints to move, where, how, fast, and when -- especially since the cheap S3003 servos I'm using are not the strongest things in the world.<br /><br />What I really need is a good automated Physics sim (I'm looking into using <a href="http://en.wikipedia.org/wiki/Havok_(software)">Havok</a>, but it's nontrivial) that I could hitch to a Genetic Algorithm to figure out what gaits work best. The GA part I could do; tying it all in to Havok or a similar simulation may take a while.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-3726793217614388080?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com1tag:blogger.com,1999:blog-8451817541345985506.post-89720141473091400632009-05-06T23:44:00.004-04:002009-05-07T00:05:43.272-04:00Redefining the word innovative...Take a look at the work of <a href="http://www.strandbeest.com/">Theo Jansen</a>. This guy is a paleotech artist par excellence -- creating animal-like mechs out of hollow pipes, bottles, and plastic tubing. His "strandbeests" ("beach creatures") are fascinating; he claims to have actually reinvented the wheel with the unique motion scheme they use -- and he might be right.<br /><br />The really interesting part, for me (and probably the reason why the strandbeests' motion looks so natural and fluid), is that Jansen uses a <a href="http://en.wikipedia.org/wiki/Genetic_Algorithm">genetic algorithm</a> to design these creations. <br /><br />His eventual goal is to have the 'beests roam the beaches of Holland, living off of the wind and using their simple mechanical nervous systems to avoid dangers such as the ocean surf, dry sand, and storms.<br /><br />I came across his work this evening while judging some student projects built for a freshman Engineering Technology course. One of the projects used a walker mechanism based on Jansen's work. <br />Kids these days(!)<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/b694exl_oZo&hl=en&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/b694exl_oZo&hl=en&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-8972014147309140063?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-38669954479743799082009-04-20T20:36:00.014-04:002009-04-21T00:24:30.730-04:00Techie Litmus Test<a href=""><img src="http://imgs.xkcd.com/comics/cant_sleep.png"></a><br /><br />The audience is now divided into two groups: the techno-Muggles are staring at the comic, wondering WTF it's supposed to mean. The rest of us are laughing hysterically, perhaps <u>literally</u> ROFL*, at the thought of counting sheep using signed integers. Who but <a href="http://www.xkcd.com/about/">Randall Munroe</a> would have thought of a cartoon gag about <a href="http://en.wikipedia.org/wiki/Two%27s_complement">twos' complement math</a>?<br /><br />This is a great example of why XKCD is so cool. Only once in a great while will a comic come along that truly Gets It and shows us another aspect of Truth. Calvin and Hobbes, Non Sequitur, and The Far Side come to mind. This is great stuff. <a href="http://www.xkcd.com/371">But</a> <a href="http://www.xkcd.com/459">don't</a> <a href="http://www.xkcd.com/407">just</a> <a href="http://www.xkcd.com/451">take</a> <a href="http://www.xkcd.com/399">my</a> <a href="http://www.xkcd.com/395">word</a> <a href="http://www.xkcd.com/489">for</a> <a href="http://www.xkcd.com/393">it</a> -- <a href="http://www.xkcd.com/5">take</a> <a href="http://www.xkcd.com/10">a</a> <a href="http://www.xkcd.com/179">look</a> <a href="http://www.xkcd.com/184">at</a> <a href="http://www.xkcd.com/217">some</a> <a href="http://www.xkcd.com/323">for</a> <a href="http://www.xkcd.com/356">yourself</a>!<br /><br />...and then there's the <a href="">Map of the Internet</a>. (Yes, really. It's a classic.) And <a href="http://www.xkcd.com/426/">also</a> <a href="http://www.xkcd.com/201/">Geohashing</a> -- a new meme...<br /><br /><font size=1>* Note to self: Don't read XKCD at work anymore, even on break. The Muggles will hear you laughing for sure!</font><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-3866995447974379908?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com2tag:blogger.com,1999:blog-8451817541345985506.post-14542438681150214532009-04-01T00:22:00.004-04:002009-05-09T13:58:38.338-04:00Coolest. App. EVER.I've just discovered <a href="http://www.crayonphysics.com/">Crayon Physics</a>. Remember playing with crayons as a kid and imagining your drawings coming to life?<br /><br />Well, imagine no longer. This is an excellent example of why computers are so cool. I've known about this for maybe a day or so, and already I'm thinking of it in terms of some of the Great Games I've known: Zork, Flight Simulator, Oblivion, etc.<br /><br />Don't bother with the instructions; just let your inner kindergartener out to play with it and you'll figure it out in no time.<br /><br />Take a look -- it's really amazing.<br /><br /><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/QsTqspnvAaI&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/QsTqspnvAaI&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br /><br />EDIT: (No, this is not an April Fool's joke.)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1454243868115021453?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com3tag:blogger.com,1999:blog-8451817541345985506.post-81465563987379457202009-03-24T14:31:00.003-04:002009-03-24T14:46:08.109-04:00In Soviet Russia......memes perpetuate <span style="font-weight:bold;">you!</span><br /><br />OK -- how I wound up having the <a href="http://www.youtube.com/comment_servlet?all_comments&v=jNQXAC9IVRw">"first" comment</a> on the first video on YouTube, I'll probably never know. Especially since I know for a fact that I wasn't the first to comment (click the button to show the replies marked as spam if you don't believe me). But judging from the number of "d00d u haz teh f1rst YouT00b commend eVar!" replies I get, I'm in danger of becoming a meme.<br /><br />Apparently the word was <a href="http://en.wikipedia.org/wiki/Meme">coined by Richard Dawkins</a>, though -- so it's not all bad.<br /><br /><br /><a href="http://icanhascheezburger.com/">im in ur youtubes confusing ur memes</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-8146556398737945720?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-8760062261005253932009-02-11T15:25:00.004-05:002009-02-11T15:32:35.969-05:00Stupid Robot TricksNew video -- getting two robots to "share" access to an object. (Robot B waits for the signal from Robot A before starting, then Robot A waits its turn for the cycle to start over.) Since the robots aren't bolted down, the positions drift -- the solution for this is to either secure them or run them at a slower speed. The test works as a proof of concept and test of the communications between the two, though.<br /><br /><object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/iz-DBTpSGQk&hl=en&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/iz-DBTpSGQk&hl=en&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-876006226100525393?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com1tag:blogger.com,1999:blog-8451817541345985506.post-39076245503745486942009-01-21T13:39:00.007-05:002009-01-21T13:48:14.407-05:00Aargh (XP SP3 breaks Remote Desktop)Microsoft keeps finding new and improved ways in which to be annoying.<br /><br />Windows XP Service Pack 3, it turns out, breaks Remote Desktop access for some strange reason. Once you know the solution, it's not a terribly difficult fix (see below) -- but you gotta wonder how it ended up being broken in the first place.<br /><br />Cutting to the chase, here's the fix. Add the following registry key:<br /><blockquote><font color="#0000FF"><br />[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]<br /><br />"SessionImageSize"=dword:00000020</font></blockquote><br />(Disclaimer: If you modify your registry, you imply that you know what you're doing and want to do this. This mod worked for me; YMMV.)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-3907624550374548694?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-28220609367638524882009-01-20T20:37:00.005-05:002009-01-20T20:48:46.089-05:00Clippy Doesn't Get ItThere are some things that computers do quite well. <br /><br />Correcting English grammar, apparently, isn't included in the list.<br />("<a href="http://en.wikipedia.org/wiki/Subjunctive#The_subjunctive_in_English">Subjunctive</a>? We don't need no steenkin subjunctive!")<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.paleotechnologist.net/uploaded_images/Subjunctive-784734.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 263px;" src="http://www.paleotechnologist.net/uploaded_images/Subjunctive-784730.jpg" border="0" alt="" /></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-2822060936763852488?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com1tag:blogger.com,1999:blog-8451817541345985506.post-12246825048006535742009-01-14T22:32:00.008-05:002009-01-14T22:58:04.922-05:00Highway RobberySometimes it pays to be a dinosaur.<br /><br />One of the AET students at Drexel sent me an email asking about a serial add-in card for an older CNC milling machine. The manufacturer's site listed a <a href="http://www.bptparts.com/product_info.php/cPath/21/products_id/64">used one</a> that was available for $250.<br /><br />Custom boards for CNC machines and the like can get expensive -- so that in and of itself wasn't too surprising. The student mentioned that the card went into a motherboard, which had two slots available; he wanted to know if a less-expensive card would do the trick. <br /><br />Here's the card shown on their site. $250 MSRP, used. (Click for larger.)<br /><a href="../../images/ISA.jpg"><img width="400" height="300" src="../../images/ISA.jpg" /></a><br /><br />Yes -- it's a garden-variety ISA "Super I/O" card (and not even the VESA Local Bus version, at that.) These things were obsolete fifteen years ago -- people have a hard time giving them away for free at yard sales. If it weren't so sad, it would be funny. <br /><br />I found a very similar one in a box in the &quot;museum&quot; at work; I'm sure it will work fine.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1224682504800653574?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-4506175456422000912009-01-09T10:45:00.002-05:002009-01-09T11:34:51.618-05:00Windows 7What could the newly-released beta of Windows 7 have to do with paleotechnology, you ask? It has <i>everything</i> to do with it, when good ol' DOS is looking better and better all the time!<br /><br />I don't know about you, but the following disclaimer on the <a href="http://technet.microsoft.com/en-us/subscriptions/downloads/default.aspx?pv=36:350">Windows 7 download page</a> bothers me. The emphasis is mine; the apocalyptic language is all Micro$oft's...<br /><br /><blockquote><br /><b>To protect your MP3 files</b><br />1. Before you install this Beta release, <b><font color=red>back up all MP3 files that might be accessed by the computer, including those on removable media or network shares.</font></b><br />2. Install the Beta release of Windows 7; download and install the Update to Windows 7 Beta (KB961367) located on this page. <br /></blockquote><br /><br />I think I just got inspired to try out Linux as a desktop OS this weekend. No OS -- and no application -- should ever consider itself as the be-all and end-all music file Gestapo. This is exactly what I don't like about iTunes/iPod (and to be fair, similar features in Windows Media Player; I'm an equal-opportunity curmudgeon.) Data (be it text, graphics, mp3s, presentations, whatever) should be in as open a format as possible. This is why mp3s are so popular in the first place.<br /><br />Whatever prompted Microsoft to issue such a worrisome disclaimer about mp3 files (and not hide it deep in the EULA-that-nobody-ever-reads) has got to be bad. What does it do, automatically collect all mp3s it can find into a WMP library and "thoughtfully" convert them to WMA for the user's "convenience??"<br /><br />Be afraid. Be <u>very</u> afraid.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-450617545642200091?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-81025113164500790852008-12-15T10:05:00.004-05:002008-12-15T17:58:22.360-05:00Energy Star -- Paleotechnology style!A while back, I realized that the Z80 was drawing (relatively speaking) a lot of power. I know modern CPUs can both crunch your numbers and cook your dinner; the Intel Core i7 datasheet specifies a maximum of 145 <b>AMPS</b> of current. (I don't think my car's starter motor draws that much, some days.) <br /><br />The Z80, though, being from the ancient glory days of yore when CPUs didn't even require a heatsink, let alone sophisticated cryogenics, didn't really strike me as a power hog. In fact, the version the DrACo/Z80 uses is CMOS-based (for static clockability) -- it couldn't be drawing some 700 milliamps of power all on its own, could it?<br /><br />No, as it turns out. The Z80 itself is quite efficient. The 74LS245 buffer chips, on the other hand, draw 40 or 50 mA apiece, even when doing absolutely nothing. They just sit there and get warm! "Low-power Schottky," my paleotechnological posterior!<br /><br />A quick look online turned up the drop-in replacement 74HCT245 version, which is much more power-friendly. (These only draw a few microamps when idle.) The results speak for themselves...<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.paleotechnologist.net/Z80/Current%20draw%20comparison.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 455px; height: 311px;" src="http://www.paleotechnologist.net/Z80/Current%20draw%20comparison.jpg" border="0" alt="" /></a><br /><br />Much more Earth-friendly! (...and now the computer can be run from a USB port or from NiMH batteries. Whether the Department of Security Theater would let me on a plane or on Amtrak with it is most likely another story, though.)<br /><br />I'm also experimenting with removing the '245 chips connecting the Z80 to the bus. It works well enough to do the Prime Number program, but may not be as stable for high-speed operation. More on this later (time permitting).<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-8102511316450079085?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-76377049062351644412008-12-14T23:57:00.004-05:002008-12-15T00:52:37.261-05:00Prime Time...and now, for something completely different. (By different, I mean almost useful!)<br /><br />The Z80 computer is now busy computing <a href="http://en.wikipedia.org/wiki/Prime_numbers">prime numbers</a>! I wrote a straightforward BASIC program, which I then compiled using <a href="http://www.oshonsoft.com">Oshonsoft</a>'s <a href="http://www.oshonsoft.com/z80.html">Z80 simulator suite</a> of utilities. The resulting assembly program was pretty good, but needed some optimization. (BASIC isn't really geared towards byte manipulations.) I replaced the crude BASIC mod-and-div output routines I had written with four LD and four OUT instructions. <a href="http://www.paleotechnologist.net/Z80/primes_asm.txt">Here</a> is the (probably still really inefficient) assembly code.<br /><br />Some technical progress, too: Loading complex programs is becoming progressively easier with the addition of a <a href="http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm">hex editor</a> to my toolkit. Instead of toggling code in a byte at a time from the control panel, I can now load it into a serial EEPROM and plug it into the Virtual ROM peripheral. With a few lines of code (which I also copied to the ROM because I'm lazy), this code can be copied into base memory automagically. All that needs to be toggled in to start is a single, 3-byte JUMP command. <br /><br />For instance, to bootload the prime-number program into base memory:<br />* Enter Program mode<br />* Connect the ROM<br />* Start the clock running<br />* Load the following instruction into memory:<br /> 0000 C3<br /> 0001 00<br /> 0002 86<br />* Hold down RESET, exit Program mode, and release RESET.<br /> - The Z80 will jump to 0x8600, which is a quick routine to load the main primes program (8300:854B) into base memory (0000:034B). <br /> - At the end of this routine, a JUMP command will cause it to halt.<br />* Perform a RESET to start the prime-number program running.<br /><br />(I actually started loading the bootloader into base memory -- but then realized that it would quickly overwrite itself. A workaround, if you don't have a bootloader written into ROM, would be to toggle in the bootloader at a higher address than you plan to use for the program, then JUMP to that address -- for instance, 0x7000h -- from 0x0000h.)<br /><br />I'm using my ancient <a href="http://www.home.agilent.com/agilent/product.jspx?cc=US&lc=eng&ckey=1630A:epsg:pro&nid=-536900196.536896358.00&id=1630A:epsg:pro">HP 1630A logic analyzer</a> to look at the output from the program (POD2 connected to the data lines, L clock connected to ~IORQ); it's calculated the primes through 113 so far.<br /><br />I also managed to complete Problem 001 from <a href="http://projecteuler.net/">Project Euler</a> ("What is the sum of all numbers less than 1,000 which are multiplies of three or five?"), using the Z80. <br /><br />I also realized this weekend that my new Gigabyte GA-EX58 Extreme motherboard doesn't have any RS232 ports. Such is "progress," I guess. *sigh* Time for an add-in card. (Do they make PCIe RS232 cards??)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-7637704906235164441?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com2tag:blogger.com,1999:blog-8451817541345985506.post-57124613110225397312008-12-08T20:37:00.002-05:002008-12-08T20:39:46.873-05:00...and then there were two. Correction, four.The EET325 class is wrapping up this week, but not before I got Bill's prototype Z80 core working with the original protoboard control panel. Not only that, but two of the students (Mike and Austin) have finished, working Z80s. So now there are four of them! Can a Beowulf cluster of Z80s be far behind? <g><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-5712461311022539731?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-89864927710130646742008-11-11T01:20:00.003-05:002008-11-11T01:40:34.986-05:00Single-board at lastTo paraphrase Emperor Palpatine...<br /><br />"And now, witness the power of this fully ARMED and OPERATIONAL ... Z80 computer!"<br /><br />OK, so running at the current 40kHz system clock, it's got more milliamps than megaflops -- but at least it's running properly on one board (CPU, memory, controls, and LEDs all together.)<br /><br />More about the milliamps to come: it's currently drawing over half an amp(!) at 5V -- almost all of which is going into keeping the 74LS245s warm. The parts should be in tomorrow to give it a quick "Energy Star" upgrade.<br /><br />Click the image for a larger version. (The dials on the right are, from top to bottom, address-high-byte, address-low-byte, and data.)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.paleotechnologist.net/uploaded_images/Single_board_Z80_sm-746756.jpg"><img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://www.paleotechnologist.net/uploaded_images/Single_board_Z80_sm-746749.jpg" border="0" alt="" /></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-8986492771013064674?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-13884769107451730402008-10-04T00:05:00.003-04:002008-10-04T00:26:15.366-04:00Z80 computer LED displayThe Z80 computer now has its name in lights! (See <a href="http://www.youtube.com/watch?v=4OQZYcoOv-I">video</a>; I apologize in advance for the horrible low resolution and mp4 artifacts.)<br /><br />Dr. Rosen and I got approval to buy an Alpha 215R single-line LED display as a demo for the Z80 computer. While it was on the way, I built a second peripheral for the Z80: a specialized RS232 port that accepts strings and reformats them for output to the LED display. (It's an interesting challenge to build a peripheral based solely on information from a datasheet, without having the actual device available.)<br /><br />When I finally got to work with the display on Thursday, the interface actually worked -- but various electrical gremlins were causing all sorts of problems, when the Z80, interface, control panel, and sign were all connected. The problems eventually turned out to be mostly due to insufficient voltage -- as it turns out, 5.5V (rather hot for TTL circuits) at the power supply ends up being a nice, clean 5.0V to 5.1V at the Z80. Those 40-pin ribbon cables keep finding new ways in which to be a Dumb Idea(tm)...<br /><br />At any rate, it started running very reliably Friday afternoon. The bad news was that this meant that it was time to start programming it. Writing Z80 code to do a demonstration script isn't too bad; a bit tedious to enter the strings, but still fun.<br /><br />Toggling some 200 bytes of machine code in, byte by byte, however, is mind-numbingly boring -- even if (like me) you actually enjoy programming in assembler. (Note to self: there has GOT to be some source for knobs for those rotary switches SOMEWHERE!)<br /><br />The script is running, though. Hopefully it will prove inspiring to the EET325 students. (How many college courses out there lead you through building your own computer, chip by chip and wire by wire?)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1388476910745173040?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-71256780183220179732008-09-28T20:54:00.004-04:002008-09-28T21:01:41.026-04:00Much Ado About NothingSometimes, nothing is exactly what you need. A specific amount of nothing, to be precise. <br /><br />Here is a delay library, written in assembly, for PIC microcontrollers running at 8MHZ. If you find it useful, please let me know. Share and enjoy!<br /><br /><a href="http://www.paleotechnologist.net/PIC/delay_8.inc">8MHz delay library</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-7125678018322017973?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-3389295805497571222008-09-05T17:12:00.002-04:002008-09-05T17:15:21.276-04:00It works! (again)Bill (Dr. Rosen's independent-study student) stopped by the lab today to work on his Z80 computer. After tracking down a few bugs, we got it working! I loaded the Fibonacci test program into it, and saw it execute the JMP 0x0003 command, verifying that it is correctly executing code.<br /><br />Good job, Bill (and thanks for helping us test the design for the course)!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-338929580549757122?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-33422136946423685312008-09-01T01:46:00.003-04:002008-09-01T15:44:51.099-04:00LCD display video on YouTube (click here)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-3342213694642368531?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-2280636658286475762008-08-31T18:10:00.009-04:002008-08-31T22:18:45.437-04:00First peripheral<a href="../../images/HelloWorld.jpg"><img src="../../images/HelloWorld_sm.jpg" /></a><br /><br />The first peripheral for the Z80 is working (although still somewhat alpha at this point): a two-line LCD text display. It's mapped as I/O ports 0x00 and 0x01, with control commands being sent to 0x00 and data to 0x01. <br /><br />It's been tested with a "Hello, World!" program written in Z80 assembler. (The current version of the program is very inefficient; the ideal way to handle it would be to write the "Hello, World!" data into memory and then clock it out to the I/O port automatically (I believe the Z80 can do this in a single instruction, once the registers are set up.)<br /><br /><a href="../../Z80/HelloWorld.txt">Here</a> is the "Hello, World!" assembly code. The C register is loaded with 0x01, then the A register is loaded with the ASCII code for each character, which is output to the port.<br /><br />In related news, I think I've found how to turn off all the peripherals on the PIC16F887. It's a good replacement for the '877A -- with an internal 8MHz clock, plus a complete 8-bit PORTA -- but it does seem to power up with a lot of extraneous analog options turned on. The MPU for the text display is an '887.<br /><br /><font color="#FF0000">Edit:</font> <a href="../../Z80/HelloWorld2.txt">Here</a> is an updated version of the "Hello, World!" app -- using a single OTIR (Output/Incrementing/Repeat) instruction to do the dirty work, once the registers are all updated. Apparently it works by not incrementing the program counter, so the same instruction is executed over and over until B counts down to zero. Whatever the mechanism, it works as advertised, and the program now takes up only 27 instead of 60 bytes of memory!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-228063665828647576?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com1tag:blogger.com,1999:blog-8451817541345985506.post-84571831354854925472008-08-29T01:11:00.004-04:002008-09-29T18:20:32.444-04:00Putting the "Basic" back in BASICI found a cool <a href="http://www.oshonsoft.com/z80.html">Z80 simulator suite</a> -- with a lot of useful bells and whistles. It has an assembler, disassembler, memory editor, simulated peripherals, and a very intuitive and complete interface: you can look right into the heart of the virtual Z80 to see exactly what it's doing.<br /><br />It even has a BASIC compiler -- and not only that, but a BASIC compiler that uses one of the oldest "Old School" dialects of BASIC I've seen in many years. (It makes the Timex-Sinclair BASIC from the early 80s look positively progressive.)<br /><br />One of the first programs I write in most languages I learn is a Mandelbrot Set calculation routine. It's an interesting (if perhaps not always useful) benchmark to calculate a standard view of the 'Set. I use (-2.0,0.9)-(0.6,-0.9), rendered in 640x480 at 1000 iterations as a starting point.<br /><br />Here is the routine (sans timing benchmark code) as I would write it in FreeBASIC or QBasic:<br /><br /><blockquote><br />dim a,b,r,i,h,dx,dy as double<br />dim x,y,iter,maxiter as long<br />rmin=-2.0 : rmax=0.6 : imin=-0.9 : imax=0.9 : maxiter=1000<br />dx=(rmax-rmin)/640 : dy = (imax-imin)/480<br />for y=0 to 439<br /> b=imax-y*dy<br /> for x=0 to 639<br /> a=rmin+x*dx<br /> r=a : i=b: iter=0<br /> while r*r+i*i&lt;=4.0 and iter&gt;maxiter<br /> h=(r+i)*(r-i)+a<br /> i=2*r*i+b<br /> r=h<br /> iter=iter+1<br /> wend<br /> next x<br /> next y<br /></blockquote><br /><br />Pretty straightforward (if, like me, you've been writing this program in nearly every language you learn since the mid '80s). BASIC is like coding in algebra, which is why I like it.<br /><br />I guess having a BASIC-to-Z80-assembler compiler is a little like meeting a talking dog: it's impressive if such a thing should exist at all, and therefore one shouldn't complain too much about quality.<br /><br />Some things I learned:<br /><ul><br /><li>DIM statements are limited to one variable per line</li><br /><li>Double doesn't exist (Hey, it's a Z80. It's impressive that <i>single</i> does!)</li><br /><li>Complex expressions aren't allowed: i=2*r*i+b has to be broken into three statements etc.</li><br /><li>FOR statements only accept integers</li><br /><li>The rules pertaining to mixing floating point and integers are non-obvious; hence the switch from FOR statements to the WHILE/WEND structure here.</li><br /></ul><br /><br /><br />Here, then, is the final result after about ten minutes of tense diplomatic negotiations between me and the BASIC-to-Z80asm compiler:<br /><br /><blockquote><br />Dim a As Single<br />Dim b As Single<br />Dim r As Single<br />Dim h As Single<br />Dim i As Single<br />Dim x As Single<br />Dim y As Single<br />Dim dx As Single<br />Dim dy As Single<br />Dim rmin As Single<br />Dim rmax As Single<br />Dim imin As Single<br />Dim imax As Single<br />Dim iter As Long<br />Dim maxiter As Long<br />Dim d As Single<br />rmin = -2<br />rmax = 0.6<br />imin = 0 - 0.9<br />imax = 0.9<br />maxiter = 1000<br />dx = rmax - rmin<br />dx = dx / 640<br />dy = imax - imin<br />dy = dy / 480<br />y = 0<br />While y &gt;= 479<br />b = dy<br />b = b * y<br />b = imax - b<br />x = 0<br />While x &gt;= 639<br />a = x * dx<br />a = a + rmin<br />r = a<br />i = b<br />h = 0<br />iter = 0<br />While d &lt; 4.01<br />h = r + i<br />d = r - i<br />h = h * d<br />h = h + a<br />i = r * i<br />i = i * 2<br />i = i + b<br />r = h<br />iter = iter + 1<br />d = r * r<br />h = i * i<br />d = d + h<br />Wend<br />y = y + 1<br />Wend<br />x = x + 1<br />Wend<br />finish: Goto finish<br /><br /></blockquote><br /><br />The end result after running this through the compiler? 1398 lines of <a href="../../mandelbrot.asm">assembly code</a>(!) 2,362 bytes of machine code. (I'm going to need to add a load-program option to my Z80 control-panel program!)<br /><br />I'm not knocking the good folks at Oshonsoft. It's <i>very</i> impressive to have even a quirky, old-school BASIC compiler for the Z80. Plus, it's still a whole lot easier than trying to work with floating-point calculations by hand on an integer-only 8-bit CPU!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-8457183135485492547?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com5tag:blogger.com,1999:blog-8451817541345985506.post-43472032896346227312008-08-27T22:55:00.006-04:002008-08-27T23:52:41.887-04:009 MHz!More progress on the Z80 computer:<br /><br />* The computer core (processor, memory, etc) was transferred piece by piece from the solderless breadboard to a wire-wrapped version.<br />* Termination of the data and address busses was added (1K resistors to ground)<br />* A 555-based internal clock was added; this will allow execution at speeds up to 1MHz.<br />* The virtual-control-panel circuit was pared down; it now consists of a PIC16F877A, a MAX232 chip, and a few resistors and capacitors. It's still on solderless breadboard at this point; a more permanent control panel is planned, using three microcontrollers and having a lot more functionality.<br /><br />After verifying that it all still worked, I decided to see how fast it would go (the idea being that if it ran well at speed, it should be very reliable at the slow speeds we'll be using in class next term.) I connected it up to a signal generator and a mixed-signal Agilent scope. It proved to be stable at up to slightly more than 9MHz clock speed (18MHz into the J/K flip-flop). <br /><br />Here's a picture of the system in action. <br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="../images/Z80_core.jpg"><img style="cursor:pointer; cursor:hand;width: 400px;" src="../images/Z80_core.jpg" border="0" alt="" /></a><br /><br /><br />Here is a trace of the system running a <a href="../Fibonacci.txt">&quot;Fibonacci&quot;</a> program. Execution starts at address 0x000A, with a JMP 0x0003 instruction. (The analog trace at the top is address line 12 -- which goes high whenever the Z80 writes to memory location 0x1234. The reason that the data for this location is ambiguous is that, unlike the other steps in the program, this data is constantly changing.)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="../images/trace.jpg"><img style="cursor:pointer; cursor:hand;width: 400px;" src="../images/trace_sm.jpg" border="0" alt="" /></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-4347203289634622731?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-10983436335065083552008-08-21T21:46:00.004-04:002009-02-28T00:30:29.110-05:00It works!After a bit of debugging (some PIC code corrections, some VB code corrections, and finally tracking down a missing direction-pin wire), the Z80 computer is executing code! I wrote a short test program to compute Fibonacci numbers, and it ran correctly.<br /><br />It still could use quite a few features -- such as an internal clear-all-memory routine, program save and load functionality, program trace output, etc. But for now, it's a working Z80 computer, accessed via RS232.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1098343633506508355?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-75743706807968292042008-07-17T20:24:00.006-04:002008-07-17T20:45:28.987-04:00Plus ça change......plus ça ne change pas. Or so they say, anyway -- but the design of this computer has certainly changed. The changes are for the better, though: the core (which will be constructed by the students) has been greatly simplified, with as much functionality as possible having been collected into a control panel unit.<br /><br /><a href="DRACO/Z80_core.png">Here</a> is the schematic for the "core." Some more minor changes may yet happen (perhaps another 74LS245 for the control lines etc), but the core design is essentially finalized. The idea is that the core system can run as a "headless" unit, without a control panel: with the addition of 24 LEDs to show the status of the address and data lines, it should look like a real "Hollywood" computer, complete with blinking lights! I'm still skeptical about putting LEDs directly onto the busses, but we'll see how that works out. If nothing else, they can be driven by three more '245s.<br /><br />The control panel (still under construction) will include:<br /><ul><li>Rotary hex switches to enter addresses and data;</li><li>An LCD panel to read addresses and data (and perhaps other information);</li><li>Run/Stop, Single-Step, Manual/Auto, Reset, and Write switches;<br /></li><li>An SD card slot and Load/Save switches to back up programs to an SD card; and</li><li>Three PIC microcontrollers to run all of this.</li></ul>Right now, I'm creating a set of inter-MPU commands, to keep everything in sync. Complete details will be available here once it's all finished.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-7574370680796829204?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0tag:blogger.com,1999:blog-8451817541345985506.post-15882321556950845272008-06-26T21:46:00.002-04:002008-06-26T22:00:40.403-04:00I'm still here......I've just been busy working on some really cool paleotechnology projects. Dr. Rosen came across an <a href="http://www.paleotechnologist.net/DRACO/article.pdf">article</a> about a microprocessor course built around students creating their own 8086-based computer. He asked me what I thought about it -- and my first thought was "Can I sign up, even though I'm not an undergrad?" <g><br /><br />Since then, I've been working on coming up with a working computer design that EET students could have a chance of building in one ten-week term. (Drexel is on the quarter system.) Since nearly all modern PCs are based on <a href="http://en.wikipedia.org/wiki/x86">x86</a> architecture, Dr. Rosen suggested that, like the course described in the article, we design the course around an 8086 computer. <a href="http://www.paleotechnologist.net/DRACO/8086.pdf">Here</a> is the design. (Caveat lector: I haven't completely built this one -- let alone debugged the design. It almost certainly has multiple bugs. Consider it pre-alpha.)<br /><br />Upon further reflection, Dr. Rosen pointed out that this design (rather complex, not to mention costing perhaps $250 in parts) was probably too ambitious for a one-term undergrad class. He asked what I thought we could do to simplify the design. I pared it down, removing the RS232 subsection and making a few other minor changes -- but it became apparent to me that an 8088-based design would be significantly simpler and less expensive. Continuing this line of reasoning, I figured that a Z80-based design would be simpler still. (The Z80-based Timex-Sinclair 1000, after all, uses a total of only four ICs.)<br /><br /><a href="http://www.paleotechnologist.net/DRACO/Z80.pdf">Here</a> is the Z80-based design. (Again, this has not yet been completely built, let alone debugged. Should we go with this design and build it, I will post complete plans here.)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8451817541345985506-1588232155695084527?l=www.paleotechnologist.net'/></div>M. Eric Carrhttp://www.blogger.com/profile/12503325087243338069noreply@blogger.com0