CrossRoads "Arduino" inspired designs. Need something custom? Contact robert@crossroadsfencing.com 

New addition to the CrossRoads card family: Standalone Programmer!

Ever needed to program some cards in the field but didn't have access to a laptop? Now you don't need one! We collaborated with Nick Gammon and turned his "Upload Hexfile from SD card" into a full-fledged standalone programmer. Connect up a power source (3xAA battery pack, 5VDC wallwart, 7-12VDC wallwart), select a program and press the Start button.  

Two display programmer supporting up to 256 files ($48). Contact us to order one. All boards include a Sandisk 4GB SD card and 6 inch/15cm programming cable. Shipping & paypal fee added to all orders.


Features:
Card includes a 16MHz Atmega328P programmed for 256 file support; a 5V linear regulator with reverse polarity protection diode; a 3.3V regulator to power the SD card socket; a 5V to 3.3V buffer for the signals to the SD card socket; a 3.3V to 5V buffer for the serial data from the SD card socket;  an ICSP header for initial fuse burning and bootloader programming;
a "FTDI" header for serial downloads; a P-ICSP header to connect to the board to be programmed; Green, Yellow, and Red status LEDs; a Start button; a Select button to advance the count by 10 if you don't want to spin the rotary encoder; a rotary encoder to advance the count by ones;  and 2.1/5.5mm barrel jack connector feeding power to the regulator.  2 thru hole pads, JP1 & JP2, may be connected; this bypasses the  5V regulator to bring 4.5V (from 3AA battery pack for example) or 5V from a wallwart in from the barrel jack connector.

Nick Gammon code can be found here. Save both files into the same folder; when the .ino is is opened, the .h file will appear as a tab.  Bill Greiman/Fat16lib SdFat library for the SD card can be found here. I have SdFat loaded at C:/Arduino/libraries/SdFat.  EEPROM library is part of the Arduino distribution.

These two #defines get changed as needed:
#define CROSSROADS_PROGRAMMING_BOARD true   (Set to true)
#define NO_ENCODER false                                                   (Set to false)
#define HEX_FILE_NAMES true                                             (Set to true)


The Two Display programmer has two display drivers and two 7-segment displays, a Rotary Encoder to cycle thru the 256 files, CODE00.HEX to CODEFF.HEX, and a white Select button to optionally  advance by 10 thru the files.
The display will show the 2 digits as the encoder is turned showing the file to be selected. Two letter 
Status codes are displayed along with the flashing LEDs. The last file selected is  saved in EEPROM for re-use upon powerup.

 Typical use:

With the Arduino IDE, a .hex file is created when code is compiled when Sketch:Export compiled binary is selected.
Two files are created:
your_sketch_name_.ino.standard.hex
your_sketch_name_.ino.with_bootloader.standard.

The second one contains the basic bootloader as well.
Both are stored in the your_sketch_name directory that the IDE compiles and saves in to.

Rename the selected file as desired, from CODE00.HEX to CODEFF.hex

The 6-pin cable is connected from the programmer header, P-ICSP, and connects to the ICSP header of the card to be programmed.  The programmer card is loaded with software rev .125i and will set the fuses for a '328P, 1284P, and '2560 to run the bootloader.
If you do not want a bootloader, let me know and I will load .125h instead, and the bootloader will be skipped over if the .hex file includes it.

Upon power up, with no SD card inserted, the Red Error LED will flash 5 times slowly, pause, and continue flashing. Insert the SD card, and the Green Ready light will turn on solid.

Use the rotary encoder and/or the Select to move forward and backward thru the files named CODE00.HEX to CODEFF.HEX. 
When the desired file is displayed, press the green Start button.
The Yellow Working LED will flash as the program is loaded. When done, the Green  Ready light will flash several times indicating programming is done,  then turns on Solid again. Power may be removed and the programming cable disconnected any time after the Green flashing begins.  Other errors are not likely, see below if one pops up.
The display will change to 'Pr' as programming starts, then 'VF' (small 'uF') while the programming is Verified, and then 'AA" (Alright! Alright!) when verification completes. The green Ready LED will do some flashing, and the display will return to the selected file.

Common errors: 'Sd' - no SD card. 'Ch'  - cannot enter programming mode on target (not connected?). 'FL' - file selected not found on the SD card. '--' Seen as programmer comes to life, or unknown error.  
Other errors are not likely, see below if one pops up.


LED Status messages and Display messges:

Two Display board will show both letters of the (message).

LED codes (flash counts) - each sequence repeats 5 times

Problems with SD card or programming target chip
------------------------------------------------

Red x 1 = Cannot open SD card (Sd)
Red x 2 = Cannot read file 'firmware.hex' (FL)
Red x 3 = Cannot enter programming mode in target chip (Ch)
Red x 4 = This chip does not have a bootloader fuse (Fu)
Red x 5 = Cannot read chip signature (Sg)
Red x 6 = Unrecognized signature (Un)
Red x 7 = Bad start address in hex file for code (Ad)
Red x 8 = Verification error (bd)

Problems with firmware.hex file
-------------------------------

Red + yellow x 1 = Line in file is too long (E1)
Red + yellow x 2 = Line in file is too short (E2)
Red + yellow x 3 = Line does not start with a colon (:) (E3)
Red + yellow x 4 = Invalid hex digits (should be 0-9, A-F) (E4)
Red + yellow x 5 = Bad sumcheck at end of line (E5)
Red + yellow x 6 = Line not expected length (E6)
Red + yellow x 7 = Unknown record type (E7)
Red + yellow x 8 = No 'end of file' record in file (E8)
Red + yellow x 9 = File will not fit into flash of target (LG)

Worked OK
---------

Green x 3 = Flashed and verified OK - sequence repeats 10 times (AA)

Other statuses
--------------

Green (steady) = Ready to program (close switch to commence)
Yellow (flashing) = Programming (Pr)
Green (steady) + yellow (flashing) = verifying (uF)
No LEDs on = No power?


To reach Head Coach Robert, Click here robert@crossroadsfencing.com

For General Questions, Click hereinfo@crossroadsfencing.com

© 2018 Cross Roads Fencing Center, LLC.  All rights reserved.