github/sowbug

Debugging a G35 Installation

Editor’s Note: This draft post was discovered tonight. It was probably written in 2012. “Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.” – Sherlock Holmes My home Christmas light installation is operational after debugging for several hours over the past week. They’d work for a while, but reset every few programs, and then freeze with odd colors. This was unexpected, as this physical deployment usually runs only my production-quality code, installed only after a bunch of testing in my office.

Read more »

Mike's Law of Too-Cheap Computers

Editor’s Note: This draft post was discovered tonight. It was probably written in 2012. The announcement of any suitably cheap computer will always generate intense demand. However, their actual availability will be delayed until the point where they cease to be suitably cheap. Examples: the $100 OLPC. The original $399 Eee PC. By the time either was purchasable through normal channels, either the price had risen or competitors offered comparable or better values, such that their pricing was no longer interesting.

Read more »

Bus Ninja vs. Bus Pirate

Editor’s Note: This draft post was discovered tonight. It was probably written in 2012. I recently wrote about my first experience with the Bus Pirate. I’ve been thinking more about the interactive menu-driven interface. I’m starting to come around to the idea that it’s the best approach. Not a great approach, but the best. Consider the alternatives. First choice: no UI at all. Hook up your logic analyzer or oscilloscope like a real engineer.

Read more »

Scaling the Supercharger network

The arrival of the Tesla Model 3 is the the electric-vehicle ecosystem’s make-or-break moment. With the Model 3, Tesla has solved the problem of delivering high EV range at low cost. If Tesla can deliver as promised, nothing more will be standing in the way of EV success. That is, nothing except charging. Today, electric cars follow the smartphone-charging model: plug in at home or work, do something else for a while (hours), and unplug.

Read more »

Self-imposed level playing fields

A theme develops. Taxi operators complain about the unfair advantage that Uber and Lyft enjoy from not having to comply with burdensome regulation: [We] expect more and more legislation will be passed that further levels the playing field. Yet taxi operators originally pushed for this legislation to keep out competition. Now car dealerships in a few states are trying to ban Tesla from selling cars directly to consumers, and once again they’re complaining about Tesla’s unfair advantage: [We’re] asking the Legislature to oppose special treatment for Tesla that will create an uneven playing field and give Tesla special exemptions not provided to GM.

Read more »

latest weblight interesting features of this spin

Latest WebLight. Interesting features of this spin are that it’s 2.0mm thickness (still a little thin but operational), and two-sided (thanks to Passerby for circuit tip). There are two bugs. One, the board was too wide. I forgot to resize it after removing the metal connector from the layout. So I filed down the edges around the USB connector, and it’s fine. Two, part of the top ground plane got disconnected from the rest, so the left LED’s ground is floating.

Read more »

Dell XPS 13 9350 doesn’t charge from USB

As far as I can tell, the latest 1.1.7 BIOS update for the XPS 13 removes the ability to charge via USB Power Delivery at 5 volts. I didn’t do a lot of testing, but I know that when I first got the machine, it did charge from a Nexus 6P charger plugged into the Thunderbolt/USB Type C port. Slowly, and the BIOS griped at boot, but it did charge. I’m pretty sure I lost the capability with the BIOS update.

Read more »

Dell XPS 13 9350 (2016)

These are my notes about what I’ve done to my new laptop. It’s the non-touch i5 8GB/128GB model, whose SSD is SATA and not PCIe. Threw out the Broadcom WiFi adapter and replaced it with an Intel 7265. Installed BIOS 1.1.7, which today is available only on the UK site. Installed Ubuntu 15.10. I shrank the Windows partition to about 45GB and otherwise went with the installation defaults. Installed the latest 4.4 kernel release candidate.

Read more »

Request: hobbyist remote control

I want a device that looks nice enough to keep on a coffee table, that has a small number of buttons, that emits well-documented RF signals in response to those buttons, that has some kind of reasonable security story, and that is manufactured in enough quantity that it’s cheap and not hard to find. This would be a hobbyist remote control. It would allow me to build ugly devices that I could hide in a cabinet, then control them with something not ugly.

Read more »

Homemade solder stencils

There are eight new WebLights in the world as of today! I did a short run of 10 PCBs (version a-seeed1) from SeeedStudio, placing the order November 10 and receiving it December 3. I decided to try making a solder stencil with my new Silhouette Cameo according to the excellent instructions from Cathy Saxton. I used 4 mil mylar for the stencil material. This required a blade depth of 3 rather than the 1 that Cathy recommended.

Read more »

Let’s encrypt: success!

Here’s what I did to get z.sowbug.com running with a Let’s Encrypt cert. git clone <https://github.com/letsencrypt/letsencrypt> cd letsencrypt/ ./letsencrypt-auto certonly --standalone -d z.sowbug.com sudo tar cf etc-letsencrypt.tar.gz /etc/letsencrypt gpg -c etc-letsencrypt.tar.gz (scp etc-letsencrypt.tar.gz somewhere safe) sudo su - apt-get install nginx cd /etc/nginx/ emacs sites-enabled/default Shove in results of Mozilla SSL Configuration Generator, with nginx/modern/1.4.6 selected. Delete ssl_trusted_certificate line (not sure what that is) Change to ssl_certificate /etc/letsencrypt/live/z.sowbug.com/fullchain.pem; Change to ssl_certificate_key /etc/letsencrypt/keys/0000_key-letsencrypt.pem; exit Emacs sudo /etc/init.d/nginx reload Looks like a lot of steps, but it was actually pretty easy.

Read more »

USB Type C

I’m getting close to declaring USB Type C Flag Day in my house. After that day, no new devices are to be purchased unless they use the new USB form factor. This includes not just phones and tablets, but also laptops. USB Power Delivery Flag Day is still some time off.

Read more »

WebLight

WebLight is a WebUSB blinky light device. You plug it in to a computer running a browser that supports the WebUSB standard (currently only recent Chrome builds that have certain chrome:flags enabled), and without requiring any driver installation, it just works. Each LED module is RGB and individually controllable. The first prototypes aren’t much to look at. I intend the final version to use micro-USB and fit comfortably in a plastic LED-candle holder.

Read more »

Hot Plate Soldering

All the articles on the web are true. It’s possible to do high-quality SMD soldering at home. And it’s easy. First, acquire materials. Get a $14 hot plate and a $12 syringe of 63⁄37 solder paste. Then if you don’t have one already, get a multimeter with a temperature probe. Next, I recommend a roll of Kapton tape. And then finally, find some PCBs and surface- mount parts for practice. Now for the actual soldering.

Read more »

SMD Rework Station Works!

I got a $58 Hot Air Rework Station tonight, after obsolete WebLight prototypes were building up on my work bench as I was running out of ATtiny85s. Here’s the successful result.

Read more »

TP-Link TL-WR703N configurations

Two of them are here. They’re both useful.

Read more »

any idea on how to config the Eth0 on a 3com Audrey? thanks

No, sorry. I haven’t played around with the Audrey since 2001.

Read more »

Huge thanks for allowing others to use your code to run G35 Christmas lights. I do have one question I hope you can help me out with. I am unable to use six strings of 50 lights. They enumerate and complete a test pattern but the programs wont run correctly, usually just the first string will run. If I use just five strings everything works great. Tried an Arduino Uno and a Mega2560.

I’m 99% sure that the problem is that 50 x 6 is greater than 255, which is the highest value of an unsigned 8-bit octet. The G35 protocol wasn’t designed for really long strings. You’re next going to ask why the test patterns run. I’m 1% sure it’s because you’re hitting memory limits with the 328p. The test patterns are algorithmic and don’t consume per-light memory, but most of the patterns do allocate a certain number of bytes per light.

Read more »

hey mike - just moved and found an old audrey and was combing through the interwebs to see if anyone had any interesting images to flash onto it. dead link brought me here. also local. was seeing if you had anything archived away. i have all the ethernet hardware - just an old project I never got around to. cheers

Awesome! Give this a try: https://dl.dropboxusercontent.com/u/131036/audrey/audrey_redist.iso and let me know if you get anywhere with it. I am not sure whether those qualify as interesting, but they’re the originals that others used to build better ones.

Read more »

Enabling Yubico U2F Security Key on Chrome for Ubuntu 15.04

This works for the blue FIDO U2F key. Create a new file called /etc/udev/rules.d/50-security-key.rules: **SUBSYSTEMS=="usb", ATTRS{idVendor}=="1050", OWNER="root", GROUP="plugdev", MODE:="0660"** Once that file is saved, sudo udevadm control -reload-rules and then restart Chrome. Your security key, which previously was likely giving you a “An unexpected error occurred [retry]” message, will now work. I figured this out with the command udevadm info -n /dev/usb/hiddev0 -a, inspecting the output to determine that other solutions on the web were missing the S at the end of SUBSYSTEMS and ATTRS.

Read more »

Solar and in-person consultations

Begin rant. Home solar PV system installation is hot in California right now. It’s hard to get quotes efficiently. I’m pretty sure this is by design, but it’s still annoying. Your goal, as homeowner, is to get a lot of quotes so you can get a good sense of what the market looks like. Provide a Google Maps view of your roof along with a few of your past electric bills, indicate whether you’re interested in cash, financing, or leasing, and that should be enough for them to come up with a figure.

Read more »

How to generate a BIP0039 mnemonic in CLI Python

>>> import hashlib, mnemonic >>> b = hashlib.sha256("secret source of entropy").digest() >>> mnemonic.Mnemonic("english").to_mnemonic(b) 'slogan achieve entire maze regular crunch stem vivid fluid month ceiling penalty absurd love sort clarify absorb company drink dance excess know uncover eagle' That 24-word phrase is your BIP0039 recovery mnemonic. Substitute your own string for the secret source of entropy. Don’t be a goof and make it something cute or memorable that someone else will guess.

Read more »

Automatically shutting down an idle Minecraft server

Put this in /etc/cron.hourly/check_minecraft_server or maybe cron.daily depending on how much you care about paying extra server-rental charges: #!/usr/bin/python https://github.com/Dinnerbone/mcstatus pip install mcstatus from mcstatus import MinecraftServer import os server = MinecraftServer.lookup(“your-minecraft-server.com:12345”) status = server.status() if status and not status.players.online: print “Server is empty.” os.system(“shutdown now -h”)

Read more »

Any doubts that electric cars are the future are rapidly blown away within minutes of driving a Tesla Model S.

Any doubts that electric cars are the future are rapidly blown away within minutes of driving a Tesla Model S. –The Economist

Read more »

Things you can do with an offline Chromebook

To be included in this list, the functionality must really and truly work offline, and it must work without developer mode. I’m also excluding offline office-suite functionality, because Google Docs/Sheets and Gmail already have that covered. Write a term paper Watch a movie Read a book Edit a photo Take a selfie Run an Android app Record a quick podcast Take notes and make lists Play Sudoku Play an old DOS game Hack on Python Hex-edit a binary file Develop a Chrome App Scan a QR code Reprogram quadcopter firmware Add up some numbers (built-in Calculator) Copy files to/from USB drives (built-in Files app) Work with zip archives (built-in Files app) Play local movies and MP3s (built-in media player) What else?

