Skip to content
nmz787 edited this page Jan 1, 2012 · 5 revisions

The device firmware is written in C using the Arduino programming environment. There are two firmware packages due to the dual-core nature of the device, one that controls the CCD and ADC, and one that streams the digitized data over USB and/or to a micro SD card.

Controller Core:

  • State machine
    • CCD integration time is the only part of the timing that is variable
    • CCD analog out must trigger a sync to ADC and Data Core
        • On sync ADC takes a reading, Data Core retrieves data from ADC and handles it
    • Probably an AtTiny87 or 167 (8kb vs 16kb flash)
      • The ATtiny87/167 provides the following features: 8K/16K byte of In-System Programmable Flash, 512 bytes EEPROM, 512 bytes SRAM, 16 general purpose I/O lines, 32 general purpose working registers, one 8-bit Timer/Counter with compare modes, one 8-bit high speed Timer/Counter, Universal Serial Interface, a LIN controller, Internal and External Interrupts, a 11-channel, 10-bit ADC, a programmable Watchdog Timer with internal Oscillator, and three software selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counter, ADC, Analog Comparator, and Interrupt system to continue functioning. The Power-down mode saves the register contents, disabling all chip functions until the next Interrupt or Hardware Reset. The ADC Noise Reduction mode stops the CPU and all I/O modules except ADC, to minimize switching noise during ADC conversions
      • http://www.atmel.com/dyn/resources/prod_documents/doc8265.pdf
      • $2 http://www.mouser.com/Search/Refine.aspx?N=4294759229&Keyword=ATTINY87-SU
Data Core:
  • FTDI USB 2.0 Hi-Speed communications (single to multi-wire bus)
    • More wires == faster transfer
    • Max data speed is 500khz @ 16 bits (via ADC), this is 4Mbps, with 1 wire SPI == 4Mhz
      • If the Arduino/ATmega can't handle 4Mhz via bit-bang or SPI peripheral, then more data lines needed
      • The WM8253 can support up to 4 data lines, the FT232H can do at least 4, if not 8
  • Micro SD library:
    • http://code.google.com/p/sdfatlib/