Getting up and running with the iLabs Mini

Materials needed

Parts:

  • Mini board
  • Atmel programmer (usually made by hand – either a parallel port cable spliced to connect 4 wires to the board, or a serial port cable, similarly spliced, but serial requires a few 5V zener diodes and resistors as level converters)
  • FT232R chip, ATMega48 chip, LTC1660 chip
  • USB connector, header connectors
  • Passives: SMT inductor (for FT232R), some 470 ohm SMT resistors, a 10k SMT resistor, some 0 ohm (jumper) resistors, some SMT 0.1uf capacitors, a 10nf capacitor. All resistors are in 1206 packages, and all capacitors in 0805 packages. Optionally, 33pf SMT capacitors and a crystal. Optionally, 4.7uf (or other) bypass capacitors for cleaner power supplies.

Required tools:

  • Temperature-controlled soldering iron
  • Fine tip for iron
  • Sponge for cleaning iron tip
  • Solder wick for cleaning up errors
  • Something to cut header connectors with (e.g. band saw, Dremel tool, or depending on header, wire clippers)
  • AVR Programming Cable

Also useful:

  • Magnifier for inspecting your work (good one is an Optivisor)
  • Big tip for soldering through-hole parts (goes faster, and fine tips are easy to damage when doing big work)
  • Big solder for soldering through-hole parts (goes faster)

Step 1: Solder board

Solder SMT chips. Solder SMT passives. If you want to use a 6MHz clock, you can omit J1, J2, C3, C4, and the crystal. If you want to use your own clock, you can omit J3. You may also omit C10 and C6, which are additional power supply bypass capacitors. If you want to use your own analog 5V power supply (for cleaner power than the 5V from the computer), you should omit J5, and possibly, J4. Finally, solder the through-hole parts.

If you do not know how to solder properly (most college-trained engineers do not), Weller has an excellent document on the topic available as a free PDF.

Step 2: Program USB chip

This step needs to be done under Windows, using the MProg utility from FTDI's web page. You will want to reprogram the USB chip such that:

  • If you are using the 6MHz on-board clock, set C0 to CLK6
  • If you are driving another board from USB power, increase power level appropriately (device should always be set as bus powered)
  • Depending on USB chip version, you may also need to: disable USB remote wakeup, disable plug and play.
  • If you wish, you may program the remaining CBUS pins as required for your applications (including C0, if you are using a crystal oscillator)

Before you start making changes, download the configuration from the USB chip. You will need to save your configuration before the software will allow you to flash the FTDI chip (it has a funky separate edit mode for making changes, and program mode for setting them).

Step 3: Program microcontroller

Use avrdude under GNU/Linux to program the microcontroller with your firmware. Be aware that you need to reprogram the fuses to make the chip compatible with your clocking scheme.

To use the 6MHz oscillator from the USB chip, CKSEL3..0 should be set to 0000. SUT may be conservatively set to 10. The system clock prescaler should be disabled. This gives the fuse settings of: 11100000. To set this from AVRDude, run:

avrdude -c dasa -p m48 -P /dev/ttyUSB0 -U lfuse:w:0xE0:m

To use an external clock chip, the fuses will be set differently depending on speed, but generally, they will be CKSEL3..1 is 011 (for fast crystal), CKSEL0 is 1 (for conservative crystal), and SUT is 11, giving fuse settings of (the below is untested – it is from extrapolated from the sometimes buggy spec sheet):

avrdude -c dasa -p m48 -P /dev/ttyUSB0 -U lfuse:w:0xF7:m

NOTE: Be very careful programming the fuse bits. If you program the fuse bits incorrectly, your Mini will turn into a brick.

The next step is to upload the firmware.

Step 4: Test the Mini from a terminal program

Step 5: Connect the Mini to the Mini iLabs lab server

  • No labels
Write a comment…