Read more »

clockgif for Ignite-style presentations

If you want to use Google Slides to make an Ignite-style presentation where the 20 slides are each 15 seconds, throw this animated GIF in the corner of the master. Want to make your own? Check out the repository and customize it. There are 20 copies of the 15-second sequence in the GIF. This is for two reasons. First, Slides doesn’t reload the GIF between transitions, so if you had a single 15-second non-looping GIF, it would halt after the first slide.

Read more »

Trezor setup for the paranoid

Ingredients A regular sheet of paper, preferably acid-free A piece of cardboard that you don’t want anymore Four different pens Four security envelopes (kids: a security envelope is an envelope that has patterns printed on the inside to make it hard for people to hold the envelope up to a light and see what’s written inside) Instructions Fold the paper in half, then in half again, so that you have four quadrants.

Read more »

My Minilock ID

2EGpxvsQJvWxeSin7q7W9Us4Y2cZeieNYT1EFBRvukiP7f

Read more »

Chrome Apps I/O Bytes Video: The Extras

This video was lots of fun to prepare and record. But to be honest, when your main goal is to talk about your teammates’ accomplishments, it’s always going to be fun! François Beaufort linked to the video on Google+, and in the comments I promised to list all the products and technologies shown or used during production. There is a lot of paperwork involved in getting the permission and rights to explicitly reference other people’s products in a Google-produced video, but there’s nothing wrong with using them in the video, so that’s what I did!

Read more »

How to play Minecraft on a Chromebook

First Time Get your Chromebook into Developer Mode. Install Crouton. This guide will assume the installation command you use is sudo sh -e ~/Downloads/crouton -t unity -r saucy and that when you are asked for a new username/password, you enter user/user. sudo apt-get install gnome-terminal (to avoid going crazy) ** sudo apt-get install python-software-properties software-properties-common** sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer sudo apt-get update sudo apt-get install minecraft-installer Just to be sure you start from a good place, reboot your Chromebook at this point.

Read more »

Lights

Supercapacitor + incredibly high efficiency LED. The light switch is actually an inductive-charging receiver. To switch on the light, you place your phone near the switch. The phone charges the supercapacitor, and the light stays on for a reasonable amount of time. Application: a picture frame, hung on the wall, where you want to be able to provide spot lighting for the picture but don’t want to run wires to it.

Read more »

Dad, you smell like science.

Dad, you smell like science. – My four-year-old daughter (Perhaps my proudest moment as a parent. She said this after I’d been working with etching chemicals for a few hours.)

Read more »

Generating elliptic-curve keys in OpenSSL

Generate a key: openssl ecparam -name prime256v1 -out new-ecdsa-key.pem -genkey -noout Show the key just generated: openssl asn1parse -in new-ecdsa-key.pem Generate the public key corresponding to the given private one: openssl ec -in new-ecdsa-key.pem -pubout -text -noout

Read more »

paSSSphrase: safely store secrets for your successors

My latest GitHub project, paSSSphrase, was inspired by a recent Instructable about electroetching digital assets. The basic idea is to split a strong passphrase among multiple shares according to Shamir’s Secret Sharing algorithm, then generate an inverted/mirrored image of the shares as QR codes. The image transformations make for an easy electroetching stencil. So far I haven’t actually done this process for a secret I care about. But I thought electroetching was interesting enough to want to spend a few evenings working on it.

Read more »

Ten Things I Believe About Bitcoin

Bitcoin is not anonymous. The sooner everyone accepts this and stops saying otherwise, the better. Bitcoin is like cash, except every person you ever do business with writes down the serial numbers of each bill in a ledger that’s available to everyone forever. That’s not what most people would call anonymous. Bitcoin will not stick it to The Man. It’s romantic to think that Satoshi invented a parallel world where we can lead normal lives by day and rent nuclear-powered tax-free hookers at night.

Read more »

programming is terrible: Why your distributed social network will not work

