ATAN0080 [APPLICATION NOTE]
9341B–AVR–02/15
10
5.
Example Software User Guide
The example software delivered with this board demonstrates some of the basic functions of the Atmel
®
ATTiny1634 and the
Atmel ATA663254. Depending on whether the supplied GUI is to be used, the software implements two different working
modes.
5.1
ATABtiny1634A-V1 in Stand-Alone Mode
The ATABtiny1634A-V1 and the power supply included in the kit are required for running in this mode. The kit must be
connected as outlined in
Section 2.1.1 “Kit Power Supply via a VBat Supply Voltage” on page 3
.
The jumpers need to be set to the following positions for the stand-alone mode to work as expected:
●
Header J6 - jumpers for LEDs 0-4 mounted 1-2, 3-4,5-6,7-8
●
Jumper J14 mounted
●
Header J1 mounted 1-3, 2-4
●
Jumper J2 mounted
●
Jumper J15 mounted 1-2,5-6,9-10
●
Jumper J9 mounted 1-2,5-6,9-10
●
Jumper J11 mounted
●
Jumper J12 not mounted
With this jumper setting the Atmel ATTiny1634 MCU uses the ADC to continuously measure the QTouch slider and the
potentiometer.
The LEDs D0-D1 display the status of the potentiometer and light up in roughly linear fashion compared to the potentiometer
position.
The D2-D4 LEDs display the status of the Atmel QTouch slider. If the QTouch buttons are to be displayed, the source code
has to be recompiled to use the buttons in stand-alone mode as described in Section 4.1.1 and jumper J15 must be
configured to interface with the QTouch buttons as described in
Section 4.1 “QTouch Sensors” on page 9
5.2
GUI-Connected Mode
A GUI running on a PC host is used to communicate with the gateway via the USB port for sending LIN commands to the LIN
slave node.
System functionality can be summarized as follows:
●
ATmega64M1 Xplained PCB is used as the LIN bus gateway and LIN bus master. It uses the USB port to
communicate with the host PC. It also uses the LIN bus and acts as a master for sending LIN messages to the LIN
slave.
●
The ATtiny1634A-V1 PCB is used as a LIN bus slave device with QTouch peripherals. The Atmel ATA663254 LIN
SBC transceiver interfaces to the LIN bus. The slave node can detect touch inputs and transmit the touch data on the
LIN bus to the LIN master gateway which then relays it to the host PC for display in the GUI window. By using the GUI
on the host, PC commands can also be sent to the LIN slave PCB, e.g., to switch on the LED. The input from the LIN
slave node can also be displayed in the GUI window, such as for displaying the push button or state of the
potentiometer in real time.
5.2.1
Evaluating the System with the GUI
To evaluate operation of the ATABtiny1634A board using the GUI, both the ATABtiny1634A board and the ATmega64M1
Xplained board must be properly configured as described in
Section 5.2.2 “Step-By-Step Instructions for Connecting and
. Once both boards are properly configured and interconnected and the ATmega64M1
Xplained board is connected by USB to a PC, then the GUI on the PC can be used to interact with the ATABtiny1634A
board. The software on the ATABtiny1634A board automatically switches from stand-alone operation to GUI-connected
operation when it detects a valid LIN frame.
Section 6. “GUI User Guide” on page 15
provides more detailed information on how to use the GUI. This mode works in a
manner very similar to stand-alone mode except that the potentiometer reading and the QTouch sensor status is reported to
the GUI via LIN instead of controlling the LEDs, allowing the LEDs to be controlled as outputs from the GUI.