Little Wire

Warning: This web page is deprecated. Current homepage is this.

Little Wire
* intro
* documentation
* news
* downloads
* pwm & servo
* avrdude setup
* C library
* C++ library
* Processing library
  1. Driver

    1. Windows:
          https://raw.github.com/kehribar/Little-Wire/master/littleWire_win_driver.zip

    2. Mac & Linux: There's no need to install any drivers.

  2. Hardware features

    1. AVR programming

Little Wire is an usbtinyisp compatible AVR programmer, right out of the box. 2x3 pinheader at the Little Wire is standard AVR-ISP header compatible. Individual pin mapping for this mode is:

pin1->MISO      pin2->SCK
pin3->RESET    pin4->MOSI

For more information: http://littlewire.github.io/avrdude.html

    1. GPIO mode

Little Wire has 4 available GPIO pins. Any of the pins can be used for writing/reading. Logic level is +5 volts. Don’t apply more than +5 volts to any GPIO pin.

For the details of the overall usage, please refer to library examples.

    1. ADC mode

Little Wire has 10 bit ADC. Reference voltage is +5 volts. Pin2 and pin3 are available for ADC feature. Reading analog voltage from pin3 is noisy; use it at your own risk. Pin2 is suggested for generic ADC usage.

Moreover, the Little Wire supports reading the internal temperature sensor of the Attiny85. You can refer to Attiny85 datasheet for the details of this internal sensor.

For the details of the overall usage, please refer to library examples.

    1. PWM and Servo mode

Little Wire has 2 parallel PWM outputs with 8 bit resolution. PWM frequency is changeable. You can read more about the PWM support at: http://littlewire.github.io/pwm_servo.html

Pin1 and pin4 are available for PWM outputs.

For the details of the overall usage, please refer to library examples.

    1. SPI mode

      Attiny85 doesn’t have a ‘real’ SPI hardware. On the other hand the available USI module can be used for SPI communication but there is a small catch. Regardless of the master/slave configuration of the USI module, data comes out only from the MISO pin of the Attiny85. Therefore for the SPI mode the MISO pin becomes the DO (Data out) pin and the MOSI pin becomes the DI (Data in) pin. That was the explanation to the future possible incoming questions. : ) Final pin mapping for this mode is:

      pin1 -> DO   pin2 -> SCK
      pin3 -> CS    pin4 -> DI

      SPI clock frequency is tunable from the library. Also you can choose whether you want automatic CS control or manual control.

For the details of the overall usage, please refer to library examples.

    1. I2C mode

      Attiny85 also doesn’t have a real ‘I2C’ hardware but again the USI module can be configured as an I2C module. Little Wire firmware uses the TinyWireM library to handle the I2C communication. Pin mapping for this mode is:

      pin2 -> SCL    pin4 -> SDA

For the details of the overall usage, please refer to library examples.

  1. Bootloader support

Little Wire supports an UART bootloader to update onboard firmware. You can read more about it from http://blog.kehribar.me/?p=14 Pinout for the bootloader is:

pin1 -> Tx    pin4 -> Rx

Usage:

    1. Disconnect the Little Wire from the USB port

    2. Connect the TX/RX pins between the Little Wire and your serial port adapter

    3. Launch the fboot program with necessary parameters

      1. Example: To upload main.hex over the bootloader: (for com3) “fboot.exe -c3 -pmain.hex”

      2. Important! Fboot.exe program doesn’t support com port numbers higher than 4. You might need to remap your com port.

    4. After the program connected to the com port, plug the Little Wire into the USB port

    5. The new firmware should have been uploaded at this step. If anything goes wrong:

      1. First, check that you connected the cables properly

      2. Second, unplug the Little Wire and repeat the uploading process. Even the wiring is true, sometimes the bootloader works at the second/third trial.

  1. Computer interface

    1. Processing
      You don’t need to install any additional library for Processing. Just copy the LittleWire folder under .../Documents/Processing/libraries/ path. Currently for Windows only.
      Reference: http://littlewire.github.io/processing/

      Library and examples: https://github.com/kehribar/Little-Wire/tree/master/computer_interface/Processing

    2. C
      You have to install libusb to use this library.
      Reference: http://littlewire.github.io/c_library.html

      Library and examples: https://github.com/kehribar/Little-Wire/tree/master/computer_interface/C

    3. C++
      You have to install libusb to use this library.
      Reference: http://littlewire.github.io/c++/

      Library and examples: https://github.com/kehribar/Little-Wire/tree/master/computer_interface/C++

    4. C# (in development)
      You don’t need to install any additional library for C#. For Windows only. Currently in development. Not updated with the latest firmware features yet.
      Library and example: https://github.com/kehribar/Little-Wire/tree/master/computer_interface/C%23

  2. Printf style debugging over AVR-ISP pins!

This library enables you to send printf style debug messages from an Arduino compatible microcontroller system over AVR-ISP pins. Very helpful when you prototype an Arduino compatible system on a breadboard. There is a library available for Arduino, but it can be convertible to any other system. This is in an experimental stage. Pin mapping for this mode is same as the AVR programming mode.

For more information: http://blog.kehribar.me/?p=36

Arduino library: https://github.com/kehribar/Little-Wire/tree/master/arduino