programming is terrible: Why your distributed social network will not work programmingisterrible: Your post describes a ( ) protocol ( ) github repo ( ) manifesto ( ) kickstarter for a distributed social network. Your idea will not work. Here is why it won’t work. One or more of the following flaws may apply to your particular idea. ( ) You think “if you build it, they will come” (

Read more »

SSH keys on Git

Long ago on a Q&A site I used to frequent, I asked why GitHub didn’t let me associate a single SSH public key with two accounts. I had a work account and a personal account on GitHub, I wanted to use them both on one computer, and it’s a pain in the neck to get Git to use the right one of multiple SSH keys to connect to a single host.

Read more »

Serial console on Raspberry Pi

If you have a CP2102-based USB-to-serial adapter, it’s very likely to use 3.3-volt logic levels that are safe for your Raspberry Pi. I reviewed the datasheet for the chip, and any normal circuit using it would use the internal 3.3-volt regulator powered by the 5-volt USB bus, meaning that the I/O levels will be relative to Vdd (i.e., 3.3 volts). A recap of an excellent tutorial explaining how to get a serial console on your Pi: Hold your unplugged Pi so the GPIO header is close to you on the right side of the board, pointing up.

Read more »

Ikea Kilometer LED lights

I can’t find any description of these lights online. They’re like mini Christmas lights, with a gentle bluish glow that is too faint to read by, but too bright to be an all-night night light for my kids. A string of 48 costs $13: not cheap by IKEA standards, but reasonable. There is no switch. The AC adapter puts out 21 volts, 90 mA, which I’m guessing is DC because the low-voltage plug is polarized.

Read more »

Hello Mike, my name is Alex and I have recently started dabbling in the G35 Arduino lighting control. I recently purchased an Arduino Uno and was trying to set up your basic example sketch but can't seem to get it to load as it gives me an error "G35String" does not name a type. My goal is to set up some G35 lights w/ColorNode boards which I've purchased and populated, along with a JeeNode and JeeLink for control.

Have you followed the installation instructions exactly? I just did so with a clean Arduino installation, and it worked. The error you’re seeing suggests you’ve taken just the example sketch but haven’t installed the library.

Read more »

Like A G35 instructions

I’ve updated the README. A neighbor caught the G35 bug when he was at Costco, and he’s an Arduino enthusiast, too, so I’m giving him the third of my three prototype shields. He even gets working instructions!

Read more »

Daemon Downloader?

Sometimes I come across interesting things to download while I’m out and about, but I can’t download them (because I’m on a phone) or I’m at work (where I’d then have to figure out how to transfer them to home). These are things that are wasteful to sic Dropbox on. What I really want is to have a private email address I can email URLs, and whoever’s listening on the other end will cause my home file server to download the content (handling properly if the resource turns out to be a torrent).

Read more »

like a g35 is working shown here running last

Like A G35 is working! Shown here running last year’s Christmas program. I’ve already updated the G35Arduino GitHub project for Halloween of this year!

Read more »

Idea for easier Christmas light programming

As I get back into the Christmas spirit and think of more light programs for my G35 lights, I’m dreading doing more cumbersome C++ work for this simple class of programming. What if there were a simpler language that were custom- designed for light programming? What if I made an Arduino shield that ran these light scripts from an SD card? What if other people could share scripts on the internet?

Read more »

G35 Christmas lights are available at Costco

$64.99. That is all.

Read more »

Like A G35 v1.0 is already obsolete

As discussed earlier, Like A G35 should arrive soon from OSH Park. Even though it’s not here yet, I already know I blew it with the board design. The board will still work, but it could be so much better. In addition to the G35 protocol that I know and love, this board was supposed to support the WS2801 protocol. It turns out that WS2801 happens to work really well with hardware SPI, as do lots of other chips, such as the SM16716 and LPD8806, all of which are supported by the FastSPI project.

Read more »

Arduino sketch for WS2801-non-clone SM16716

I got a strand of 50 LED lights from “someone in China.” They were advertised as being WS2801-based, but they didn’t work with Arduino sketches for that chip. So now I have a 49-light strand, a sacrificial light that I had to rip apart to find the chip identifier (“SM16716”), and an Arduino sketch that proves that they work. Thank you, Google Translate, for help with the Chinese-only datasheet for the 16716.

Read more »

Like A G35 v1.0 is at Laen's!

Just submitted the design to the fancy new OSH Park site. This is my first time using the site since Laen turned the Dorkbot PDX service into it. The site has a bug or nit here or there, but the previewing feature is very nice. As expected, I ditched the RTC feature. But I kept the IR receiver. There are terminal blocks for three G35 strands, up to three independent WS2801 strands, and ample power for all passed directly through the fuseless micro-USB power- only connector.

Read more »

Like A G35, reimagined

Three months away from electronics can sure clear one’s mind! Maybe it was the vaporized lead. Rather than designing my Christmas-light controller project Like A G35 as a standalone AVR board, I have come to my senses and decided to make it an Arduino shield instead. The first iteration of the board started with the ATmega32U4, which is little more than an integrated Arduino in terms of capabilities, so I wasn’t adding any functionality by building the microcontroller portion myself.

Read more »

the rpio appearing to work with the raspberry pi

The RPio, appearing to work with the Raspberry Pi that arrived tonight. I haven’t soldered headers on the RPio (I’m still in disbelief that the RPi comes with male headers), so I’m establishing the connections with friction; that’s why the tweezer handle is holding it in place.

Read more »

My Printrbot LC setup experience (Part I)

This weekend I received my first Kickstarter reward: a Printrbot LC. Over about four hours I did most of the mechanical assembly. Here are my notes. Overall, the quality of the kit is excellent. The laser-cut wood parts are precise and snug, and they happen to smell good (lightly burned wood). Everything was appropriately wrapped and protected in the package, and most parts were there (see below). The power cable for the big power supply was missing.

Read more »

Hypna Go Go Goes 3D

In my continuing quest for lucidity, I’ve had trouble figuring out exactly when my personal REM phases occur at night. Preliminary measurements and intuition suggest that they’re happening quite early - as early as two hours after I sleep. So it’s not surprising that the Hypna Go Go, using a naive time-based scheduling algorithm, doesn’t seem to be doing a good job of guessing the answer, either. As an experiment, I’ve ordered an MMA8452Q accelerometer breakout board from SparkFun, and I’m going to build a new version of the circuit that starts the light programs when I’m not moving, which should be correlated with the hypotonia of REM sleep paralysis.

Read more »

New Project: Like A G35

Last year I took some good work by Robert Sun Quattlebaum and others and made an Arduino library that controls GE G35 Color Effects Christmas lights. For the 2011 season I whipped up a quick perfboard using a Teensy, and since then I’ve wanted to build a more permanent board that I might leave up year-round; after all, plenty of evenings call for fancy lighting. Why let Christmas have all the fun?

Read more »

RPio is assembled and (so far) working

I assembled one of the SeeedStudio boards and began testing. The power sections appear to work correctly, the project LEDs all behave as expected, and the TXB0108 I/Os are not surprising me (that’s a qualified statement because I haven’t yet run them all the way through their paces). I haven’t yet tried the two I2C circuits. Once I’ve completed this testing, I’ll have done pretty much everything I can before getting access to a real board.

Read more »

Hypna Go Go Algorithm Adjusted

The Hypna Go Go recently woke me up three times in one night. I’ve adjusted the lighting algorithm to fade in gently, and hope this will help. Update: Progress. I had a false awakening after this change, in which I took off my sleep mask and tried to shut off the HGG, but discovered the battery was getting weak. Then in real life my kids woke me up. I consider this to be progress because it was my first reaction to the lights where I didn’t wake up.

Read more »

OK Wake is done!

I ran through a full sequence Tuesday night and was happy with what I saw. So I’ve tagged the project FIRMWARE_WORKING_1_0_0, and after a morning or two to confirm that the actual devices are working, I’ll deliver one to my friend. It’s fun to finish projects. The Hypna Go Go is a practical device that I use almost daily, and now OK Wake has the potential to help a friend and his family manage their morning routine.

Read more »

RPio prototypes are here

Now all I need is a Raspberry Pi!

Read more »

OK Wake firmware, status report #2

Things are looking better. I wrote a unit test suite that is buildable with regular GCC, so I was able to get the arithmetic routines written quickly without coaxing tiny LEDs into telling me the microcontroller’s entire internal state. This worked well. I didn’t have to stub or mock out the hardware, but I could see doing that for a more complex project. I briefly dabbled in pure shift-based arithmetic (multiply by 205, shift right 11 times!) when I ran out of program space and took a hard look at the assembly with avr-objdump -S.

Read more »

OK Wake firmware, status report

I have the AVR and the PCF8523 communicating with each other, and the AVR is mostly able to manipulate its own EEPROM. Things are at least a couple bugfixes away from working end-to-end, though. Things I Learned Recently The RTC should be reset when the AVR starts up. It’s far too easy to leave it with sticky state that causes known-good code to misbehave. Fortunately, resetting leaves the time and alarms intact, so it’s nondestructive to do it regularly.

Read more »

avr-gcc and static initializers

In the avr-gcc FAQ, the question “Shouldn’t I initialize all my variables?” gives a hint why your nonzero static initializers aren’t working: [G]lobal and static variables that have an initializer go into the .data section of the file. I had been seeing static variables without a declared assignment correctly initialized to zero, but any nonzero initialization didn’t seem to be doing anything. But reading the FAQ led me to examine my makefile, where I found this interesting section: %.hex : main.obj $(OBJ2HEX) -j .text -O ihex $< $@ Aha!

Read more »

How I memorized π to more than 60 places

In high school I memorized pi to 18 places. It was easy; when you’re 15 years old you can achieve any mental feat imaginable. Knowing the number to excessive precision was useful when I was programming games or art projects, and when doing geometry homework, I would take a 10-second doodle break by writing the number out in the margin. Like the home phone number my mom made us memorize when we were kids (408-722-2997), the number’s now burned forever in my brain.

Read more »

Don't make this mistake with Arduino streaming APIs

This happened to me. Don’t let it happen to you. Write a constant somewhere, like Wire.write(0x06). In my case, this was sending an address to an I2C chip, but it could be Serial.write() or something else like that. Confirm everything’s working great. Later on, change to Wire.write(0x00). Get a compile error about how the function signature is now ambiguous because zero can be any of multiple types. Be specific: Wire.write(0x00, HEX).

Read more »

OK Wake as its own breakout board

I am not usually this smart. I was fretting about how to get accessible pinouts to the tiny SOIC-8 PCF8523 while developing the OK Wake firmware on an Arduino. I thought about dead-bug wires, or picking up an SOIC breakout board from a local store, or doing something ugly with perfboard. I briefly explored repurposing an old unpopulated PCB, like maybe the third Hypna Go Go PCB from Laen, which uses an SOIC-8 for its ATtiny13a.

Read more »

first two ok wake boards i assembled them and

First two OK Wake boards. I assembled them and wrote a quickie program to test that everything was wired up properly. I haven’t yet run the PCF8523 real-time clock through its paces, but everything else is working properly. This board is going to require some nontrivial firmware, and I haven’t ever worked with I2C (or the generic-brand TWI, or two-wire interface) on an AVR, which means this is going to be a significant opportunity to learn.

Read more »

Hypna Go Go Scares the Crap Out of Me

A couple nights ago I had my first Hypna Go Go-influenced dream. I don’t remember what had been happening in the dream, but suddenly a bright drag-race-Christmas-tree-style pole of lights appeared right in front of me. I realized that this was my signal that I was dreaming. Unfortunately, I couldn’t shake my dream-world concern _why_ the big red lights were flashing; was it an ambulance? Was it a traffic jam or an accident?

Read more »

the first pcb version of the hypna go go works

The first PCB version of the Hypna Go Go works just fine!

Read more »

Awesome work on JTAGWhisperer! Been reading all about this project and ran into a hitch. First my setup... I'm using an Arduino Duemilanove with 4 channel bidirectional logic level converter and trying to program my Taio xilinx Coolrunner II (XC2C64A). I get the ready to send output, and then confirmation that the device is ready. After that it freezes after sending 32 bytes, no matter what xsvf I try and program to the CPLD. TDO is high at 3.3v on the CPLD, but just hangs. Any thoughts?

When I was debugging this thing, the Arduino serial connection (which uses software flow control, a.k.a. no flow control) was getting confused or falling behind. Try setting both sides to a very low bitrate (like 9600 or 2400). Do you have a logic analyzer? That was invaluable in isolating problems. Are you sure that the target board doesn’t have any jumper/power requirements? My board needed two power sources: one for the core, and one for the I/O.

Read more »

Making more geeks, one geek at a time

Please pardon a slightly off-topic post. This isn’t about electronics, but it’s about making more people who might make electronics, so it’s almost relevant. Saturday afternoon my seven-year-old son asked if I’d let him play Quake 3 on my desktop computer. I said sure and walked him through bringing up the Ubuntu Unity menu, typing in “ioquake,” and so on, until he’d started a multiplayer game populated with several bot enemies.

Read more »

Hi Mike, This is really cool (JTAG Whisperer). I am really interested in trying this out with a Teensy 2, wwwpjrccom. I have a couple on hand right now. Those will run "serial" at about 1.1 MByte/sec. Jack also sent me a C/Wing board... so I can try programming it. Question: the Python side of things. What do I need to do to set up Python, where is your code, etc. I have never done Python. I do like communicationg with Arduino thru Microsoft's free C# Express. That might be another option...

Python’s at www.python.org. The blog links to the GitHub project, and it’s the top hit on Google for “jtag whisperer.” If you have trouble running it, let me know. I’m not going to be the best authority on setting up Python, but there are (probably) a zillion howtos out there. Good luck and let me know how it goes!

Read more »

Where to buy? ... i want it nowwwwww!

Hi there, thanks for writing. Which project are you talking about? I’m working on about a half-dozen right now.

Read more »

Hello World on STM32F4 Discovery

I got a blinking LED (the embedded Hello World) on my STM32F4 Discovery board. It probably would have been easy to do, except that I was on OS X. Here are the steps I took: Tried a bunch of stuff. Switch to Linux. Tried a bunch more stuff. Took a break. Found this extremely correct page, which helped me build a real ARM toolchain. Built stlink. Built some of the stlink samples.

Read more »

AVR Programmer, /HWB, and HWBE

I made a minor error in 1.0 of the circuit. I was so proud of myself for noticing that external pullup resistors were redundant when the AVR’s internal pullups were activated that I neglected to put a pullup on /HWB. This is the pin that, when the HWBE fuse is programmed, should be high to run normal application code on reset, and low to start the bootloader. Instead I’m seeing the bootloader always running on reset, meaning that the BOOT solder jumper does nothing.

Read more »

AVR Programmer 1.0 is Built and Working

The boards arrived from Dorkbot yesterday. I learned my lesson from last time and assembled all three in parallel (taking the risk that the circuit was bad and that I’d waste 3x the materials). I flashed the bootloader to the first one using the alpha version of the board (in the back with the blue shunt), then self-programmed it over USB with the AVRISP mkII firmware. Final test: I read the fuses from my Hypna Go Go’s ATtiny13A, and I got the lovely Device signature = 0x1e9007 that seems to play a critical role in many dreams I recall nowadays.

Read more »

AVR Programmer, AVRISP mkII: About a bug

I had a good debugging session over the last few nights and want to write down my notes here. The AVR Programmer initially worked with a target ‘328p, but it hung when programming a second build of the board, and then again on a particular ATtiny13A that I was using for the Hypna Go Go. Oddly, it worked for another ‘13A that I was using on the same project. The board was flaky, and as a result, I couldn’t keep my promise to myself to never again ISP-program another AVR without a programmer I’d built myself.

Read more »

Debugging the AVR programmer (discussion)

Debugging the AVR programmer (discussion)

Read more »

Hypna Go Go Results, Day Nine

Regular readers will recall that I haven’t had much hypnagogic luck with my blinking LEDs. I theorized first that the lights weren’t bright enough, and second that I wasn’t remembering my dreams no matter how fantastic they were turning out to be. Theory #1: LEDs too dim I found some better bulbs: water-clear and quite a bit brighter. These are now so bright that they sometimes wake me up. I’m going to try putting some masking tape over them to diffuse the light.

Read more »

OK Wake

OK Wake is a project for a friend whose kids are old enough to get out of bed on their own, but not yet old enough to read clocks, meaning that they tend to start waking up the whole house at 4am. As it gets close to wake-up time, the device starts gently blinking red. At the designated hour, it changes to green. That’s about it! The circuit is my first using a real-time clock.

Read more »

the 6 pin avr isp header is too damn big

THE 6-PIN AVR ISP HEADER IS TOO DAMN BIG

Read more »

AVR Power Management

I designed the Hypna Go Go schematic and board quickly in one evening and sent it to be manufactured that night. The next day I realized I’d forgotten to add a power switch, meaning I’d have to remove the coin-cell battery every morning. Or I could solve the problem in software. That’s what I did. You can read the code for yourself, but I took advantage of the fact that I already had a momentary button between ground and PB4 on the ATtiny for switching immediately into dream mode.

Read more »

The Hypna Go Go

I’ve seen these crazy lucid-dreaming goggle projects for years, but recently stumbled across a really simple one on Instructables. I happened to have all the parts around the house, so I made one. I’ve since improved the firmware and designed a real circuit board that is off at Laen’s. The improvements are that the circuit board is smaller, and the firmware is lower-power and better synchronized with a typical 8-hour-sleep REM schedule.

Read more »

nRF24L01+

I wonder why more makers don’t use the nRF24L01+ for wireless design. It’s almost free, it’s super-low power, it’s easy to use with SPI, it’s 5-volt tolerant, it’s plenty fast for 8-bit applications, and it just plain works. It might be because it’s available only in QFN, which looks scary.

Read more »

Which way is up on a surface-mount LED

To remember which way the cathode (negative) end is on a surface-mount LED, look at the green thing on the underside. It’s a tree, sticking into the ground. It looks like a ground symbol on a schematic. The ground end is ground. There you go. For some reason, SMD/SMT LEDs sometimes have a green stripe on the top. Sometimes it’s on the anode side, sometimes it’s on the cathode. As far as I can tell, it’s random.

Read more »

Emulating a 6809 in a slow ARM mcu

As a thought experiment I’m wondering about a different approach to Project 8821. The STM32F407VGT6 is a 168MHz ARM Cortex M4 processor with plenty of flash and RAM to handle Joust. Could it emulate a 1MHz 6809, drive resistor-ladder analog video, and output sound? I bet the answer’s yes.

Read more »

AVR programmer 1.0.1, and shopping cart

Dennis made some routing improvements after I sent the board to Laen, and I decided to switch to the ‘244 rather than ‘241 (not checked in yet). But the schematic hasn’t changed, so the PCBs we get back should be good enough to validate the design, so we won’t have this one manufactured until 1_0_0_FINAL comes back. I’ve created a partial shopping cart at Mouser. It’s missing the right-angle header and miscellaneous other headers that we intend to be optionally soldered by the end user.

Read more »

AVR Programmer 1.0

Just sent off DORKBOT_1_0 to Laen (yeah, we reuse version numbers around here). Interesting changes: Added an FTDI-cable-compatible header. This means the board has the hardware capability to do USB-TTL serial I/O, and it should be able to program Arduino Pros and other barebones Arduinos. Dropped the two ground pins on the VCC/3.3⁄5.0 header. The original idea was to make it possible for that header to act as a small power source, but it turned out to be a confusing opportunity for short circuits.

Read more »

The programmer works!

The boards tagged DORKBOT_1_0_1 arrived on Monday. I’d somehow forgotten to order the NX8045-package crystals, so I had to solder a temporary, silly-looking HC49 crystal onto the board. But otherwise, assembly went fairly smoothly. I followed the usual order of PCB population: add the power circuitry first, then power it up and read testpoints. All was fine. Then the “expensive” (i.e., two-dollar) parts: the ‘32u2, the buffer, and the sockets. More continuity testing, some examination under the USB microscope for solder bridges… and then fingers crossed while I plugged it in to USB.

Read more »

RPio Prototype #1 sent to the fab!

We fixed one huge issue where we were sending the I2C pins through the TXB0108, which would have ruined them except as GPIOs. Instead we’re leaving them as 3.3-volt I/O, but pulling them up to 4.7K, which should work for most practical purposes. After that fix and a little more routing magic, it was time to send them off to Dorkbot! We’ve gotten requests for a couple dozen RPios, which is a good sign considering that we haven’t tried too hard to spread the word, and especially considering that nobody has received a Raspberry Pi yet.

Read more »

RPio mockup for scale

Some reference objects for RPio scale. That’s a credit card (85.60 x 53.98 millimeters), which is the exact size of the Raspberry Pi. Next to it is a piece of card stock cut to the same 53.98-mm length, with the width the same as a 28-pin Atmel ATmega328, which is about 0.1 inches longer than the 26-pin GPIO header on the RPi. In case you couldn’t identify the other items, they’re a die and a U.S.

Read more »

RPio: A Raspberry Pi Breakout Board

RPio: A Raspberry Pi Breakout Board This weekend I whipped up a breakout board for the Raspberry Pi. The RPio bidirectionally level-shifts the GPIO pins between their 3.3-volt level and a more hobbyist-friendly 5 volts. It also provides more 3.3-volt power than the meager 50mA provided from the RPi’s expansion header. My own Raspberry Pi order isn’t due to be fulfilled until the late Spring, so I’m in no great big hurry to build my own.

Read more »

XMEGA Breakout Board

(Yes, apparently Atmel spells it in all caps.) Because the AVR Programmer will support SPI-based ISP, PDI for XMEGAs, and TPI for low-end ‘tinys, I need to acquire test targets of each kind. Unfortunately, XMEGA isn’t available as a DIP, which means it’s breakout board time. I’ve made a half-hearted resolution to design and build rather than buy tools where possible, because, well, because building is fun. That rules out buying the SparkFun board and Atmel’s own XPLAIN series (even though the Atmel boards are pretty reasonably priced for all the bells and whistles they include).

Read more »

Another picture of a bunch of wires

A breadboarded approximation of the AVR programmer. It confirms that the ‘125 operates as expected. I tested with all combinations of target and ‘125 powered at 5V/3.3V. An otherwise inert Uno looks on.

Read more »

AVRISP mkII emulation is working

Using my USPtinyISP, I burned the LUFA CDC bootloader to my 32u4. Then I bootloaded Dean’s LUFA-based AVRISP mkII- compatible ISP firmware onto it. Finally, I used the 32u4 masquerading as a mkII to read and set fuses on an ATtiny13a. What does this mean? It means that when the AVR programmer boards arrive from Laen, I ought to be able to quickly build basic firmware for them. Exciting!

Read more »

LUFA for Adafruit ATmega32u4 Breakout Board

LUFA is pretty amazing. If you’re into that kind of thing, you can make your USB-capable AVR microcontroller be 100 virtual serial ports, all communicating with other, all at once. I’m not sure why it took me a few hours to get even one virtual port to appear, but once I followed my own steps to restore my ‘32u4 breakout board to factory-fresh condition, it worked nicely. Here are my notes: To build any or all of the whole tree, get the source and then ** make MCU=atmega32u4 F_CPU=16000000 BOARD=ADAFRUITU4 FLASH_SIZE_KB=32 BOOT_SECTION_SIZE_KB=4 ** You’ll get various errors about missing joysticks, buttons, and ADC channels, and you’ll have to hack and slash the code to pretend your board has a joystick (I used rand() % 4 to simulate someone flipping around the joystick wildly) or whatever else is missing.

Read more »

AVR Programmer is off to Laen's!

I reached a good 1.0 stopping point, so I poured the ground planes, fired up the CAM processor, churned out the gerbers, and emailed 1.46 square inches of high functionality to Laen’s DorkbotPDX PCB service! Many thanks to DG who manually routed a interim version of the board, and shaved off all but four vias and about a half square-inch of PCB. Unfortunately I made a few more enhancements and added 14 more vias in the process.

Read more »

New Project: AVR Programmer

I’ve been trying to break the Joust rebuild project into meaningful chunks. My recent attempt at designing a circuit for manufacture in EAGLE didn’t pan out; it seemed both too big, because I hadn’t yet breadboarded all the sub-circuits as a single large circuit, and at the same time too small, because it would have been little more than those simple sub- circuits that I had successfully breadboarded. I’d have taken a lot of risk to fabricate a fairly boring PCB.* Rather than hem and haw about what exactly to build next for Project 8821, I decided to take Quinn’s approach and gain experience building a tool that I knew for sure I’d need: This is going to be an AVR in-system programmer and XSVF player.

Read more »

visited saleae tonight at their open house nice

Visited Saleae tonight at their open house. Nice guys, clean office, lots and lots of Logic and Logic 16 parts all over the place. My daughter found a broken aluminum shell as a souvenir. It would have been fun to watch them assemble one or to see the Logic 64 or Logic DS or Logic Vita or whatever they have next, but if any of that happened, we missed it.

Read more »

a very early and surely broken board layout on

A very early and surely broken board layout. On the left are the power jack, USB port, and micro-SD slot. The socketed chip in the middle is the SRAM, and the one on the right is the 6809E. The middle guys are the CPLD, an ATmega32u4, and the frickin’ huge oscillator that I will no doubt replace with an SMD version. A friend has graciously offered to do the layout for real, so I’m not too concerned about the ugly EAGLE autoroutes.

Read more »

Wanted: CLI EDA

That’s command-line interface electronic design automation. I’m surprised that hardware engineers design schematics and circuit boards graphically. By that I mean that they drag shapes around in a GUI editor. Behind the scenes all the polygons and line segments are being represented much more simply as Component A, Pin 1 being connected to Component B, Pin 2, or Component C at position (X, Y) on the surface of the board. Nobody in software design seriously uses graphical editors to make software, and if they do, it still gets checked into source control as plain-text, diff-able files.

Read more »

Free Range VHDL

Free Range VHDL This is a revised version of _The Lo-Carb VHDL Tutorial_ and the _Shock and Awe VHDL Tutorial_, both by Bryan Mealy. Recommended.

Read more »

Maxim DS1077 Programmable Oscillator

The Maxim DS1077 is a programmable oscillator. Instead of ordering different oscillators for each different project you have, you get just one on a SparkFun breakout board and program it, using I2C, for whichever frequency you need. And in fact, after some stumbles on my part, yes, it works. Things I Learned About the DS1077, The Hard Way The I2C interface (a.k.a. TWI or two-wire interface) depends on someone (i.e., you) to pull SCK and SDA high.

Read more »

Son of '9572 is alive

A good night’s rest didn’t help the ‘9572. It remains destroyed. After talking it over with a few people, I believe any of the following is possible: It was close to death already from having powered it from 5 volts for so long, and it simply gave out. I was careless with a logic probe pin and briefly touched two opposing outputs. While juggling pins on the UCF, I uploaded a new program that caused Possibility #2 to happen.

Read more »

On the Origin of Circuits

On the Origin of Circuits Dr. Thompson peered inside his perfect offspring to gain insight into its methods, but what he found inside was baffling. The plucky chip was utilizing only thirty-seven of its one hundred logic gates, and most of them were arranged in a curious collection of feedback loops. Five individual logic cells were functionally disconnected from the rest– with no pathways that would allow them to influence the output– yet when the researcher disabled any one of them the chip lost its ability to discriminate the tones.

Read more »

The '9572 is dead

I killed my CPLD Breakout Board. While taking pictures of the “successful” SRAM-loading VHDL I’d written and wired up, I noticed that the power LED on the board was off. I checked the connections, toggled the power a few times, tried re-running the logic analyzer, and eventually concluded that the board was dead. It draws 1.4 amps when I plug it in, and the CPLD itself gets pretty hot. As far as I can tell, everything else on the board is working (except for the power LED, which now appears to be inert).

Read more »

my goodness id forgotten how hard it is to solder

The three boards, before assembly. WORST SOLDER BRIDGES EVER Board #1 working, next to proud sibling My goodness I’d forgotten how hard it is to solder surface-mount devices. But I did it, and one of three XC9572XL breakout boards is working. Rehash of experience in approximate order of occurrence: Wanted to work on a different, software project tonight, but the boards arrived in the mail and they were so purple that I had to work on them right away.

Read more »

not to blame these are two 100uf capacitors that

Not to blame. These are two 100uF capacitors that were recently on the main board of the Wells-Gardner 19” K7201 monitor in my Joust. They’d obviously burst over the years (notice the bulge in the cross-shaped tops), so I replaced them. Fingers crossed, powered up… and just as dead as before.

Read more »

discrete logic chip i hardly knew ye this is the

Discrete logic chip, I hardly knew ye. This is the 74HC109 (dual JK flip-flop) that I was using in my original Q/E clock generator circuit. Now that I’m using CPLD and mostly satisfied with the experience, I’m not sure when I’ll use these guys again.

Read more »

the top screenshot shows a perfect qe clock

Saleae Logic: 1MHz Q/E from 4MHz clock XC9572XL connected to oscillator The top screenshot shows a perfect Q/E clock signal generated using a 4MHz clock source. No biggie; we’ve seen this before. Right? The bottom photo shows what’s interesting about this particular clock signal. The XC9572XL is using my very first VHDL that I wrote all by myself, programmed using The JTAG Whisperer! I found a JK flip- flop out on the web, and wired up two of them using the recommended clock circuit in the 6809E datasheet.

Read more »

The 6502: A Documentary

The 6502: A Documentary Go Quinn! Go Bill!

Read more »

TTL Voltage and Current Cookbook Recipe

Now that I’m able to do something with this CPLD, I’ve been concerned about replacing $10 of discrete logic chips with a $2 chip that needs $8 of level shifters. Though the Xilinx XC9572XL is a fairly modern 3.3-volt device, I know its I/O pins are 5-volt tolerant, meaning that I can send in a 5-volt signal from my circa-1980s 5-volt 6809E. But the ‘72’s _output_ voltage is selectable at either 3.3v or 1.8v, and not 5v.

Read more »

More than you ever wanted to know about electrical characteristics of JTAG

A few days ago I posted a very confused question about JTAG signals. Here is my less confused answer. You’ve surely seen the cup-or-face picture before, where some see two people looking at each other, and others see a single white chalice in the middle. Both groups are correct, and fortunately everyone can easily tell their brains to see the other image, too. That’s what happened with me and JTAG signals.

Read more »

it works yay the main problem all along was that

It works! Yay! The main problem all along was that I was running the board at 5 volts, not the 3.3 volts it needs. It was able to respond to JTAG commands at the higher voltage, but it correctly reported that it couldn’t write its flash memory under those conditions. I still need to update the README for the JTAG Whisperer, but the code in the repository should work right now.

Read more »

5.0 != 3.3

I just realized that the XC9572XL’s “5-volt tolerant I/O pins” do not mean that the device itself can be powered with 5 volts. It’s a 3.3-volt device. I’ve been running it from the Arduino’s 5-volt supply. Sigh. With this newly understood information, I hope to discover that the JTAG Whisperer is working correctly, and that the incorrect voltage was preventing the CPLD from programming itself. Other possibilities are (1) my code is still buggy but the CPLD is happy to be finally running at the right voltage, and (2) I’ve fried my poor little ‘9572.

Read more »

JTAG TCK: active-low?

Why does it seem like the JTAG clock signal is active low? Consider this snippet from Xilinx’s XAPP058 source code. /* toggle tck LH. No need to modify this code. It is output via setPort. / void pulseClock() { setPort(TCK,0); / set the TCK port to low / setPort(TCK,1); / set the TCK port to high */ } This means that when the clock isn’t being pulsed, it’s high. Right? If so, why don’t any descriptions of JTAG’s electrical characteristics say it’s active low?

