Tweak to Tim Marston’s make file for Attiny chips

For those using Linux or something functionally equivalent for “Arduino development”, Tim Marston’s Arduino make file makes a wonderful tool. Apart from saving lots of mouse movements, using this make file in combination with the AVR tools and Arduino libraries is drastically faster. You have to see the difference to believe it could have been possible to make the Arduino IDE look so dog slow.

Anyway I wanted to share one detail to save others grief if/when they use this tool with Attiny chips. The make file passes “-D” to avrdude, and that won’t fly with chips like the Attiny84A that need a chip erase cycle if you also want avrdude to verify the bytes it’s programmed.  Here is the problematic line:

AVRDUDEFLAGS  += $(addprefix -C , $(AVRDUDECONF)) -D

My quick hack was to use one of my (Bourne/Bash shell) scripts to determine if I’m programming one particular chip vs another (by reading its signature) and then pass the appropriate switch in for avrdude. So my make file looks like this:


And then when I invoke the make command I’ll use something like this:

make blah blah CHIP_ERASE=$ERASE blah blah upload

Then my script sets ERASE to “-D” or “” depending on the chip type.

Consult your specific AVR chip’s data sheet to determine whether it can get along without a chip erase cycle (e.g. like the Atmega 328p).

Addendum: The avrdude “-e” option can be appended and it will override -D and force an erase. So if the last AVRDUDEFLAGS assignment has the $(ERASE) reference the sense can be flipped and it becomes less confusing, and you just need to feed in a “-e” for the chips like Attiny that lack page erase.

Also, I forgot I’d removed the “-V” switch from Tim’s make file and this of course suppresses verification. So if you’re reading this Tim, I can understand why you might have been scratching your head.

Finally, one might assert that  the “-e” can trivially be appended with something like this:

make -f blah blah AVRDUDEFLAGS=”-e”

Except this doesn’t work as documented in the make file comments. That is, if you try to do this you end up with the “-e” replacing ALL the avrdude flags: the append operations in the make file are trumped by the command line assignment. Maybe I’m missing a make flag that changes the variable assignment semantics? Don’t know, but I’ll try to return to this later and maybe develop a patch to incorporate automation features to guess a programmer to use and chip to program.

Murphy’s Law of PCB CAD

I’m putting together some logic chips to make a couple of precision timing tools as part of a clock calibration project. The FIRST old TI chip I go to add to a new schematic in Eagle has no library support. If I had a nickle for every time this has happened… So I search for it and here’s the one hit at Element14:

“Hey, I’m a new user here, and pretty new to using Eagle Cad. I am looking for a dual 16 bit counter, and the chip that I’ve been using in my lab, and am using Eagle Cad to make a schematic.

Is there any library that includes the chip? Or is there any good alternative inside the existing Eagle Cad libraries?

74LV8154 is the chip I’m using, datasheet:

Thanks! <name omitted>

This is followed by one reply:


if you are new to EAGLE, it’s a good point to start your training by

creating your own library. You will have to learn it anyway in the long run.

 Best Regards, <omitted>

Folks, here is my reply to this: There will soon be an Eagle library item for this chip. I’ll gladly mail it to you after you deposit $100 in my Paypal account. Consider this extra special motivation for you to fully enjoy the learning experience of making your own component file as a cheaper option that will enrich your life and improve your character.

Sheesh. But seriously, it might eventually be worthwhile to create TriEmbed libraries. I have a handful of custom component descriptions that I trust and would be comfortable sharing. The additional value of this is that we might get feedback about how to improve them.

Missing TPS63031 buck/boost temperature data graph

Here’s the graph that got scrubbed out of the list msg about tests of the TI TPS63031 buck/boost DC converter chip (3.3v out for 2-5.5 volts in). When I look at that msg as I got it from the list the graph is there! But I just looked in the archives and see that it was scrubbed. Oh well.

This shows the package temperature measured with a cheapo IR themometer with different input voltages and output load currents. Chip McClelland is going to combine this with his tests for more details later.


Recipe for cold solder joints

