The Delian's Commonwealth

Random thoughts from my corner of the world.

My Photo

About

Recent Posts

  • BASPLC: First prototype and test
  • Fear and the moral scolds
  • BASPLC: Max72xx Driver
  • BASPLC: Interface Module Front Panel Rev B
  • BASPLC: Development Tooling and Suppliers
  • BASPLC: Interface Module Front Panel Design
  • BASPLC: High Level Architecture
  • New->Project
  • FridayMonday Random Ten
  • Friday Random Ten 7/11/08

Archives

  • June 2013
  • May 2013
  • April 2013
  • July 2008
  • October 2007
  • September 2007
  • January 2007
  • December 2006
  • October 2006
  • September 2006

Recent Comments

  • Generic viagra on Standardized tests
  • Cheap cialis on Standardized tests
  • Kanosereg on Aaarrrrggggghhh
  • Bellatrix on There's no there there
  • Ivette on An Australian Day
  • Grandfather on An Australian Day
  • Ivette on The lesser evil?
  • Ivette on Feeling sad
  • John on Poem — Life is a Rainbow
  • ArtK on Flag burning

Interesting Links

  • LILEKS (James) The Institute of Official Cheer
  • PENZEYS Spices Home Page
  • Eugene Yelchin
  • Children's Book World
  • Thoughts Worth Thinking
  • The Straight Dope Front Page
  • Urban Legends Reference Pages
  • The Skeptic's Dictionary
  • Welsh Choir of Southern California
  • The Official Site for Mutts Comics

Photo Albums

  • china_1932_095
    China 1932
  • Castle_detail_20
    Sandcastle

BASPLC: First prototype and test

The LEDs arrived from Mouser and SparkFun, so I pulled out my breadboard and jumper wires and wired up the whole front panel. I only populated 16 out of the possible 32 RG LEDs simply because I got tired of puttiing in jumpers.

Fp1_prototype

Sorry that it's not a great picture. The iPhone is a great device, but for getting good resolution on little colored wires and nearly-white LEDs, it's not so hot.

I wired it up, connected to my PC (you can see the SparkFun AVR programmer plugged in at the upper right of the picture.) Wrote a test driver that sequenced through the lights and tried some other combinations and downloaded it.

One light turned on...

Well, i didn't expect it to work the first time out! After some debugging with the logic analyzer I saw that it was sending only 7 bits of the first byte and then getting stuck. Looking at the code I saw the problem. Face-slap time.

Trying to save on some instructions, I changed the loop variable here to a uint8_t

void Max72xx::sendRegister(uint8_t reg, uint8_t data) {
  for (uint8_t b = 7; b >= 0; b--) {
    bitClear (*port, clkPin);
    bitWrite (*port, dataPin, bitRead (reg, b));
    bitSet (*port, clkPin);
  }
  for (uint8_t b = 7; b >= 0; b--) {
    bitClear (*port, clkPin);
    bitWrite (*port, dataPin, bitRead (data, b));
    bitSet (*port, clkPin);
  }
}

Anybody see the problem? Yup. 'b >= 0' will always be true with an unsigned integer variable. Changing to int8_t solved that particular problem. The next problem? The lights weren't going in the right sequence. This was a two-part bug. One was some bad code in the test driver, but the other problem wasn't clear until I took a closer look at the MAX72xx datasheet and my schematic. By switching to common-anode LEDs, I made the segment outputs of the MAX7219 correspond to the "points" of the display. I goofed in the order, though, reversing some of the lines. Once I rewired that, the test ran without a hitch. Time to produce REV C of the schematic.

If things lighten up at work a bit (fat chance), perhaps I'll be able to work on the driver for the TLC5916.

 

 

Posted by ArtK on June 02, 2013 at 08:36 PM | Permalink | Comments (0) | TrackBack (0)

Fear and the moral scolds

I'm a fan of Ed Brayton's Dispatches From the Culture Wars blog. He recently had a post about some "moral scolds" going into full pearl-clutching mode over a high school's gender bending day. For those of you who haven't experienced something like this, schools frequently sponsor silly activities. My sons' elementary school had "Pyjama Day" and "Crazy Hair Day." The purpose is to foster a sense of community (shared silliness) as well as relieving what otherwise might be 9 months of unaltered drudgery.

Ed asked the question: “Seriously, where do these people come from? What kind of world do they live in? Do they really think that this one innocuous (and entirely voluntary) event is going to turn their kids gay? Imagine how frightening the world must be to such people every day of their lives.”

My response was this:

These people are afraid because the world is uncertain and ambiguous and they crave certainty. They cling to ancient moral codes and gender roles because they see them as anchors in a sea of ambiguity. At the same time, they recognize that these anchors are vulnerable — that the sea is far more powerful. So, they lash out at any strain on the anchors.