Read more »

The JTAG Whisperer

Available here on GitHub. The JTAG Whisperer turns your Arduino into a JTAG cable. Wow, sounds great! Here are the caveats: It’s actually just an XSVF player. This is a tiny subset of what JTAG does. The current architecture has the desktop load the XSVF file, then send it over serial to the Arduino. Since serial is going to be limited to the kilobits-per-second range of speed, it’s unlikely it’ll be suitable for more ambitious interactive JTAG operations.

Read more »

Linux on Nexys2?

All the search results for [linux nexys2] discuss how the heck you run that djtgtgtgjdsasdfghjkcfg Digilent tool on Linux. In other words, how do you program the Nexys2 on Linux? But what would it take to run Linux on the Nexys2, or a similar medium- sized FPGA? Can you just download an http://opencores.org/ processor that has a gcc toolchain for it, throw in some I/O controllers, and get the kernel booted up?

Read more »

Rescue guide for your Adafruit ATmega32u4 breakout board

The ATmega32u4 breakout board is a beta product. The hardware is essentially perfect, but the firmware is wonky. At least once, I’ve convinced myself that mine was broken, but I eventually figured it out. Here’s how to get yours back in shape. Things required to get all the way through these steps: The board A USB cable to connect the board to your computer A working copy of avrdude. If you have the Arduino IDE on your system, then it’s buried deep inside the IDE.

