Tuesday, February 2, 2016

Technical Precisions About The Nusbio Device

What is Nusbio?

Nusbio is USB device that bring the following to a Windows machine and the Microsoft .NET Runtime:

Device

  • Gpios

    • 8GPIO pins
    • 3 or 5 volts 
      • Nusbio version based on the chip FT232RL can be changed between 3.3 and 5 volts (GPIO and VCC). In 2017 only the version based on the FT232RL will be sold.
      • Nusbio version based on the chip FT231X only the VCC can be changed between 3.3 and 5 volts. The GPIO are always 3.3 volts.
    • Modes: OUTPUT or INPUT PULL UP.
    • Maximum current per GPIO pin default 4 mA .
      The Console application allows to switch from 4 to 16 mA.
      In 16 mA of current mode we noticed that the I2C protocol does not work.
 Powering devices connected to Nusbio
    • The VCC output from Nusbio provides 5 or 3.3 volts and up to 500 mA of current as defined by the USB 2.0 standard.
    • The VCC output can be used to power other devices connected to Nusbio.
    • Some Nusbio version based on the FT231X have a fuse that will limit the consumption to 500 mA of current.
    • The voltage can be changed depending on the version as follow:
      • De-soldering the 5 volts connector and soldering the 3 volts connector.
      • Or switch the jumper between 5 volts and 3 volts
  • SPI Protocol

    • Mode

      • Clock MODE_CPOL0_CPHA0 supported and tested
      • The other 3 modes have been implemented but not tested.
    • Tested Devices

      • MCP3008 - 8 DAC
      • MAX7219 - 7-Segment Driver
      • 25AA256 - 32k EEPROM
      • 25AA1024 - 128k EEPROM
      • MCP23S08 - 8 Gpio Expander 
      • OLED drivers
        • SD1306
        • SH1106
      • SPI Compatible Devices
        • 74HC595 - Shift register
        • APA102 RGB LED
    • SPI Slave

      • Number of devices on an SPI bus. Since Nusbio comes with 8 gpios, we can control 5 (8-3 (clock, miso, mosi)) SPI devices on the same bus.
    • Transfert Speed

      • When data in and data out communication is needed (MOSI and MISO) the maximum transfer rate is around 15 k byte/s with no optimization.
      • With specific optimization for EEPROM downloading in batch of 128 pages of 64 bytes, the transfer rate can go up to 28 k byte/s.
      • Generally speaking when only data out communication is needed (no MISO) the transfer rate can go up to 20 k byte/s by using the class GpioSequence rather than the class SPIEngine. The class GpioSequence offers a way to optimize the bit banging.
      • Transfer speed vary depending on the SPI device and the Windows PC.
      • Nusbio and the C# class SPIEngine can transfer in one USB operation multiple SPI buffer (Select + Data + UnSelect + Select + Data + UnSelect).
      • Some SPI device like the OLED driver SH1106 or SSD1306, required on top of the Select pin (CS) another pin named D/C (Data or Command). Nusbio and the C# class SPIEngine can transfer in one USB operation multiple SPI buffer (Select + D/C + Data + UnSelect + Select + D/C + Data + UnSelect. (See our source code on GitHub).
  • I2C Protocol

    • Tested Devices:
      • 24LC256 32k EEPROM
      • MCP2308 - 8 Gpio Expander 
      • MCP9808 - Temperature sensor
      • MCP4725 - 12Bit DAC 
      • HT16K33 - Matrix Driver 
      • Adafruit I2C LED Matrix devices
    • Transfer Speed 
      • The tests were performed by downloading 32k from the I2C EEPROM 24LC256 . 
      • Transfer speed around 7.5K byte/s. 
      • Transfer speed vary depending on the device and the Windows PC.
  • SPI and I2C Protocol Combined

    With Nusbio it is possible to control SPI and I2C devices from the same configuration. For example

    • GPIO 0,1,2 would be reserved for SPI BUS: CLOCK, MOSI and MISO
    • GPIO 3,4,5 would be used as SELECT for 3 SPI Devices
    • GPIO 6,7 would be used as SDA and SCK for the I2C bus, allow to control up to 127 devices

  • UART

    Nusbio can also play the role of an UART (FTDI cable, FTDI Friend) to upload data into an micro-controller like an Adafruit Trinket or Diavolino.
    The .NET library MadeInTheUSB.Lib.dll does not support this mode. The Arduino IDE will support Nusbio to upload code into an micro-controller with no UART.

    Videos

  •  Library/Assembly

    • The MadeInTheUSB.Nusbio.Lib .NET assembly give access to the Nusbio device to any .NET language.
    • The MadeInTheUSB.Nusbio.Components assembly contains classes for specific components including the one used in the Nusbio's extensions.
    • Github Source

  • Internal EEPROM

    Nusbio can store up to 32 bytes of data into the Description field. Though the Description property is a .NET string, the EEPROM only support ASCII string.
  • Unique Serial Number

    Each Nusbio device is initialized with a unique Serial Number. See property SerialNumber.

Chip

Nusbio is based on the FTDI FT231X chip (Datasheet) or the FT232RL.
In 2017 only the FT232RL chip is used.

No comments:

Post a Comment