MT-DB-U2
Manual
whenconnected) as well as blink when data is transferred. Otherwise, the LED will be left on and you can
manually control it. The default setting is USB_LED_ENABLED.
USB_AUTOFLUSH_ENABLED, USB_AUTOFLUSH_DISABLED
If USB_AUTOFLUSH_ENABLED is set, the upstream buffer (to the PC) will be flushed at periodic
intervals. The hardware USB DPRAM is used for the RX and TX buffers. There are actually two buffers per
direction in a pingpong configuration. As one buffer fills up, it is swapped with the other, allowing the USB
hardware to read from the filled one, and the user to write to the empty one. Any number of characters can
be sent to the upstream buffer without any need to manage it, but it must be flushed at the end of the
transmission if USB_AUTOFLUSH_ENABLED is not set. In this case, use Serial.flush(). The default setting
is USB_AUTOFLUSH_ENABLED.
USB_WAITFORCONNECT_DISABLED, USB_WAITFORCONNECT_ENABLED
If USB_WAITFORCONNECT_ENABLED is set, Serial.begin() will wait for the host to open a
connection before returning. That is, a program like a terminal emulator or serial monitor must connect to
the COM port before continuing. This is different than the USB CDC connection. This is useful to prevent
the board from sending data before the host is ready, and is required in many cases for microcontrollers
with onboard USB (ie: Leonardo). The wait is performed using: while(!Serial); The default setting is
USB_WAITFORCONNECT_DISABLED.
USB_AUTORESET_ENABLED, USB_AUTORESET_DISABLED
If USB_AUTORESET_ENABLED is set, the bootloader will be invoked automatically by the Arduino
IDE. If USB_AUTORESET_DISABLED is set, a manual reset will be required to enter the bootloader. Note
that the HWB jumper must be installed for the bootloader to be invoked, regardless of method. The only
exception is when there is no sketch yet installed. With the jumper removed, the sketch (if present) will
always run. There is no delay. The default setting is USB_AUTORESET_ENABLED.
Updated Tone.cpp
Tone.cpp now supports multiple simultaneous tone generation (one tone per timer).
The MTDBU6 currently supports up to 4 simultaneous tones using timers 3, 1, 2,
and 0 if not using the RTC, otherwise, timers 3, 1, and 0 are used for 3 tones.
The MTDBU4 currently supports up to 3 simultaneous tones using timers 3, 1, and 0.
A future release may support a fourth tone from timer 4. The MTDBU2 and MTDBU1
support 2 simultaneous tones using timers 1 and 0. Note that timer 0 has a lower
accuracy for tone generation because it is 8bit (timers 3 and 1 are 16bit). Note
also that use of timer 0 temporarily disables the use of delay(), USB autoflushing,
and proper USB LED handling, all of which will return to normal operation once the
tone stops playing. Thus, timer 0 is set with the lowest priority. For example, if
generating DTMF tones on the MTDBU4, timers 3 and 1 will be used. However, the
MTDBU2 and MTDBU1 will both use timer 0 for the second tone.
October 29, 2015
16