Read more »

Simple Virtual Machine

Simple Virtual Machine Summary: here’s how to design a computing machine and tools to build programs for it. Oh, and here are the actual machine and tools, too. I love articles like this because they’re a reminder of how simple computers are. They move electrons from one place to another in a predictable fashion. Sure, any hardware or software out in the real world is many times more complex than the little virtual machine in this article, but it’s reassuring from time to time to clear away the outer layers of computing and confirm that it’s quite simple inside.

Read more »

i feel like neo when the plug gets yanked out of

I feel like Neo when the plug gets yanked out of his head: “I know JTAG.” Except I really don’t, and it took three days instead of three seconds. JTAG is a little like SPI. You send bytes to the slave, the slave does something with them, and then you get bytes back. The protocol is clocked by the master, and you shift TDI bits out as you’re reading in TDO bits.

Read more »

Blog commenting added

I’ve decided that the “Write simple blog software with incredible commenting system” task on my to-do list will never get checked off, so I’ve given in and added Disqus commenting to this blog. I look forward to hearing from you!

Read more »

Found a good base for an XSVF player

Found a good base for an XSVF player Small world. Ben over at the Papilio Forums had almost the same needs as mine: wants to program an XC9572XL, prefers not to buy overpriced, single-purpose cables. So he adapted the XAPP058 reference code to a Papilio, cleverly using the desktop machine as a conduit between the potentially large xsvf file and the firmware. I didn’t try to get Ben’s code running on the Papilio, because I have a different strategy in mind.

Read more »

Arduino XSVF Player?

I want to program a Xilinx XC9572XL and refuse to buy a $50 dongle to do so. Keywords in my research so far: xapp058, XSVF, SVF, JTAG, arduiggler. There is an FT232-based version that seems very close to what I want, but it’s written in Visual Basic, of all things, and probably won’t work on a modern non-FTDI Arduino. If you’re reading this and do contract programming in exchange for karma, please write it in Python to avoid cross-platform issues!

Read more »

digilent nexys 2 running through its demo program

Digilent Nexys 2 running through its demo program. I completed a VHDL tutorial last night that displayed the hexadecimal version of the first four switches acting as bits. The Digilent Linux tools aren’t so great, at least compared to the screenshots of the Windows tools, but they do work after a little prodding. It’s odd that Digilent would consider their USB firmware proprietary, leading to a lot of inefficient effort on the part of various Linux hackers to reverse-engineer it.

Read more »

this is the version of the papilio one as built by

This is the version of the Papilio One as built by SeeedStudio. It’s possible that versions built by other manufacturers are slightly different; it’s open-source hardware, so in theory many people might build it. These notes are for Linux (Ubuntu 11.10 in my case). The headers arrive separate from the board. You’ll need to cut off sections with wire cutters, and you should expect and plan to sacrifice one pin per cut.

Read more »

Board design improvements

As I improve the board design in my head, I think I can eliminate the EEPROM and downgrade the ATmega to an ATtiny. The design will now read files off an SD card instead. The ATtiny will populate a bank of the SRAM and present that to the 6809 as ROM, using the CPLD as a stand-in for a series of ‘595s. The ‘tiny will also load the FPGA, both from files on the SD card.

Read more »

AND gate written

I got something to build in the Xilinx ISE: library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity foo is Port ( port0 : in STD_LOGIC; port1 : in STD_LOGIC; port_out : out STD_LOGIC); end foo; architecture Behavioral of foo is begin port_out <= port0 and port1; end Behavioral; All it does is (in theory) set a high voltage on one pin when a high voltage is set on two other pins. But it’s a start.

Read more »

Board sent off to the factory

No, not the replacement for the Mess O’ Wires. This is the Dangerous Prototypes XC9500XL CPLD Breakout Board. I’ve ordered from DorkbotPDX, and my batch should be going to the fab today. (As a side note, I don’t feel too bad about depriving DP of revenue. I own one of approximately every other thing they’ve sold, and I couldn’t wait for the many-week shipment time from SeeedStudio.) As I investigate (naively) the capabilities of this device, I’m pretty sure I ought to be able to duplicate all of Joust with the following: A Xilinx Spartan of some kind to reproduce the main chips (6809E, two 6821s, a 6808 for sound, and the “special” SC2) and a lot of the glue among them.

Read more »

VHDL

The concept of using software to design hardware that runs software will surely cause you endless hours of contemplation. I wasn’t prepared for the six-gig behemoth that is the Xilinx ISE, so it’s taken me longer than expected to get anything resembling Hello World going in that environment. By comparison, the Arduino IDE is pretty incredible. There’s a lot to be said for a relatively small download and easy installation process that leads to a blinking LED in maybe five minutes.

Read more »

Digital Logic Pocket Data Book (PDF)

Digital Logic Pocket Data Book (PDF) This is close enough to my request for 7400-series trading cards. It’s concise enough that I can scan it quickly and probably find an existing chip that does what I want.

Read more »

address and data bus lines are now connected

Address and data bus lines are now connected between the ‘595s and the SRAM. The breadboard has gotten unworkable. It’s time to take a different approach. Choices: Move to protoboard and do permanent wiring underneath with headers on top for further experimentation. Split out into two or more breadboards with ribbon connectors between them. This isn’t actually any better than what I have now, but it’d be a chance to refactor the wiring and IC arrangement.

Read more »

Theseus

In the middle of a great email exchange with Sean Riddle (the all-time PageRank leader for Williams hardware and software), and the Ship of Theseus came up. It’s an old philosophical puzzle where a ship sails around the world, in the process having broken and worn-out parts replaced as needed. By the time it arrives back in its home port, every part has been replaced. Question: is it still the same ship?

Read more »

one of the 595s the one holding the data byte

One of the ‘595s (the one holding the data byte).

Read more »

the 595 loading code worked on the first try

The ‘595 loading code worked on the first try, which I can explain only because I found the cascading shift-register logic unintuitive at first, until I realized I got to make up the rules about endianness, data/address order, etc., and at that point I had the whole sub-project fully in mind. Usually a great time to bang out a few dozen lines of code! On the screen you can compare the bytes to be loaded ($12, $12, $12, $0e, $fe) with the lower nibbles implied by the logic analyzer ($2, $2, $2, $e, $e) and confirm they match up.

Read more »

this is getting ridiculous its time to make a

