When programming a microcontroller, there are some physical limitations that you’ll come across much earlier than programming a modern computer, whether that’s program size or even processor speed. To make the most use of a small chip, we can easily dig into the assembly language to optimize our code. On the other hand, modern processors in everyday computers and smartphones are so fast and have so much memory compared to microcontrollers that this is rarely necessary, but on the off-chance that you really want to dig into the assembly language for ARM, [Uri Shaked] has a tutorial to get you started.
The tutorial starts with a “hello, world” program for Android written entirely in assembly. [Uri] goes into detail on every line of the program, since it looks a little confusing if you’ve never dealt with assembly before. The second half of the program is a walkthrough on how to actually execute this program on your device by using the Android Native Deveolpment Kit (NDK) and using ADB to communicate with the phone. This might be second nature for some of us already, but for those who have never programmed on a handheld device before, it’s worthwhile to notice that there are a lot more steps to go through than you might have on a regular computer.
If you want to skip the assembly language part of all of this and just get started writing programs for Android, you can download an IDE and get started pretty easily, but there’s a huge advantage to knowing assembly once you get deep in the weeds especially if you want to start reverse engineering software or bitbanging communications protocols. And if you don’t have an Android device handy to learn on, you can still learn assembly just by playing a game.
One of the sticking points for us with our own Internet of Things is, ironically, the Internet part. We build hardware happily, but when it comes time to code up web frontends to drive it all, the thrill is gone and the project is only half-done.
Including some simple web-based scripting functionality along with the microcontroller basics is one of the cleverest tricks up ESP8266 BASIC’s sleeves. BASIC author [mmiscool] puts it to good use in this short demo: a complete learning IR remote control that’s driven through a web interface, written in just a few lines of BASIC.
Note that everything happens inside the ESP8266 here, from hosting the web page to interpreting and then blinking back out the IR LED codes to control the remote. This is a sophisticated “hello world”, the bare minimum to get you started. The interface could look slicker and the IR remote could increase its range with more current to the LED, but that would involve adding a transistor and some resistors, doubling the parts count.
For something like $10 in parts, though, this is a fun introduction to the ESP and BASIC. Other examples are simpler, but we think that this project has an awesome/effort ratio that’s hard to beat.
You’d think that we’ve posted every possible clock here at Hackaday. It turns out that we haven’t. But we have seen enough that we’ve started to categorize clock builds in our minds. There are the accuracy clocks which strive to get every microsecond just right, the bizzaro clocks that aim for most unique mechanism, and then there are “hello world” clocks that make a great introduction to building stuff.
Today, we’re looking at a nice “hello world” clock. [electronics for everyone]’s build uses a stepper motor and a large labelled wheel that rotates relative to a fixed pointer. Roll the wheel, and the time changes. It looks tidy, it’s cyclical by design, and it’s a no-stress way to get your feet wet driving stepper motors. And it comes with a video, embedded below.
Continue reading “Simple Clock Is Great Stepper Motor Project”
[Alex Lao] has been playing around with the CPLD-like parts of a PSoC. Which is to say, he’s been implementing simple logic functions “in hardware” in software. And after getting started with the chip by getting accustomed to the different clock sources, he built a simple AM radio that transmits at 24 MHz.
The device that [Alex] is learning on is a Cypress PSoC 5LP, or more specifically their (cheap) prototyping kit for the part. The chip itself is an ARM microprocessor core with a CPLD and some analog tidbits onboard to make interfacing the micro with the outside world a lot easier. [Alex] doesn’t even mess around with the microprocessor, he’s interested in learning the CPLD side of things.
He starts off with a 24 MHz carrier and a 1 kHz tone signal, and combines them with a logical AND function. When the tone is on, the carrier plays through; that’s AM radio at its most elemental. Everything is logic (square waves) so it’s a messy radio signal, but it’ll get the job done.
Adding a multiplexer up front allows [Alex] to play two tones over his “radio” station. Not bad for some simple logic, and a fantastic Hello World project for a CPLD. We can’t wait to see what [Alex] is up to next!
If you’re interested in getting your feet wet with either CPLDs in general or a CPLD + micro system like Cypress’s, the development kit that [Alex] is using looks like a cheap and painless way to start. (Relatively speaking — PSoCs are a step or two up a steep learning curve from the simpler 8-bit micros or an Arduino.) Hackaday’s own [Bil Herd] has a video on getting started with another member of the Cypres PSoC family, so you should also check that out.
At the beginning of the Month we came across a coupon code for a free eZ430-F2013 development stick. TI has given these things now and again so we took the opportunity to acquire one. It arrived yesterday and we’ve spent just a bit of time looking it over. Above you can see the first project completed; Hello World on a salvaged Nokia cell phone screen. Join us after the break for our thoughts on the device, as well as more pictures and details.
Continue reading “Hands-on With EZ430-F2013”