Continuing the analogy, the rest of us don’t cling to anchors. We try to understand the tide and currents and weather and sail to new and exciting places. We don’t always make it to where we wanted to go, and parts of the journey may be very unpleasant, but that’s a part of sailing. Fighting the ocean is a waste of time — it’s a guarantee of failure and unhappiness.

I also feel that these people have become "outrage junkies." They live to be upset, it's what gives their lives some meaning. They get an adrenaline rush with each new insult to their moral sense. They can see themselves as heroic defenders of what is right. We all have internal dialogs and fantasies where we are the brave hero against enormous odds, but most of us understand the difference between fantasy and reality.

Posted by ArtK on June 02, 2013 at 08:48 AM | Permalink | Comments (0) | TrackBack (0)

BASPLC: Max72xx Driver

I finished the work on the driver some time ago, but had a bunch of issues with Eclipse, WinAVR and the avr-eclipse plugin. To get things to work reasonably well, I had to reinstall Eclipse. I'm now running Eclipse Indigo with the C/C++ Development Tooling (CDT) and the avr-eclipse plugin. I've also added the subclipse plugin and moved the development projects into Subversion.

There are a few drivers for the MAX7219 and MAX7221 out there on the 'net. I've seen two drawbacks. One is the GPL and the other is some general design philosophy. Since the MAX72xx are character displays, the drivers seem to be oriented towards that, or towards driving dot-matrix displays. The latter is closer to what we want, but I'm still not satisified with it.

Continue reading "BASPLC: Max72xx Driver" »

Posted by ArtK on May 19, 2013 at 09:26 AM | Permalink | Comments (0) | TrackBack (0)

BASPLC: Interface Module Front Panel Rev B

I know I said that the next step was prototyping, but a few things have interrupted.

I orderd the red/green LEDs from Futurlec and wen't back and forth with them about the items being out of stock and what would work to replace them. I finally cancelled the order. As I also noted in the design, the MAX7219 really wants common anode LEDs so that we can have the points map to segments and the banks of LEDs map to digits. It turns out that it's a bit of a challenge to find 3-pin RG LEDs that are common anode. I finally found some made by Bivar and sold by Mouser. The Mouser order took a whopping 4 days to get to me.

Changing to common anode meant re-working the schematic. Eagle gave me some grief, connecting things to a bus that I didn't want connected. I had to offset the LEDs to avoid that problem. *sigh*

Download Plc_fp1_v10b

Next we'll work on the software drivers for the two display chips.

Posted by ArtK on May 18, 2013 at 11:11 AM | Permalink | Comments (0) | TrackBack (0)

BASPLC: Development Tooling and Suppliers

As we work on the BASPLC project, we're going to need a lot of tooling, both software and hardware. I'll use this post to keep track of what's in use. I'll also keep track of my suppliers and the experiences with them.

Continue reading "BASPLC: Development Tooling and Suppliers" »

Posted by ArtK on April 28, 2013 at 09:34 AM | Permalink | Comments (0) | TrackBack (0)

BASPLC: Interface Module Front Panel Design

We've got enough information to get rolling on some design and prototype work. Since a lot of this is new, we'll start with something simple -- something that gives us scope to over-design as well! We're going to design the front panel for our interface modules.

Continue reading "BASPLC: Interface Module Front Panel Design" »

Posted by ArtK on April 27, 2013 at 09:30 AM | Permalink | Comments (0) | TrackBack (0)

BASPLC: High Level Architecture

We've got our basic requirements for the BASPLC project: Build a PLC with a set of interface modules, and base the whole thing on some low-cost MCUs. Rather than do this with a big requirements analysis up front, we'll get to more specific requirements as various topics come up.

There are a couple of places we can start with our architecture. The prototypic PLC archiecture is a controller connected to interface modules via some kind of bus. We're going to maintain that architecture, so one of the decisions we have to make is what that interconnecting bus is going to look like. Another decision is if we're going to have a consistent architecture inside the processor and/or interface modules.

Continue reading "BASPLC: High Level Architecture" »

Posted by ArtK on April 22, 2013 at 09:36 AM | Permalink | Comments (0) | TrackBack (0)

New->Project

Well now. I see that I haven't posted on this blog for several years! Time flies when you're having fun, I guess. There's lots that's happened since 2008: The death of my father and Michele and I getting married for starters. Having my indentures sold to another company is another. We'll see if I can get into the swing of blogging -- if I can, then I'll cover some of those.

Today's post is about a new project that I've started. Or maybe it's a new incarnation of an old project. You can be the judge.

Continue reading "New->Project" »

Posted by ArtK on April 20, 2013 at 09:29 AM | Permalink | Comments (0) | TrackBack (0)