This is getting ridiculous. It’s time to make a PCB or move to FPGA, because I’m running out of breadboard space. On the near side of the breadboard are three ‘595s, forming serial-to-parallel address and data latches to load up the SRAM. The data ‘595 is leftmost, the low byte of the address is in the middle, and the high byte is on the right. To the right of the third ‘595 is another ATtiny13a (my first project with two AVRs in a single circuit!).

Read more »

7400 Series catalog?

Does such a thing exist but simplified for today’s ADHD youth like me? Here’s what I want: Name (‘00) Description (quad 2-input NAND gate) A plain English paragraph describing why you’d want this chip Pinout with legend for the abbreviations Maybe a cool circuit or clever hack using the chip There’s Wikipedia, of course, but it doesn’t contain all the information in a condensed and complete format, like a PDF that could be printed and kept on a workbench.

Read more »

running entirely off the qe clock signal

Running entirely off the Q/E clock signal generated by bit-banging the ATtiny13a. Note that A0-A3 are now giving the expected sequence (reading $1212, $1213, $1214 after reading the reset vector).

Read more »

Infinite NOPs

The 6809E is running! Once the weekend began with the chip in my possession, like any good engineer I resisted the urge to immediately let out the blue smoke and instead sat down with the datasheet. The moment I saw the word “clock” I remembered that I hadn’t bought a 1MHz oscillator. Fortunately, rather than jumping in the car and driving to Halted, I continued reading and discovered that clocking wasn’t going to be easy.

Read more »

Joust still broken: video and sound dead

I got the video assembly out of storage, and it’s dead. I know that CRTs use high voltages, and I’m allergic to kryptonite, so I won’t be messing around with that thing. No jousting today. I’m also concerned that the sound board isn’t doing anything, though it’s getting power. I went through the diagnostics in the Joust owner’s manual, and made it through the flowchart to “yep, your machine is busted” in all cases.

Read more »

the proof is in the logic analyzer it works rows

The proof is in the logic analyzer: it works! Rows 0-4 are A0-A4, or the lowest-significance address-bus outputs. Row 5 (green) is the reset signal. The last two rows are the Q/E clocks. The story this capture tells is exciting! The Q/E clocks are doing their thing. Then reset goes high, telling the processor to grab the address at $FFFE, switch the program counter, and start running. So what I’m actually seeing on the address lines (ignoring A4 so we can work with just the bottom nibble) is E, F, F, 0, 1, F, 0, F, 0, 2, 3, F, 0, F, 0, 4, 5, F, 0, F, 0, 6, 7, F, 0, F, 0… which mostly matches our expectations (more to come in a full post).

Read more »

the mostly working circuit in the lower left is

The mostly-working circuit. In the lower-left is the ATtiny13A, running on the 9.6MHz internal RC, and outputting a clock on PB3 as fast as C code can. PB4 is tied to ground because I added a snippet of code to halt the clock when I pressed a button. I then noticed the HALT input on the ‘09, so I will probably remove that functionality from the ‘13A. In the upper-left is the 74HC109.

Read more »

passed all the checks after replacing two 4116s

Passed all the checks after replacing two 4116s. No sound, though, even when I press the diagnostic button on the sound board. When the video arrives later today I’ll know more.

Read more »

ive gotten my joust out of storage serial

I’ve gotten my Joust out of storage. Serial #606900 (or 60690D according to handwritten permanent ink on one of the wooden struts inside). Strictly speaking, doing so is irrelevant to this phase of the project, but having this hulking mass taking up space at home will serve as a constant reminder to finish. It’s survived the last 10 years of storage in good shape. The backup batteries were still measuring 1.3 volts!

Read more »

Your Amazon.com order of "Williams Arcade Classics" has shipped!

I bought an old CD-ROM of Williams Arcade Classics, which is a collection of ROM images and an emulator that runs on a PC. This means little more than that I’ll be legal to possess copies of the game ROMs (besides Joust, which I already own). Sean Riddle has already written code to extract the ROMs from the PC version, but to be honest, I think it’s easier to type “mame roms” into a search engine and see where that leads me.

Read more »

the qe clock signal this is driven by a 74hc109

The Q/E clock signal. This is driven by a 74HC109, with the clock source from an ATtiny13A oscillating its little heart out. I adapted the dual flip-flop circuit recommended in the original Motorola MC6809E datasheet.

Read more »

Project 8821

Inspired by Quinn Dunki’s Veronica project to explore the 6502, I’ve decided to build a 6809E-based hardware platform for old Williams coin-op videogames, such as Defender, Robotron, Stargate, Bubbles, Sinistar, and Joust. Ah, Joust. How many first-period high school classes did I miss because of it in 1982? As a result of a software bug involving lava trolls and pterodactyls, I got hours and hours of experience from a single quarter that should have lasted maybe three minutes in a normal game.

Read more »

the motorola 6809e i believe the p suffix

The Motorola 6809E. I believe the P suffix indicates that the packaging is plastic.

Read more »

Hindsight is 20/20

1919: I don’t think women should be allowed to vote. 1941: Japanese-Americans are dangerous. Lock them all up. 1963: I don’t want black kids in my children’s school. 1965: Birth control is immoral and thus should be illegal. 1967: I don’t think people of different races should be able to marry. 1972: I want to decide whether you should have a baby. 2003: Certain sex acts between consenting adults are immoral and thus should be illegal.

Read more »

Instant messages and phatic expressions

Instant messages are meant to be instant. That’s the whole point. Please don’t start instant message conversations with “throat-clearing” phrases. Just say what you were going to say! Specifically: Hello or Hi: Wastes time forcing the recipient to write “Hello” back. Ensures that an IM exchange always takes at least a minute. Hey Mike: See above. Even worse because the recipient has to either personalize the response (“Hi Joe”) or else appear rude by simply saying “Hi.” You there?

Read more »

On the apparent false economy of written documentation

Anyone who’s worked with me for more than four hours knows that when it comes to efficient use of time at the office, I have the soul of an 80-year-old curmudgeon. I take time to write up documentation with executive summaries, working hyperlinks, sample code, and FAQs, and in exchange I expect people to read it. But all too often the pattern goes like this: Imminent Target Of Rage: Hey Mike, so I saw we have a new schema for brillig, and the slithy toves need to gyre and gimble in the wabe, and anyway, I saw you sent out something about how to do this...

Read more »

sowbug.org pwned

The reason I recently switched blog software and moved some stuff around on my site is that my server got hacked. Here’s the story. I’ve been running a colocated server in some form or another for many years, and have gotten lucky until now in avoiding exploits. I have always run some version of Red Hat or Fedora Core, and have kept it updated with rhn, apt, yum, or yum-updatesd. But there are a couple packages on my system that aren’t distributed by Fedora, so they aren’t updated by those services.

Read more »

Copying MessageBox text

It is a small pet peeve of mine that many people in software development use screenshots to send around reports of errors in Windows applications. The path of least resistance is to press the Print Screen key and paste the resulting BMP in email. These files can be multiple megabytes. Even if you use alt- PrtScn, which copies just the active window, that’s typically 350KB. Moreover, it loses critical information: if the recipient actually wants to grep source code for the error message, he or she must retype the string in question.

Read more »

My son's first joke

Thomas: Knock, knock! The Mark: Who’s there? Thomas: Thomas! The Mark: Thomas who? Thomas: Me!!!! (Thomas runs away, laughing hysterically.)

Read more »

Waaaah!

BB (t1690) UTG (t2470) MP (t2790) Sowbug (t1380) Button (t5240) SB (t1410) Preflop: Sowbug is CO with 7s, 2c. 1 fold, MP calls t30, 2 folds, SB completes, BB checks. Flop: (t90) 7h, 2s, 7c (3 players)

Read more »

Complete this set

Name other good movies (by “good” I mean “not Freaky Friday”) that fit the “What happens when something weird happens to your brain?” theme. Memento Being John Malkovich Eternal Sunshine of the Spotless Mind

Read more »

Pocket aces redeemed?

After losing a few too many late-stage tournaments with AA, whether to KK making a set on the flop, or to my opponent’s pair on the flop making two pair on the turn, or to insane miracle flushes on the river, I have to say I’m warming up to this starting hand once again after the following: PokerStars No-Limit Hold'em, $0.10 BB (9 handed) UTG+1 ($10.15) MP1 ($4.25) Sowbug ($9.65) MP3 ($8.50) CO ($10.10) Button ($3.85) SB ($8.65) BB ($3.35) UTG ($23.60) Preflop: Sowbug is MP2 with Ah, Ad.

Read more »

Mookie recap (valu-pak! three for the price of one!)

Three weeks’ worth of Mookie tourneys, condensed into one blog post. Two weeks ago: raced home from work and registered at 7:00:57, seconds before registration closed (yay!). My first hand is KK (yay!). One player calls my big preflop raise (yay!). Flop comes rainbow, Jack-high (yay!). I bet the pot; other player reraises me all-in (yay!). I call, expecting TPTK, and indeed see opponent’s AJ (yay!). Turn brings an ace (boo!), and I’m out.

Read more »

Telephone tax

As reported in this Washington Post article, the government will finally stop collecting a certain telephone excise tax enacted in 1898 to fund the Spanish-American War. There’s some controversy over the legitimacy of the tax, so in an unusual move the government is allowing taxpayers to request refunds of the taxes they paid since March 2003. Something in the article caught my eye: an explanation why taxpayers have to go through their own phone bills to add up the taxes they paid, rather than having the phone companies automatically refund them: It would be very costly for communications providers to comb their records and tell consumers how much tax they’ve paid, said Annabelle Canning, assistant general counsel at Verizon Wireless.

Read more »

PokerStars Blogger Tourney

I have registered to play in the PokerStars World Blogger Championship of Online Poker! This Online Poker Tournament is a No Limit Texas Holdem event exclusive to Bloggers. Registration code: 7330476

Read more »

Tilt (continued)

Things are looking better: Notable results: $4.40 180-player SNG, 1st place, $216 (with a “you’re disgusting” bonus comment from my heads-up opponent after my all-in A4s sucked out against his AJs). $4.40 180-player SNG, 3rd place, $85. $4.40 180-player SNG, 10th place, $8.64 (not especially lucrative, but significant nonetheless because I was able to reach the money in 3 of my 4 most recent $4.40 SNGs). A bunch of smaller SNG finishes in 1st, 2nd, and 3rd place.

Read more »

What tilt looks like (or, how I turned $1 into $20,000)

There are a couple factors at work here. First, my 2nd-place finish at the $4.40 180-man SNG triggered a textbook case of the Peter Principle; I promoted myself from my level of competence ($6.50 SNGs) to my level of incompetence ($16 SNGs and $20 180-man SNGs). There were a few ITM finishes, so these weren’t total disasters. But they were net negative and took a huge chunk from my $200 bankroll that I’ve been nursing since 2003.

Read more »

Home from New York