I’m still looking for clues about how this happened, but with yesterday’s soldering Chip and I did there was this terrible too-fast drop in temperature that explains the “dull” appearance of some of the solder joints. There were six breakout boards maybe 3/4 to 1″ square each sitting on a 1×4″ piece of circuit board in the middle of the oven tray. I’m aware this (plain T-962) oven is notorious for not performing well on large boards or boards outside the center of the tray, etc. But this was the first case of the temp control making a huge error at a critical moment. With one other batch I saw a mistake like you see below below and to the right of the one the arrow points to. Oh well, time to finish the fume hood and turn attention to some upgrades.


Cary Swapfest 2014

The annual Cary Swapfest was held at Ritter Park this year.

I was late getting to the ‘Fest and a change of plans kept me from taking my stuff to put up for sale. But I had a nice chat with Jon Wolfe of Anibit and got the dual H-drive chip I desperately needed to move the hdd motor project forward. At least one kindred spirit dropped by to chat and take a TriEmbed info sheet home with him. Hopefully we’ll be seeing him at a future meeting. The ‘Fest was much, much larger than the last time I went, but that was eons ago.  I guestimate 40-50 distinct tables of interesting stuff for sale, including lots of electronic components and devices. They had snacks and drinks and held test sessions for those interested in getting or upgrading their amateur radio license.

I saw two other TriEmbed folks who appeared to have great success finding parts for their project. I would definitely recommend this event as being worth the $4 admission just for the fun of looking at the large collection of familiar and very unusual gizmos, not to mention the chance to yack with interesting people.

-Pete AD4L


New web/blog site ready to use

TriEmbed has a new home on the Internet. The URL redirects to a WordPress site now, which is a combination of web pages and a “web log posting” mechanism (via the “Posts” link) with support for arbitrary comment chains. I’ve copied the old content in and defined a few posting categories, etc.
Several of you got mail giving you accounts with “siteauthor” roles. This custom role has more privilege than “author” to allow creating web pages as well as postings, but less than “editor”, so you’re constrained to operate only on stuff you’ve created. Feel free to log in and try things out.
If I forgot or messed up the “initial list” I gathered last month (and which I extended a bit), my apologies. You’re starting out with a randomly generated password. Feel free to change it to something easier to manage, but select one judged by WordPress to be “strong”. Apart from staying polite and mindful of the children reading this list and viewing the site, we must keep it secure. The ISP for my personal domains and I have a happy relationship approaching its 15th birthday, but he’s a stickler about security. This site uses Akismet, Wordfence, and limited login plugins to keep the garbage at arm’s length, but WordPress sites are periodically BOMBARDED with high frequency breakin attempts as vulnerabilities are found and fixed. OK, I’m sure we’re clear about that.
If you just want to be able to log in and comment without the hassle of your comment going through the moderation process except the first tie, say the word (including your desired username) and I’ll give you a “subscriber” account with a minimum of fuss. Your first comment will block for moderation, but after being approved you’ll be able to comment freely.
If you’d like to create content but want help deciding if it should be published (or any other kind of help), request a “contributor” role.
I’m willing for anybody receiving this email msg from the list to have an account on the site. The type of account you can have relates to how well we know you and can trust you. Referencing a URL or three in the mail archive, reminding me (or the list: your choice) of roughly when you last attended a meeting, etc, will help (I knew those sign-in sheets NCSU requires us to keep might have some use some day!) Just drop me or the list a line with your full name, desired username and what role you’d like to start with and I or another admin will take it from there.
I’m happy to upgrade you to editor if you’d like to help develop the site beyond adding content (e.g. helping me fix foulups that step on accepted WordPress best practice). And if you’d like to share admin duties, please send me private email so we can discuss it (and thanks in advance!)
If there’s interest at the August NCSU meeting I’ll fumble my way through a short training session, with any and all help welcome.
We can make either the “posts” or “home” (web) page the default page for the site as we get a feel for what would be most useful.
This site is automatically backed up once a week, with a “ring buffer” of four backups.
(Thanks to Gayathri Jegan Mohan for showing me how Chrome incognito windows can be used to be on the same site with multiple identities. This saved me a lot of time!)

Next TriEmbed meeting at Splatspace

Scott Hall will be hosting the TriEmbed meeting at Splatspace this Saturday afternoon the 19th starting at 2pm. Two things to notice about meetings at Splatspace:

1) It’s full of tools. If you want to solder something together or ask a Splatspace member to drill some holes, you’re at the right place.

2) It’s full of tools that require respect. Kids are welcome but keep them close to you.

More details on the Meetings Page.