Mark Fickett

Member Since: December 16, 2010

Country: United States




  • Below are steps for burning a bootloader to a bare ATmega328p using the Tiny AVR Programmer[1]. They're all documented elsewhere, but I had some trouble collecting all the required docs.

    Preparing to burn the bootloader:

    • Connect as in the photo[2][3][4]. A bare ATmega328 is likely to be shipped requiring an external 16MHz crystal. A pullup on the reset pin is required. An LED on pin 13 (which is also SCK) is optional.
    • Install the Breadboard Arduino board config[5].
    • Board > ATmega328 on Breadboard
    • Programmer > USBTinyISP

    After burning the bootloader with the 8MHz internal clock, the external crystal may be removed.

    Uploading a sketch:

    • Sketch > Upload using Programmer

    The normal sketch upload button does not work (errors like "avrdude: ser_open(): can't open device").

    1. Tiny AVR Programmer instructions/pinout
    2. photo of programmer and breadboarded ATmega328p
    3. ATmega328 (and 168) pinout
    4. programmer connection guide
    5. breadboard arduino config download under "Minimal Circuit"
  • Yes, I used it so I could prototype on a 5v Arduino, but I had to set the clock speed to SPI_QUARTER_SPEED.

  • The Arduino SD library said "Card type: SDHC" but "Could not find FAT16/FAT32 partition." The problem was, as someone found in the SparkFun forums, that the card communication couldn't keep up. In the CardInfo example sketch I switched SPI_HALF_SPEED to SPI_QUARTER_SPEED and that fixed it. Hope this helps someone else having the same problem!

    My setup was Arduino Uno => jumpers to breadboard => Logic Level Converter => jumpers to elsewhere on breadboard => SD card breakout; it sounds like once the connection is more direct the problem may go away.

    The SdFat library docs actually call this out:

    The hardware interface to the SD card should not use a resistor based level shifter. [...]

    If you are using a resistor based level shifter and are having problems try setting the SPI bus frequency to 4 MHz. This can be done by using card.init(SPI_HALF_SPEED) to initialize the SD card.

  • On a Mac with Arduino 1.0.5, note that SoftwareSerial is inside Ardiuno.app ( /Applications/Arduino.app/Contents/Resources/Java/libraries/SoftwareSerial/SoftwareSerial.h ) and the constant is just _SS_MAX_RX_BUFF . (NewSoftSerial is no longer required with Arduino 1+.) I ended up setting it to 256, since a GGA + RMC sentence is about 140 characters.

  • If your unit can see 4+ satellites but never gets a fix/lock, send a FULL_COLD_RESTART.

    I was stuck because my unit would report that it could see up to 9 satellites (the "09" in the below GSV sentences):


    but it never started producing position data / blinking the red LED. SparkFun support advised me to send a FULL_COLD_RESTART:

    Serial.println("$PMTK104*37"); // FULL COLD RESTART

    Details are in https://www.sparkfun.com/datasheets/GPS/Modules/PMTK_Protocol.pdf . This resets the GPS's almanac, which very rarely comes with bad data or something. Note that unlike the example code where the GPS's 3.3v output can be fed into a 5v Arduino (I was using an Uno), to send data to the GPS you'll have to have a 3.3v Arduino or a logic level converter (like BOB-12009 ).

    Also, TinyGPS only uses GGA and RMC sentences, so I configured my unit to only send those, and only once every 5 fixes (that is, 1Hz):

  • Clear and informative! Thanks!

    I noticed a typo: "Go ahead and put detach ..." extra "put".

  • I think this is it: http://www.onsemi.com/pub_link/Collateral/LM317-D.PDF

  • I think the response is shorter (< 10ms). I drove a laser with tone() and pointed it at a photoresistor*, and (via ascii-art graph from analogRead()) can clearly see a 200Hz signal, implying < 2.5ms until a detectable response. Note however that at 32Hz the rise and falloff are much more visible; clearly at 200Hz the photoresistor (or some part of the system) doesn't fully stabilize. However at 32Hz, that's still ~15ms response time.

    *I actually got impatient and picked up RadioShack's bagged assortment of 5, and am testing with one of the larger ones. I assume SparkFun's are similar.

  • I used these to illuminate paper Minecraft avatars, as indicators for when players are logged in to my server. The diffuse housing and bright LEDs illuminate the (1" cube heads of the) avatars nicely, even in bright indoor light. I can run 5 at full brightness (with the recommended 150Ω/330Ω resistors) without a problem from a USB-powered Teensy's digital out pins.

    Project notes, photos, video.

  • I don't think I saw a video link in the article, so: https://www.youtube.com/watch?v=Yz-KQKAffAk .

No public wish lists :(