We’re back in California after a week in the Eastern timezone. I worked out of the Google New York office while Mary and the kids cruised around Manhattan. Highlights: The weather was perfect. Just like our last visit in September, we were there right around the change of seasons, so it wasn’t too hot, and it wasn’t too cold. Meeting coworkers who I knew only from email. Sitting down with one coworker who I normally sit 20 feet away from in Mountain View and talking in depth about flaws in the cookie security model.

Read more »

How to jinx the chip lead

Tonight’s Mookie tourney was a heartbreaker. After a weak start in which the relentless chatter of bloggers seduced me into playing too many hands, I tightened up and worked my way up to chipleader. I said to myself, “Hmm, better take a picture of this one while it lasts.” Et voila: Moments later, the horror began: PokerStars No-Limit Hold'em Tourney, Big Blind is t200 (7 handed) CO (t4585) Button (t3200) SB (t7153) BB (t4860) Sowbug (t6426) MP1 (t4470) MP2 (t2806) Preflop: Sowbug is UTG with Js, Qc.

Read more »

Two live cards

Some bloggers were playing in a blogger-only WSOP satellite Sunday night. Two short stacks went all-in; one survived. But the survivor had the hammer (7-2 offsuit), and that got the other guy mad, and some name-calling resulted. It may hurt to hear it, but the hammer player made the right decision, and wasn’t acting at all in an “essentially random fashion.” In low-M situations, the cards aren’t that important. You can’t afford to see a flop without first exploiting the fold equity of your stack.

Read more »

Readable Hand #1

In Hold ‘Em Poker, David Sklansky shows how you can make educated guesses about the hole cards your opponents are holding. He gives a couple examples that are fun to read, because you do correctly guess them, and they make you feel like a magician. So, in my attempts to escape from the Texas Hold ‘Em fish pond, I’m collecting examples of easily readable hands. Here’s the first, which I picked up from a recent tournament.

Read more »

There oughta be a law...

It should be illegal to give a child a gift of a toy that makes noise unless it’s accompanied by a signed, notarized affidavit that the would-be giver has first spent 24 hours locked in a darkened room listening to the toy nonstop. In many cases, a person would be certifiably insane after this experience and thus lack the mental capacity to legally attest to anything (including the toy affidavit). Problem solved.

Read more »

U.S. law, Constitution not binding on future Presidents

