Computing stuff tied to the physical world

Programming the JNµ – at last!

In AVR, Hardware, Software on Mar 21, 2013 at 00:01

Yesterday’s post shows that it the JNµ can be easily be programmed using the standard Arduino IDE, if you get all the pieces right (isn’t that always the case?):

Screen Shot 2013-03-19 at 14.34.08

The easiest way to get the connections right, is to assemble a custom cable (more):


What about the software setup? Well, that too is now very simple:

  • download and install a copy of the Arduino IDE 1.5.2
  • create a folder called “hardware” inside your IDE’s “sketchbook” folder
  • download or – preferably – clone the new ide-hardware package from GitHub
  • rename it to “jeelabs” (!) and move it inside the “hardware” folder

The new jcw/ide-hardware project on GitHub was adapted from the arduino-tiny project on Google Code. I didn’t want to wait for that project (it hasn’t been updated for over 6 months), and decided to create a fork on GitHub instead. I did find two other such forks – rambo/arduino-tiny and james147/arduino-tiny, but neither of them appears to offer a major advantage – and since I had to rearrange things to make it work with the IDE 1.5.x structure, there does not seem to be much point in basing things off those forks.

The result of all these steps is that you now have the following new options:

  • use the Tools -> Programmer menu to select “Arduino as ISP”
  • select “JeeNode Micro” from the Tools -> Boards menu to build for that setup
  • use the Tools -> Burn Bootloader menu to set up the fuses
  • use the standard “Upload” button to upload a sketch using this ISP-based setup:

    Screen Shot 2013-03-20 at 16.42.05

Those two warnings are harmless, and can be ignored (I don’t know how to avoid them).

That’s it!

Update – Fixed a problem with setting fuses, make sure you use latest code from github.

  1. You have probably found it but just in case: there seems to be another approach as well: but it takes more memory from the ATiny and additionaly there are extra problems on new Macs with USB3.

  2. Is the 1.5.x branch already stable enough to base development on this version?

    No compatibility issues with current JeeLib and JeeNodes?

    • I’ve been using it for a few months now for all my sketches. No problems as far as I can tell.

  3. Back when I started fiddling around with the tiny core, the PAGEL and BS2 error annoyed me enough that I dug up the fix. Unfortunately, the search results are now filled with people saying that it can simply be ignored which is true but unhelpful. As I recall, it boiled down to the avrdude.conf that the Arduino guys ship being slightly crusty around the edges, and replacing the whole avr-gcc toolchain solved it.

    Which I had to do to compile code over 4k long on my t85 due to how the avr-gcc in the Arduino toolchain handled memory paging? I think? I’m going to be in a world of hurt if my environment ever updates unsuccessfully, hrmph.

  4. AFAIR you can get rid of the error messages by adding two dummy entries to the attiny84 definitions in avrdude.conf, like

    pagel = 0xD7; bs2 = 0xC2;

    These entries are only used for HV programming (?) and should not effect anything else. Perhaps someone can try this.

  5. JN micro v3 programmed successfully here. I am running the blip2 sketch and successfully logging and displaying the incrementing counter on a RaspberryPi with HouseMon! Fun!

  6. No luck! I’m using an Arduino Duemilanove as ISP Programmer and Arduino IDE 1.5.2. When I try to Burn Bootloader, or Upload the radioBlip2 sketch I get the following error message: avrdude: stk500_getsync(): not in sync: resp=0xf0

    Any ideas?

    • Did you connect power to the +3V pin? The Duemilanove is 5V (not just power, but also the I/O pins) … probably not a good idea.

  7. Thanks for your answer.

    To power the JeeNode micro I’ve tried: 1) A CR2032 battery to JeeNode’s GND and + 2) JeeNode GND to Arduino’s GND and JeeNode + to Arduino’s 3.3V

    and then MOSI/MISO/SCK/RESET to Arduino’s 10-13 pins. It’s that a bad idea? :-S

Comments are closed.