Customizing the Microcontroller
|"Microcontroller"||microcontroller to generate code for|
|"OperatingVoltage"||operating voltage of the microcontroller|
|"ClockFrequency"||frequency of the microcontroller's system clock|
|"I2CAddress"||I2C address when operating as a I2C slave device|
|"SlaveSelect"||slave select pin when operating as a SPI slave device|
At each sampling instant the microcontroller reads the input signals, updates the states, computes the outputs, and sends the outputs out. When the sampling period is reached, the timer is reset and the process is repeated all over again. During each sampling period the microcontroller is busy for some time and idle for the remaining time, except if it has to deal with any interrupts that are triggered.
The information to set up the microcontoller to sample at each sampling instant can be found in its datasheet. By default, a timer and its parameters are automatically chosen. They can also explicitly set.
|"delay"||uses the delay function from the Arduino library|
|"delayMicroseconds"||uses the delayMicroseconds function from the Arduino library|
|"millis"||uses the millis function from the Arduino library|
|"micros"||uses the micros function from the Arduino library|
The settings "delay", "delayMicroseconds", "millis" or "micros" uses functions from the Arduino libraries. The microcontroller first completes all its tasks, delays for τ seconds, and then starts all over again.
The setting None can be used for continuous operation. The new set of inputs are read immediately after the outputs are sent out. This can be used when the sampling period can be safely neglected. The timer is not set up in this case.
|"ADC"||A/D conversion specifications|
|"Serial"||serial communication specifications|
|"SerialOverUSB"||serial over USB specifications|
|"IncludeFiles"||files to include|
|"Definitions"||definition of macros|
|"Utilities"||utility functions and variables|
|"Loop"||execute at each sampling instant|
|"PreLoop"||execute before "Loop"|
|"PostLoop"||execute after "Loop"|
|"UntimedLoop"||execute repeatedly whenever the processor is free|
In some cases several pins, input, or output channels share a common functionality. For example, the analog to digital conversion is multiplexed among several input pins, or the same serial communication pins are used by several inputs and outputs. The setting in the microcontroller suboptions such as "ADC" and "Serial" will apply to all these channels.
Consider a setup where two MAX6675 thermocouples are reading data. They both use the same SPI bus, and the exchange sequences are also the same. However different pins are used to select them as slaves.
Some microcontroller boards such as the Arduino Yun rely on being configured as a Communications Device Class (CDC) device to automatically upload new programs on to the board. This functionality also is useful during the operation of the device in cases such as virtual serial communication. With the "CDC" option you may choose to eliminate this functionality to reduce the program footprint and upload new programs by manually resetting the board.
|"Basic", Automatic||add basic CDC functionality|
|None||do not add CDC functionality|
Since removing the CDC functionality could result in the board going into a locked state, be sure of the consequences before evaluating the following inputs. If unsure, you can safely evaluate them without physically connecting the Arduino Yun.