[Dimitri] sent in a project he’s been working on that implements a Java Virtual Machine purely in C, and is easily portable between microcontrollers such as the AVRs and PICs we normally see, ARM devices, and even the lowly 386.
Before going into the ‘how’, [Dimitri] first covers why he wanted to run Java bytecode on a microcontroller. Basically, he found existing solutions like the Arduino environment too complex for people just wanting to program a chip. Arduino and PICAXE require C-like syntax and pointers; not the easiest thing when everyone and their mother can program in Java.
As for how [Dimitri] managed to pack a JVM into a microcontroller, that’s another story entirely. Everything in the JVM, from double, long, and float data types to exceptions, neat thread-related functions such as ‘synchronize’ and even methods such as String.charAt() and String.length() are completely optional. If your microcontroller is too small, just disable the functions you don’t need.
As for how well – and how fast – μJ is able to run, [Dimitri] threw up a demo of an ATMega644 and PIC24 running his JVM and a small Java app. You can check those videos out after the break, or just download the source for μJ on [Dimitri]’s site.
Continue reading “μJ, A Java Virtual Machine For Microcontrollers”
There is buzz all over the reddits and Element 14 discussion boards about an updated version of the Raspberry Pi that bumps the amount of RAM from 256 MB to 512 MB.
This new update comes after the announcement of an upgraded version of the yet-to-be-released Raspi Model A (from 128 MB of RAM to 256 MB), and a few slight modifications to the Model B that include fixing a few hardware bugs (nothing serious) and adding mounting holes.
After perusing the Element 14 and Raspberry Pi discussion boards, a few things become apparent. Firstly, it appears this new upgrade to double the amount of RAM was initiated by manufacturers. It seems 512 MB RAM chips are cheap enough now to include in the Raspi without impacting the cost of components. Secondly, 512 MB seems to be the upper limit for the Raspberry Pi, at least for this iteration of hardware. Not enough address lines, they say, but you’re welcome to try and hack your own RAM to a Raspi CPU.
So far, attentive Raspi enthusiasts have found Raspberry Pis with double the amount of RAM on the UK Farnell site and the Australian Element 14 site. Nothing so far on the US Element 14 site, although we’ll gladly update this post when a Hackaday reader finds the relevant link.
EDIT: Here’s the link for the US version of Newark. No, there aren’t any in stock. Also, Hackaday beat the official Farnell/Element 14/Newark press release and the Raspberry Pi blog to the punch. Woo, go us.
[JAC_101] wrote in to let us know that the Truely Mad Scientist’s LVL1 Splinter Group just built a simple Alpha Particle detector. The detector is a high voltage DC spark gap that is triggered by ionizing radiation. Making one of these detectors involves gutting a cold cathode power supply for some high voltage AC, then bumping that source up to crazy high voltage DC with a Cockcroft-Walton generator. Once the spark gap distance is carefully adjusted it will light up brilliantly with the introduction of a radioactive source, we are told. There are no videos, or even pictures of the thing running, but we found this one that is pretty darn cool. Maybe all that spark-gap related RF killed their camera or something, their page at least promises videos soon.
In the mean time check out Truely Mad Scientist’s LVL1 Splinter Group’s ionizing cloud chamber for more radioactive fun.
Because some of Hackaday’s readers aren’t from America, let us fill you in on the US election process from the point of view as a voter. Over the next few weeks, political campaigns will dump millions of dollars into advertising, get-out-the-vote and canvassing efforts across the country. The airwaves will broadcast still more ads and political analyses until November 6th, when voters will go to the polls and pull the lever for whoever earned their vote back in July.
Despite how effectively public opinion can be swayed, there are still a lot of problems with the election process in the United States. A first-past-the-post, winner take all system guarantees there will only ever be two realistic choices for voters, but a group of philosophy students (and teachers) may have a solution to this problem.
The idea is fairly simple, really: take dissatisfied members of one party and match them up with dissatisfied members of another party. Normally, these voters would be inclined to vote the party line and not their conscience, for fear of throwing their vote away. After matching these voters up, they make a gentleman’s agreement with each other (either with a handshake or by mailing in their ballots together) to not vote the party line. The balance of power between (D)s and (R)s remains, but third-party candidates get a much-needed shot in the arm.
It’s an interesting idea with far more potential to effect some change than the numerous e-voting hacks that will pop up after the election. Sure, it may not be as effective as other voting systems such as the Condorcet method, but save for elected officials abdicating powers granted to them, this might be the best shot we’ve got.