FridayMonday Random Ten

  1. "Something Doing" Scott Joplin from The Red Back Book performed by George Spoonhaltz and The Southland Stingers.  I've always been fond of Joplin, especially the instrumental arrangements in the RBB.  A nice performance, but not quite as energetic as those by the New England Conservatory Ragtime Ensemble.
  2. "I Never Loved A Man (The Way I Love You)" The Commitments.  Not a big soul/R&B fan, but the soundtrack to The Commitments is pretty good.
  3. "Trial Before Pilate" from Jesus Christ Superstar (Original Studio Recording).  One of my favorite musicals of all time.  I played in the pit orchestra for a production when I was in HS.
  4. "Hanks For The Memory" from Expletive Delighted, Fairport Convention.  One of the core groups in the English Folk-Rock scene, they're still going strong.
  5. "If Wishes Were Fishes" Eric Bogle, At This Stage.  Great singer/songwriter
  6. "May Day Carol" Magpie Lane, English Country Songs and Dances.  Magpie Lane are based in Oxfordshire and are still going strong, according to their web site.  This CD was marketed through the Past Times catalog, which is no longer available in the US.
  7. "Rocked In The Cradle Of The Deep" Mr. Jack Daniel's Silver Cornet Band On Tour Across America.  Great rendition on the tuba of a classic seaman's hymn.  Words: Emma C. Willard; Music Joseph P. Knight
  8. "Streets of Baltimore" The Little Willies, The Little Willies. Some nice country music.  Too bad the are  (so far) a one-CD band.
  9. "I Can't Say No" from Oklahoma.  Oklahoma was the first musical I ever played in the pit for (oboe), so I have fond memories of it.  Unfortunately, this isn't one of my favorite songs -- Ado Annie is just annoying.
  10. "The Grey Funnel Line" June Tabor & Maddy Prior The Silly Sisters. The "Grey Funnel Line" is a term for the British Navy.

Posted by ArtK on July 21, 2008 at 04:00 PM | Permalink | Comments (0) | TrackBack (0)

Friday Random Ten 7/11/08

Several bloggers I like used to run a "random ten" post, so I thought that I'd try, now that I have an iPod.

  1. "Kiss the Girl" from The Little Mermaid.  Alright, I'm a sucker for Disney music.  I love the calypso feel.
  2. "I'll Go And List For A Sailor" from Morris On.  This is a compilation by Ashley Hutchings (yes, of Fleetwood Mac) with a bunch of folk and folk-rock musicians doing Morris-dance related stuff.
  3. "War Dance for Wooden Indians" The Music Of Raymond Scott.  Everybody knows Raymond Scott's music, even if they don't know that they know it.  The long-time Looney Tunes music supervisor, Carl Stalling, used Raymond Scott's music a great deal.  "Powerhouse" would be instantly familiar to anyone who has seen more than a couple of Bugs Bunny cartoons.
  4. "The Mary Ellen Carter" from Between The Breaks Live.  Stan Rogers was a Canadian folk singer who, sadly, died in an airplane fire in 1983.  "Mary Ellen Carter" is a great song about strength in the face of adversity.
  5. "Seventeen Come Sunday" Train to Sligo.  The band Train to Sligo used to play in Pasadena, CA, at a pub called The Loch Ness Monster, and I went there many times to hear the band.  The female vocalist, Janie Cribbs has the darkest and richest voice I've ever heard in a woman.  Other band members included Thom Moore, who is now well known as a composer of Irish music, Gerry O'Beirne, Cait Reed, Paulette Gershen (a fantastic pennywhistle player) and Judy Gameral.
  6. "Piccolo Peet" sung by The Andrews Sisters.  I love 1940's swing and bought a 4-CD collection of the Andrews Sisters.  This isn't one of their best, but it's still a fun song.
  7. "Dance".  A Renaissance dance played by the Southern California Early Music Consort.  A very talented group, some of whom I see at our local Ren Faire.
  8. "Two for the Early Dew" sung by Tommy Makem and Liam Clancey.  I grew up listening to the Clancy Brothers and Tommy Makem.  This is a very silly song, but has a nice rendition of Off to California at the end.
  9. "Belle-Ile/Crookhill" from Unstrung Hero.  I first heard Brian McNeil when he played fiddle (and other strings) for the Battlefield Band.  Unstrung Hero was his first solo album and I was thrilled to find it released on CD (I had the vinyl.)  A very talented fiddler, guitarist and composer.
  10. "Rattlesnake" from Incandescence.  My friend Michael J. Lewis is an amazing composer.  This is an album of guitar music that he wrote or arranged and produced.  A bunch of talented guitarists, along with some interesting percussion.

Posted by ArtK on July 11, 2008 at 03:46 PM | Permalink | Comments (0) | TrackBack (0)

»
Add me to your TypePad People list
Subscribe to this blog's feed

Weblogs

  • Wide Lawns and Narrow Minds
  • Pharyngula
  • Blunt Trauma
  • The Loom: A blog about life, past and future
  • The Questionable Authority
  • The Intersection
  • GROKLAW
  • Good Math, Bad Math
  • Aetiology
  • Stranger Fruit
Blog powered by TypePad