Bruce Schneier got it right. If you’re OK with George Bush spying on Americans because the war on terror gives him the power to ignore the law and the U.S. Constitution, then you had better be especially OK with President Michael Moore spying on you, too. (President Michael Moore?!?! Sure, that sounds silly. But in 1950, would you have bet on Ronald Reagan for President? In 1985, would you have bet on Arnold Schwarzenegger for governor of California?

Read more »

On Being a Pedestrian from California in Manhattan

California natives need a leap of faith to survive as pedestrians in New York. The first challenge we face is distance. People in Manhattan – normal people just like you and me – might walk a full mile to get from Point A to Point B, where neither Point A nor Point B is on a nature trail, or on a treadmill at the gym, or the spot in the mall where we forgot our car was parked.

Read more »

Separated at birth?

Ken Jennings| Eugene Volokh —|—

Read more »

Michael Tsao, deceased

I came across the following ominous search term in my webserver logs: michael tsao death Curious about what the world had to say about such an idea, I typed the same search term into Google and was saddened to see that indeed, Michael Tsao had died. Long ago, back in the days when you could email people you found on the web and they’d actually reply, I wrote to the president of Kahiki Foods.

Read more »

eBay

A couple of weeks ago I sold an item on eBay for the first time in several years. The process was smooth – much more so than my last experience in 2002. Key improvements: Creating an auction is easier than before. The site has templates for common auction types, such as the mobile phone that I sold, so the listing automatically includes a photo and description of the product. PayPal integration is * * * * * I received notification that the auction had ended, and about an hour later the buyer paid with PayPal.

Read more »

apt-show-versions

If you’re having trouble getting apt-get to tell you what you have installed, it’s because apt-get can’t do that! Try this: $ apt-get install apt-show-versions $ apt-show-versions

Read more »

Join the 80-column camp!

Compared to the pre-GUI era, the typical workstation display these days is _ big_. We’re stocking new engineers with dual 1920x1200 widescreens. That’s the equivalent of six side-by-side VGA screens! In spite of this growth over the years, my basic monitor real-estate coding rules haven’t changed: stay within 80 columns, and try to keep each function short enough to fit vertically on a single screen. The 80-column rule is a coding style convention that enhances readability and helps you play nice with your teammates.

Read more »

WePod?

Two of the current Apple iPod commercials feature multiple synchronized dancers. How’d they do that with iPods? Each person in the commercial has his or her own. To the best of my knowledge no iPod can broadcast to another one, nor can iPods receive FM radio. So did all the dancers start the same song at the same moment and hope they stayed in sync? Is there an outtake where they’re all quickly exchanging headphones to see if the beats match up?

Read more »

xterm & backspace key

If you’re using xterm and hitting the backspace key doesn’t do what you expect, add this to your .Xdefaults file: xterm.*.backarrowKey: false (Thanks, Kelly Felkins.) Another solution specific to Emacs is to add this to your .emacs file: (define-key global-map "\010" 'backward-delete-char-untabify) (Thanks, Ehud Karni.)

Read more »

Hammock

My mom took this snapshot, and it was impromptu (honest)!

Read more »

DNS fun

Diagnosing DNS trouble is especially fun because of caching. If you keep doing dig sowbug.org over and over, all you’re usually doing is reading the cached value from your local DNS server, rather than confirming that the changes you’ve made at your registrar are taking effect. So I came up with the following method to try to trace exactly what was happening. It might be wrong, but it seems to make sense.

Read more »

Server configuration

Some of what I’ve done to my new server so far. By the way, it’s Fedora Core 2. I’m running Core 2 because Core 3 and later pretty much require yum rather than apt, and yum is a real resource hog and won’t reasonably work in 64MB of DRAM. As root: crontab -e, then add 25 3 * * * apt-get update && apt-get -y dist-upgrade. Create a backup script on a different machine with several lines resembling this: rsync -az -vv --sparse --stats --delete --rsh=ssh root@<hostname>:/home .

Read more »

My server's back!

As all three of you noticed, my server died last Wednesday. It’s a User Mode Linux server, and my trusty nightly rsync backup script sorta stopped working back in November 2004, so when the server disappeared, yeah, I lost some data. Fortunately, November 2004 was just before my son was born, so blog entries dropped off dramatically around then, and there wasn’t a lot to reconstruct. I got help from several sources: Bloglines caches blogs in a format that’s pretty faithful to the original.

Read more »

Medical marijuana

In _ Gonzales v. Raich_, six Supreme Court justices acted against the express will of the people in eight states.* Will Bill Frist now include those justices in his rants against “activist judges”? *Of the ten states with laws permitting use of medical marijuana, eight enacted their laws as the result of direct popular election.

Read more »

SMART-BURN is smart

This past weekend I was burning a DVD, and about halfway through I accidentally dropped something on the keyboard’s sleep button. The CPU fan obediently spun down and the monitor promptly switched off. Sigh. I reached for a new DVD blank and prepared to throw away the now-ruined one in the drive. Imagine my amazement when I woke up the computer, it resumed burning, and verification succeeded! We’ve come a long way since 1996, when moving the cursor over the wrong part of the desktop would kill a burn.

Read more »

pushd &amp; popd

Yesterday I discovered the shell commands pushd and popd. For some reason every time I read the man pages I didn’t grok what they were for, but this time it clicked. Suppose you’re in some directory somewhere like ~/src/main/project/module/test/data/, and you need to work with a file in your ~/scraps directory. Without pushd and popd, you have three choices: open a new shell, cd to ~/scraps and then cd back again when you’re done, or use path completion to type the full path to the file in ~/scraps.

Read more »

Add telnet to Linkstation firmware

This tarball contains the Linkstation telnet binary and a script that inserts the binary into a Linkstation 1.4x firmware installer and configures inetd to run telnetd at system startup. Read the instructions at the top of the shell script. I haven’t actually tested to see if this works, but if it doesn’t it shouldn’t take much more effort to fix it. This approach saves bandwidth compared to downloading a new 37 megabyte installer for each tiny change.

Read more »

Linkstation 145/146/147 password

I wanted to add a few features to my Linkstation HD-H120LAN, but the newer versions of the 1.4x firmware are password-protected and don’t have the same vulnerabilities as earlier versions that allowed hobbyists to tinker with them. So this is what I did. (These instructions assume you’re already experienced with Linkstation/Kuro Box hacking.) Download the 145_13 firmware update and extract firminfo.txt, ramdisk.image.gz, and vmlinux.gz from the firmimg.bin in it. gunzip ramdisk.image.gz and mount it using sudo mount -o loop ramdisk.image /mnt/linkstation/.

Read more »

Sending text messages to your AT&T/Cingular phone

If you send text/SMS messages to your formerly AT&T Wireless, now Cingular phone using xxxyyyzzzz@mobile.att.net, you may have noticed the address recently stopped working. Use xxxyyyzzzz@mmode.com instead and it should work.

Read more »

Qurb 4.0

Congratulations to my friends and former coworkers at Qurb, who just released their 4.0 beta. As I understand it, 4.0’s principal new feature is an RSS/Atom aggregator. “Feed reader” is a less techy term for the same thing, but it’s less likely to be properly indexed by search engines ;). It seems like just last week that 3.0 went final. Qurb is really picking up steam!

Read more »

Ikea assembly instructions

Recycle and parent in one step: Ikea assembly instructions make great coloring books.

Read more »

Who's locked that directory?

To figure out why you can’t unmount a busy directory, try this: fuser /mnt/share You’ll get back the process ID of the responsible party.

Read more »

tar does bzip

This is embarrassing. For years I’ve extracted .tar.bz2 files by the two-step “bunzip foo.tar.bz2 && tar xf foo.tar” method, but it was annoying that tar didn’t know what to do with .bz2 archives and thus wasn’t as convenient as “tar xzf foo.tar.gz.” Well, last night I discovered tar’s -j option, which does the same thing for bzipped archives as -z does for gzipped archives. Hooray!

Read more »

Buffalo Linkstation

If you are having trouble updating the firmware on your Buffalo Linkstation or Kuro Box using Windows XP, try turning off your computer’s firewall. The setup program appears to use UDP in both directions, possibly sending and receiving on different ports, and the default settings of the XP firewall interfere with the traffic. I’m sure the setup program warns you somewhere to do this, but if you’re like me, you typically ignore all those warnings.

Read more »

Unintentionally Ambiguous Headline of the Day

Soldier killed in Iraq to get Medal of Honor (since fixed… still cached in Bloglines)

Read more »

Gloria Gaynor

Yesterday on the XM Radio station Chrome I heard the long version of Gloria Gaynor’s disco anthem I Will Survive for the first time. It’s quite impressive. The version you’re probably used to hearing is about three minutes long. But the long version is basically her singing the whole song all over again. Toward the end the drummer starts doing some really funky improvisations, like he’s had an itch for a while and needs to scratch without missing any beats.

Read more »

SMTP sample exchange

Because I always forget, here’s how to manually send a mail given a telnet client and an SMTP server in order to test and make sure the server’s working: $ telnet mail.example.com 25 Trying 12.34.56.78... Connected to mail.example.com (12.34.56.78). Escape character is '^]'. 220 mail.example.com ESMTP Ready on Mon, 21 Mar 2005 16:29:31 -0800 [a.mail] HELO mail.somewhere.com 250 a.mail.somewhere.com Hello 98.76.54.32.somewhere.com [98.76.54.32], pleased to meet you MAIL FROM:<mike@somewhere.com> 250 2.1.0 <mike@somewhere.com>...

Read more »

Emily

Read more »

Aquadoodle

If you’re looking for a replacement Aquadoodle pen for the one your youngster ate and/or flushed down the toilet, try this instead.

Read more »

MP3 Collection

I finally bit the bullet and started encoding my whole CD collection. I have 4,201 songs ripped with about 50 CDs to go. Mary’s happy, because in the process I threw out all the jewel cases and put the ripped CDs in relatively compact binders. Waiting until I was in my mid-30s was the way to go. Extensive A/B testing proved that I can’t hear as well as I could in my youth, and this saves me hard drive space because I can pick a lower encoding quality.

Read more »

Cingular Wireless

AT&T; Wireless customers, one of whom is me, were switched over to Cingular a few months ago following the merger. My new carrier has a trick to either get people to pay their bills earlier, or charge them hard-to-dispute penalties for unintentionally paying a few days late. Nowhere on the bill does it give a date when the bill is due. Instead, in the “Date Due” field it says “UPON RECEIPT.” In the itemized portion of the bill it says a “late fee may be applied for amounts unpaid 22 days after the date the invoice was mailed.” But there’s no indication when the invoice was mailed.

Read more »

Thomas rolled over

Thomas rolled over today – on his three-month birthday. Good job, squirt!

Read more »

iTunes/Winamp feature request

When I’m listening to internet radio, I’d like a hotkey that copies the current song information into the clipboard so I can paste it into a “songs to buy” text file. Or take me to a web page that contains that information and/or tries to sell me the song, whatever. Just give me a way to say “I like this song and want to know more about it.” iTunes seems to do this pretty well for songs in your library, but it should do the same with the Shoutcast MP3 tag info in streams.

Read more »

Shopping sites

Shopping sites and RSS are an evil combination. My favorite shopping site slogan is “How to go broke saving money.”

Read more »

DVD Shrink

The best part of DVD Shrink is that it scrubs your DVDs of “prohibited user operation,” or “PUOP” flags. You know, the ones that effectively add 30 seconds to the boot time of your DVD player by putting that little stop sign up in the corner when you try to fast forward through the really unamazing CG animation sequence before the main menu. I’m fascinated that DVD manufacturers (a) choose to punish the 99.9999999% of DVD viewers who are not members of counterfeiting rings by forcing them to watch some gobbledygook about Interpol and rebroadcasting every single time they pop a movie in their player, and (b) apparently think that the other 0.0000001% of viewers – the target audience of the PUOP warnings – will actually realize the error of their ways and leave their bootlegging careers because the DVD they’re copying told them to.

Read more »

Online ads

This article spurred me to write about something that’s bugged me for a while. Why don’t ad agencies host MPEGs of all the TV commercials they’ve produced? Or even better, why don’t advertisers host their commercials online? Why wouldn’t they want to distribute commercials to people who actually want to watch them? I have seen a few archives of ads, but they don’t cover everything, and they often seem to be low-quality encodings off a TV tuner.

Read more »

Slashdot vs. RSS

For nearly seven years, Slashdot has been my primary source for geek news. Nearly everything I’ve read there was novel. But lately I’ve noticed that I rarely see anything on Slashdot that another RSS feed didn’t already mention. Slashdot will continue to have some of the best commentary on geek topics, so of course I’ll still read it, but currently RSS wins for timeliness.

Read more »

Mount an ISO in Linux

As root: mkdir /mnt/iso mount -o loop -t iso9660 yourcd.iso /mnt/iso

Read more »

AutoGK contains adware

I regret that I need to retract my earlier recommendation to use Auto Gordian Knot. The 1.84 beta installs a BHO at c:\windows\system32\dae.dll (“RESPONSETARGET”) that pops up ads while you browse in MSIE. It’s the right of the AutoGK author to put whatever junk he wants to in his program (subject to licensing), so I’m not going to post instructions how to remove the adware. Instead I’ll just state that if you don’t want adware on your system, you should not use AutoGK.

Read more »

MPEG-4 compression

I’ve done some research into backing up DVDs. The motivation was my observation that my daughter is sure to destroy at least a few DVDs in the coming months while she’s toddling around the house. Here’s the summary: Buy a Philips DVP642 DVD player, which costs about $65 and plays MPEG-4 CDs and DVDs. Get a DVD burner. This step is optional, but at a minimum you will need a DVD reader.

Read more »

Childproof Consumer Electronics

I wish DVD players and TVs came with a “childproof” mode, where you had to do something special to turn it on, like press the power button three times in a row. Until my daughter learns that the DVD tray is not a convenient toy holder, this would be a nice feature.

Read more »

Importation of Canadian drugs

I think the U.S. drug industry is betting that the government will never allow Americans to import Canadian drugs. I base this belief on a simple application of game theory. There are two possible cases: either the government will never allow imports, or it eventually will. Start with the first case. If the government does not allow imports, then U.S. drug companies will continue to have a collective monopoly on the U.S.

Read more »

Exchange your xmas lites

Apparently, if you go here, you can exchange up to five strands of old-style tree lights for brand-new LED strands, free! Press release from last year, though they’re doing it again this year.

Read more »

The dot-com years (1997-2003)

Dave Bartols Margaret Brunjes Misha Cornes Holly Gibson Fay Ferency Valerie Phillips Karen Fredericksen Simon Walker Josh Rosenstock Sarah Phillips Jenn Guitart Kevin Boyd Evan Prodromou (Margaret’s friend) (found!) Kai Quinto Mike Rosenberg Ken Bobu Julie Sullenger Miriam Vu (found, then lost again!) Rafael Weinstein Daniel Pifko (found!) David Johnson Tom Whittaker Ain McKendrick Greg Friedman from Microsoft Dave Glowacki (check your Friendster mail!) Robert Yates, Wheelie Guy Andy Turk

Read more »

23 Prisoners, in code

And here is a C program that tests my solution. ` #include <stdlib.h> #include <stdio.h> #define PRISONERS_COUNT (23) #define STRAGGLER_FACTOR (4) enum { MANAGER_SYNC, MANAGER_RESYNC, MANAGER_COUNT, PRISONER_UNKNOWN, PRISONER_UNKNOWN_SAW_ON, PRISONER_UNKNOWN_SAW_OFF, PRISONER_READY, PRISONER_IDLE }; enum { ACTION_UNDECIDED, ACTION_FLIP_A, ACTION_FLIP_B, ACTION_CALL_WARDEN }; int switch_a, switch_b; int prisoner_visited[PRISONERS_COUNT]; int prisoner_state[PRISONERS_COUNT]; int manager_count; int manager_straggler_count; int stats_visits; static int call_warden(void) { int i = PRISONERS_COUNT; while (i--) { if (0 == prisoner_visited[i]) { return 1;

Read more »

Crypto plan to anonymise P2P, thwart RIAA

Blubster plans to “incorporate encryption technology and other techniques to give file-sharers greater anonymity.”

Read more »

EM_STREAMIN

What do you usually do when you need to set text in a Windows control? You do one of the following: SetWindowText() SetDlgItemText() SendMessage(WM_SETTEXT) SendMessage(WM_SETTEXTEX) It’s tempting to do the same for a Rich Edit control, and sure enough, this will work on almost all versions of Windows. On early ‘98 systems, however, it won’t always work. In cases where it doesn’t, it either displays gobbledygook, does nothing, or crashes – pretty easy for this to slip by QA.

Read more »

tinyp2p: a ridiculously simple peer-to-peer chat program

I wrote this to test asynchronous socket I/O notifications on Windows. It turned out to be a nice self-contained project, so here it is, with source. MIT license. Requires Visual Studio .NET to build. It should be easy to figure out how to build it on earlier versions of Visual Studio. Have fun. tinyp2p.zip

Read more »

Rackmount Server

Motivation Inexpensive: I don’t want to spend more than $700. Excellent performance: it’s going to be mostly just a web server, rather than a compute server, so the requirements are fairly low. High-quality components: all name-brand. Not expandable. The odds of being able to upgrade economically are probably very small, so I’m not willing to spend extra for expandability in the future. Something I’d be proud to have built (no bolt cutters, duct tape, or homemade moving parts).

Read more »

Compaq iPAQ Personal Mini-CD Player PM-1

My fellow gadget-head officemate Robert showed up this morning (mid-December 2001) with a new toy: a portable Sony CD/MP3 player. This set off the usual string of thoughts in my head: me want toy too; must find “Christmas gifts” for “friends” and “family” after first “testing” them myself; must shop online now. A few links later and I came across the Compaq iPAQ Personal Mini-CD Player PM-1. This is a portable CD/MP3 player that uses those cute little 80mm CD-R discs that music companies tried to use for CD singles in the late 80s and early 90s.

Read more »

Tivo

These are notes, mostly to myself, about the Tivo I got on August 21, 2001. Model HDR31204 (standalone, Phillips, single-drive, 30 gigabytes, Quantum LCT20, version 1.3). Quantum drive is really, really quiet. Downloaded MFSTools and backed up. Backup was going to be 6 gigs but it failed (couldn’t write more than 2 gigs to a file on Windows FAT32 partition). Tried again with -Tl32 option and the backup was 1.1 gigs, compressed (gzip -9) 383 megabytes.

Read more »

Windows Programming Tips

Wise guidelines to follow when working on team programming projects Be friendly to team members who don’t know your code as intimately as you do or who shouldn’t need to be familiar with it Choose filenames that do not include magic words like “error,” “warning,” or “project.” When a build engineer (or you when the build engineer has gone home) needs to find certain events in a build log such as all errors in a 50-project product build, it helps not to turn up false positives like “errordisplay.h.” When choosing file and target names, make life easy for your fellow grepping developer.

Read more »

Building Quake from id's source

If you’d like to compile Quake under Linux, here’s another tutorial (dead link) from Ralph Churchill. I haven’t tried it myself so please e-mail questions and comments to him. Thanks, Ralph! Also, to solve the mathlib.c freezing problem under MSVC 5.0, try compiling the QuakeWorld version of the same file. That should work ok and you can just copy the file into the WinQuake project. Also try removing lines 178 and 287 from the mathlib.c file (I haven’t tried this myself so I don’t know what these lines are, but I have been told this makes it work).

Read more »

Read more »