background image

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 

Operating the Kit” on page 11

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.

Summary of Contents for ATtiny1634-EK1

Page 1: ...gital I O Six user LEDs Various headers for direct access Two possible power sources for the Atmel ATtiny1634 MCU Voltage regulator of the Atmel ATA663254 SBC External 5V header Connectivity LIN Bus K...

Page 2: ...f I Os provided directly on the board all MCU I O signals are made available on the header pins to support easy connection to external I Os When combined with available embedded software the ATABtiny1...

Page 3: ...nput socket on the ATABtiny1634A V1 PCB to supply the board with power 2 1 2 Supplying Power to the MCU and the LIN SBC Independently This power supply variant allows more current to be driven than is...

Page 4: ...ng the connections as shown in Figure 2 2 the outer red and black cables cross the middle cable The pin descriptions on the silkscreen should be read carefully Figure 2 2 LIN Connection 2 1 4 Configur...

Page 5: ...ntaining schematics BOM assembly drawings 3D plots layer plots software etc 2 Atmel Studio http www atmel com atmelstudio free Atmel IDE for development of C C and assembler code for Atmel microcontro...

Page 6: ...ve node J5 J5 1x8 connects ATABtiny1634A V1 PCB to external power supply VCC LIN_VS GND LIN IO pin VCC_VREG and external power supplies VCC_MCU VCC_IO J6 J6 2x6 connects the Atmel ATtiny1634 IO ports...

Page 7: ...Table 3 4 J6 Header LEDs Pin Description 1 PORTC2 2 LED0 cathode 3 PORTA1 4 LED1 cathode 5 PORTC4 6 LED2 cathode 7 PORTC5 8 LED3 cathode 9 PORTC0 10 LED4 cathode 11 PORTC1 12 LED5 cathode Table 3 5 J7...

Page 8: ...NC 8 NC 9 J15 pin 10 10 R3 touch channel 0 K C8 touch channel 0 S 11 NC 12 NC Table 3 8 J13 Header QTouch Debug Pin Description 1 GND 2 MOSI 3 SCK Table 3 9 J15 Header QTouch Sensor Pin Description 1...

Page 9: ...9 10 4 2 LEDs Six LEDs can be used to display the status of the application The relevant headers are J6 and J1 To use the LEDs the pins on the J6 header must be connected 1 2 3 4 etc To use the LED2 a...

Page 10: ...stem 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...

Page 11: ...0 to interface to the QTouch slider Note the kit is shipped in this default configuration To use QTouch buttons Connect jumpers to J15 pins 2 4 6 8 and 10 12 use three 1x2 jumpers to interface to the...

Page 12: ...UI by executing ATA1634_GUI exe supplied in the kit download package 7 Once the main window opens the QTouch sensor configuration can be selected in the board setup section select Buttons if J15 is co...

Page 13: ...ted the USB Connected message appears at the bottom of the GUI win dow as shown in Figure 5 2 The incrementing frame count is also shown indicating proper data communication between the LIN nodes 8 Se...

Page 14: ...ble and restart the GUI application to reset the PCB USB LED must flash green red and the LED0 must alternate between ON and OFF 10 During normal operation the LIN frame counters should increment whil...

Page 15: ...ith the slider for enabling QTouch debugging and for disabling LIN autobaud 3 Board control and status area For controlling the board LEDs and viewing the status of the board potentiometer and QTouch...

Page 16: ...to control the ATABtiny1634A board LEDs the LEDs on the board will correspond to the selection on the GUI assum ing the board jumpers are properly configured 4 Potentiometer status Follows the potenti...

Page 17: ...a 4 Stop Press to stop message logging changes to start after being pressed 5 Start Press to start message logging changes to stop after being pressed The default software supports 2 LIN message frame...

Page 18: ...dly or once only single shot Periodic messages are continuously sent until stopped by the user or until this window is closed 4 Used to select between subscribe and publish 5 Send Press to send the me...

Page 19: ...AVR 02 15 Figure 6 5 Screen 5 Status Tool 1 Launch from the application tools menu Connec tion status 2 Displays USB connection status connection time approximately in seconds and various counters 3...

Page 20: ...1 4 Configuring the ATmega64M1 Xplained on page 4 LEDs 1 to 4 on J8 should never be connected i e the jumpers should not be mounted When connecting the power and starting the GUI as described in Secti...

Page 21: ...sh a connection to a programmer the autobaud jumper J12 and the jumper on J6 connecting LED5 must be removed The NRST jumper should also be removed to avoid tool connection problems 9 Revision History...

Page 22: ...UMENT EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and r...

Page 23: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Microchip ATA1634 EK1...

Reviews: