AVR vs PIC, Round 223: Fight!

Get ready to rumble! [Thierry] made the exact same Hello-World-esque project with two microcontrollers (that are now technically produced by the same firm!) to see how the experience went.

It’s not just an LED-blinker, though. He added in a light-detection function so that it only switches on at night. It uses the Forest Mims trick of reverse-biasing the LED and waiting for it to discharge its internal capacitance. The point is, however, that it gives the chip something to do instead of simply sleeping.

Although he’s an AVR user by habit, [Thierry] finds in favor of the PIC because it’s got a lower power draw both when idling and when awake and doing some computation. This is largely because the PIC has an onboard low-power oscillator that lets it limp along at 32 kHz, but also because the chip has a lower power consumption in general. In the end, it’s probably a 10% advantage to the PIC on power.

If you’re competent with one of the two chips, but not the other, his two versions of the same code would be a great way to start familiarizing yourself with the other. We really like his isDarkerThan() function which makes extensive use of sleep modes on both chips during the LED’s discharge period. And honestly, at this level the code for the two is more similar than different.

(Oh, and did you notice [Thierry]’s use of a paper clip as a coin-cell holder? It’s a hack!)

Surprisingly, we’ve managed to avoid taking a stray bullet from the crossfire that occasionally breaks out between the PIC and AVR fans. We have covered a “shootout” before, and PIC won that round too, although it was similarly close. Will the Microchip purchase of Atmel calm the flames? Let’s find out in the comment section. We have our popcorn ready!

Ping Pong Spectrum Analyzer

A spectrum analyzer is a pretty useful tool for working with signals where the size of the frequency components matter. Usually, the display is a screen. Sometimes, you see it done with LEDs. [Mag Laboratories] did it with ping pong balls.

The device uses a processor to calculate a Fourier transform, cutting an audio signal into 16 frequency bands. The processor converts each of these values to a PWM output that drives small fans. The fans blow the ping pong ball up the tube proportional to the fan speed. You can see the result in the video below.

Continue reading “Ping Pong Spectrum Analyzer”

Hackaday Links: April 17, 2016

There have been really cool happenings in the CNC world for the past few years. There is a recent trend of portable, handheld CNC machines. Yes, you read that correctly. This SIGGRAPH paper demonstrated a handheld router with a camera and a few motors that would make slight corrections to the position of the router. Load in a .DXF or other vector file, and you become the largest CNC machine on the planet. We saw it at one of the Maker Faires, and about a year ago the team soft launched. Apparently, the Shaper router is gearing up for production and [Ben Krasnow] got the first look with a full 17-minute demonstration of [Ben] fabricating parts out of aluminum. It looks like a great tool, and we can’t wait to see this thing in production.

Octoprint is the best way to give a 3D printer a web interface. The dev for Octoprint, [Gina Häußge] used to have a sponsor for developing Octoprint. They’re gone now, which means it’s time for [Gina] to start a Patreon. If you use Octoprint, you know it’s worth more than a dollar a month.

Really bad USB power supplies are nothing new around these parts. There are cheap USB supplies that don’t have any fuses, don’t have any circuit protection, and are noisy as hell. This is the worst USB power supply the Internet has to offer. It’s from one of the relatively new designs of USB power supplies that steps down mains voltage to five USB A ports. [bigclive]’s teardown revealed this was passing half wave mains voltage to the USB ports. It can light up a light bulb. It can kill your phone. The fault? A pinhole in the insulation between the windings of the transformer.

Electronic conference badges are getting excessive, but they can be so much cooler. Here’s Atmel’s take on a high-end conference badge. It has a display, sensors, WiFi, Bluetooth, runs Android, and has 512MB of RAM, 4GB of Flash. It’s a freakin’ mini tablet meant to last for three days.

Speaking of Atmel, they’re having a few growing pains in the merger with Microchip. Employees coming to Microchip from Atmel are getting their severance benefits cut in half. Apparently, the severance benefits given to Atmel employees were not communicated to Microchip before the merger.

Raspberry Pi Zeros are back in production. There’s also going to be a mysterious new feature. Is it WiFi? No, it’s confirmed not to be WiFi. How about Ethernet? Bluetooth? an RTC? Full size HDMI port? Actual pin headers? Audio port? Improved CPU / RAM? No, children. It’s none of these.

C.H.I.P., the nine dollar computer that made some waves last summer, has on-board Flash storage. That means you don’t need to put an image on an SD card. The folks behind C.H.I.P. have recently improved the method for flashing a new OS onto their tiny board: a Chrome plugin. Yes, this sounds completely bizarre, but Chrome plugins are becoming increasingly popular for USB gadget wizardry. You can program an Arduino with Chrome and log USB power profiles with a USB tester and Chrome. You will ride eternal, shiny and chrome.

Hackaday Links: April 10, 2016

Spot the mirrored mac
Spot the mirrored Mac

Here is the best Mac mod we’ve ever seen. [Doogie] decided to take an Apple G5 Quad to the max. This means maintaining the liquid cooling setup, adding the max amount of RAM (16 GB), adding a Sonnet Tempo 6.0Gb PCI-e card and two Samsung 840 Pro SSDs, and an Nvidia Geforce 6600GT. The best part about this Mac? Instead of the classic anodized aluminum, [Doogie] polished the case to a mirror finish. Here’s a video of the entire build. The computer is currently serving up his webpage, and if you want to see how the server load test is going, you can check out the stats page here.

Hackaday links posts are where we put interesting kickstarters and crowdfunding projects, and this one is near the top. It’s a crowdfunding campaign for a glassblowing workshop in England. If this project is funded, people can come repair their scientific glassware, make new tubes, or take a glassblowing workshop. It’s not quite a crowdfunding campaign for a business (perhaps it should be?), but maybe someone out there has a glass lathe they can donate.

A few months ago, Microchip acquired Atmel for $3.56 Billion. There’s a lot of overlap in both company’s portfolios, leading many to wonder which products would be EOL’ed and removed from the market. This week, Microchip released a statement on the acquisition (PDF), and spelled out what to expect from the product line. It’s good news:

We know that stability and growth in manufacturing is an important consideration from a supply base, and it has been one of the key elements that Microchip has executed well throughout its 25+ year life. We will honor that concept in this integration activity as well. We also recognize that product End-of-Life may be one of your concerns in any acquisition, including this one. Microchip has a practice and track record of not putting products on End-of-Life, and it is our intent to continue to offer the complete portfolio of products from both companies.

On April 5th, Makerbot announced it has sold more than 100,000 3D printers worldwide. Sounds like quite an accomplishment, right? Wrong. From December 31, 2014 to April 5, 2016 – fifteen months – Makerbot has sold only 20,094 printers. Sales figures are hard to come by (I’m working on this), but Lulzbot is outselling Makerbot given one of their latest press releases and basic math. There will be more on this after Stratasys releases their 2015 yearly report (on May 9), but I’m calling this the beginning of the end for Makerbot.

Here’s a Kickstarter for a laser cutter. The first reward that will get you a laser cutter is €1.300, “a special 50% early bird Kickstarter discount off the estimated retail price.” That means this is a $3000 laser cutter. What does that get you? A five watt ‘shortwave’ laser, 20×16″ working area, and a software interface that actually looks rather good.

Microchip Publishes USB Mass Storage Loader

Microchip just published their USB-MSD Programmer firmware. This open source project allows a board to enumerate as a USB Mass Storage device. Programming is as simple as copying a .hex file to the “drive”.

This code is what’s running on the $10 Xpress board that they released last month which includes a PIC18F25K50 to serve as a PICkit On Board (PKOB) programmer for the actual target micro; a PIC16F18855. In its stock version, the XPRESS-Loader firmware programs any PIC16F188xx chips that have a row size of 32 words. But it should be possible to tweak this package to program any chips that use the 8-bit LVP-ICSP protocol.

Now, this may seem like small potatoes at first look: it requires two microcontrollers on your board and is capable of programming just a small subset of the vast PIC inventory. But in our minds it’s the USB-MSD that is killer since it doesn’t require any software or drivers on the computer side of things. That’s a big invitation for all kinds of hacks. But there should be even more on the way from the Xpress team before too long.

It turns out the microcontroller [Voja Antonic] chose to use on the Hackaday | Belgrade badge is the 25k50. Since hearing about the Xpress board we’ve been talking to some of the PIC engineers and they are exploring a loader that will program onto the same chip. This means device upgrades without special hardware or drivers – perfect for badge hacking at a conference. This can be done with a precompiled hex, one created on MPLAB X, MPLAB Xpress, or others. We’ll keep you updated if we hear more on that part of the project.

Microchip Unveils Online MPLAB IDE and $10 Board

Today, Microchip released a few interesting tools for embedded development. The first is a free online IDE called MPLAB Xpress, the second is a $10 dev board with a built-in programmer. This pair is aimed at getting people up and running quickly with PIC development. They gave us an account before release, and sent over a sample board. Let’s take a look!

Continue reading “Microchip Unveils Online MPLAB IDE and $10 Board”

Microchip To Acquire Atmel for $3.56 Billion

Just last week, there was considerable speculation that Microchip would buy Atmel. The deal wasn’t done, and there was precedent that this deal wouldn’t happen – earlier this year, Dialog made an approach at Atmel. Now, though, the deal is done: Microchip will acquire Atmel for $3.56 Billion.

There are three main companies out there making microcontrollers that are neither ancient 8051 clones or ARM devices: TI’s MSP430 series, Microchip and Atmel. Microchip has the very, very popular PIC series microcontrollers, which can be found in everything. Atmel’s portfolio includes the AVR line of microcontrollers, which are also found in everything. From phones to computers to toasters, there’s a very high probablitiy you’re going to find something produced by either Atmel or Microchip somewhere within 15 feet of your person right now.

For the hobbyist electronic enthusiast, this has led to the closest thing we have to a holy war. Atmel chips were a little easier (and cheaper) to program, but were a little more expensive. Microchip’s chips have a very long history and proportionally more proper engineers who are advocates. PIC isn’t Arduino, though, a community that has built a large and widely used code base around the AVR family.

Microchip’s acquisition of Atmel follows several mergers and acquisitions in recent months: NXP and Freescale, Intel and Altera, Avago and Broadcom, and On Semiconductor and Fairchild. The semiconductor industry has cash and wants to spend it. What this means for the Atmel product line is left to be seen. The most popular micros probably won’t be discontinued, but if you’re using unpopular Atmel micros such as the ATtiny10 you might want to grab a reel or two before they’re EOL’d.