Atmel STK511 User Manual

STK511
....................................................................................................................
AVR-based Uni-directional Radio Starter Kit
User Guide
4842B–AVR–10/09
Table of Contents
Section 1
Overview .................................................................................................................... 1-1
1.1 Features............................................................................................................................. 1-1
1.2 Introduction ........................................................................................................................ 1-1
Section 2
Getting Started ........................................................................................................... 2-1
2.1 Setting up the Hardware .................................................................................................... 2-1
2.2 Configuring the Receiver ................................................................................................... 2-1
2.3 Running the Demo .............................................................................................................2-2
2.3.1 STK500 Configuration ......................................................................................... 2-2
2.3.2 STK511 Receiver Interface Board Configuration................................................. 2-3
2.3.3 Using the Transmitter .......................................................................................... 2-3
2.4 Evaluating the Demo..........................................................................................................2-3
Section 3
STK511 Receiver Board............................................................................................. 3-1
3.1 Hardware Description ........................................................................................................ 3-1
3.1.1 Overview.............................................................................................................. 3-1
3.1.2 IC_Active LED ..................................................................................................... 3-1
3.1.3 CDEM Capacitor.................................................................................................. 3-1
3.1.4 Mode Selection.................................................................................................... 3-1
3.1.5 XTAL Oscillator.................................................................................................... 3-2
3.1.6 Signal Testpoints ................................................................................................. 3-2
3.1.7 Antenna Matching................................................................................................ 3-2
3.2 Software Description.......................................................................................................... 3-3
3.2.1 Overview.............................................................................................................. 3-3
3.2.2 Sample Software ................................................................................................. 3-3
Section 4
STK511 Receiver Interface Board..............................................................................4-1
4.1 Hardware Description ........................................................................................................ 4-1
4.1.1 Standalone Configuration .................................................................................... 4-2
4.1.2 STK500/511 Assembly Configuration.................................................................. 4-3
4.2 STK511 RF Receiver Interface Board ............................................................................... 4-3
4.2.1 Receiver Connectors ........................................................................................... 4-3
4.2.2 Configuration Register DIP Switches................................................................... 4-4
STK511 User Guide i
Table of Contents (Continued)
4.3 Software Description.......................................................................................................... 4-6
Section 5
STK511 Transmitter Board.........................................................................................5-1
5.1 Hardware Description ........................................................................................................ 5-1
5.2 Software Description.......................................................................................................... 5-5
4.2.3 Configuration Register LED Indicators ................................................................ 4-5
4.2.4 DATA Selector Switch ......................................................................................... 4-5
4.2.5 Configure Push Button ........................................................................................ 4-5
4.2.6 On-board Microcontroller ..................................................................................... 4-5
4.2.7 Receive Signal Routing ....................................................................................... 4-6
4.3.1 Overview.............................................................................................................. 4-6
4.3.2 Sample Software ................................................................................................. 4-7
5.1.1 Overview.............................................................................................................. 5-1
5.1.2 Physical Features ................................................................................................ 5-1
5.1.3 Functional Features ............................................................................................. 5-2
5.1.4 Circuit Description................................................................................................ 5-3
5.2.1 Overview.............................................................................................................. 5-5
5.2.2 Sample Software ................................................................................................. 5-5
Section 6
Regulatory Requirements...........................................................................................6-1
6.1 General .............................................................................................................................. 6-1
6.2 Output Field Strength/Power.............................................................................................. 6-1
6.3 Operating Frequency ......................................................................................................... 6-2
6.4 Operating Duty Cycle.........................................................................................................6-2
6.5 Additional information ........................................................................................................ 6-2
Section 7
Troubleshooting Guide...............................................................................................7-1
ii STK511 User Guide
4842B–AVR–10/09

1.1 Features

Plug-in Connectors Accept ATA5743/44/60/61 RF Receiver Application BoardDIP Switches Define Configuration Register SettingsLED Indicators Provide Programming Status of Configuration Register Data Selector Switch Enables Fast Transition Between Operating Modes Configuration Programming Button Simplifies ProgrammingFully Compatible STK

1.2 Introduction

This document explains the operation of the STK511 – an AVR®-based UHF Radio Evaluation Kit. The STK511 Starter Kit was developed as a tool for evaluating Atmel's receivers (ATA5743, ATA5744, ATA5760 and ATA5761) and transmitters (T5750, T5753 and T5754). Although most Atmel receivers require programming of configuration registers via a bi-directional, one-wire interface, this kit provides register programming in an easy to use way for the customer to quickly evaluate an AVR-based UHF Radio system. Included in this kit is software to evaluate both ASK and FSK modulated radio systems across the RF spectrum of 315 transmitters. While above mentioned ICs are supported by this kit, pre-configured kits are only available for 868
®
500 Interface Connectors
MHz to 915 MHz and complete reference designs for receivers and
MHz (using ATA5760 and T5750) and 915 MHz (with ATA5761 and T5750).
Section 1 Overview
In addition to providing a quick, one-step, programming tool for configuring Atmel RF receivers, the Receiver Interface Board of the STK511 Starter Kit doubles as an expansion card for the STK500. This allows the user to develop software for receiver applications using any of the AVR microcontrollers sup ported by the STK500. The STK511 Starter Kit, when combined with the STK500, enables extremely quick prototype development for customers interested in Atmel's UHF radio design solutions.
STK511 User Guide 1-1
-
Overview
Figure 1-1. STK511 Starter Kit
Included in the Kit:
STK511 Receiver Interface BoardRF Receiver Application Board (one of the following)
– ATA5760 (868 MHz) – ATA5761 (915 MHz)
RF Transmitter Application Board
– Tiny13 + T5750 (868/915 MHz)
CD containing sample softwareOne CR2032 batteryExternal whip antenna (RX only, TX antenna is PCB trace)
Optional items not included in the kit:
Atmel AVR STK500 Starter Kit and Development System
1-2 STK511 User Guide
4842B–AVR–10/09
The STK®511 Starter Kit comes complete with all the hardware needed to demonstrate a working RF system. Included are the STK511Interface Board, RF Receiver Application Board, and RF Transmitter Application Board.

2.1 Setting up the Hardware

The Receiver Application Board should be oriented with its signal pins toward the DIP switches and LEDs on the STK511 Receiver Interface Board. This places the power and ground test points on the top of the receiver board adjacent to the DATA selector switch. Insert the receiver board into the provided connectors.
If the STK511 Receiver Interface Board is used as an expansion card for the STK500, align the EXPAND0 and EXPAND1 connectors with the corresponding EXPAND0 and EXPAND1 headers on the STK500 and press together. Be cautious of pinching any ribbon cable ends on the STK500 board when inserting the STK511 Receiver Interface Board into the connectors.
Once the Receiver Application Board has been inserted into both twelve-pin connectors, power must be supplied in one of two ways:
Section 2

Getting Started

A) the power and ground pins on the Receiver Application Board can be connected to a +5V supply, or
B) the supply can be sourced through the STK500 connectors EXPAND0 and EXPAND1.
If the STK500 is used to source power, the VTARGET jumper (located on the STK500) must be con­nected and VTARGET set to 5V in the STK500 board settings located under the appropriate tab in AVR
®
Studio
, Atmel's software development tool.

2.2 Configuring the Receiver

Atmel RF Receivers designated ATA5743, ATA5760 and ATA5761 contain two configuration registers (Atmel RF receiver designated ATA5744 does not). These registers control the digital processing of the incoming RF signal, as well as define the receivers’ polling interval. The register values are stored in vol atile memory and are lost when power is removed; therefore, they must be re-programmed every time power is applied. Programming is achieved with a one-wire protocol using the receivers’ DATA line. This line is bi-directional and is also used for providing the demodulated data to the user. More detail on this can be found in the individual receivers’ datasheets.
With this in mind, the user must decide how to configure the receiver for the intended application. To illustrate this process, the following example will show how to change the receiver to ASK from its default mode of FSK.
-
STK511 User Guide 2-1
Getting Started
1. Once the hardware is setup, verify that the DATA selector switch is in the STK511 position.
2. Apply power, locate the DIP switch corresponding to the OPMODE register, and set the 5th DIP switch to the ON position. The LED enclosed in the silkscreen legend labeled Mod should light up, indicating a 1 (corresponding to ASK mode) was selected.
3. Press the Configure button to program the OPMODE and LIMIT registers with the selected configuration.
Now, the receiver is ready to receive an ASK (or in most cases, On-Off Keyed - OOK) signal. The demodulated signal appears on the DATA line of the Receiver Application Board. This signal can be routed to the on-board microcontroller or to the STK500, depending on the position of the DATA selector switch and values of jumpers R25-R32 ( information).

2.3 Running the Demo

The Transmitter Application Board contained in the evaluation kit is shipped preprogrammed with a light intensity sensor program. It can be used with the STK500/511 Assembly to display ambient light inten sity using LEDs on the STK500. To run this demo it must first be properly configured.

2.3.1 STK500 Configuration

1. Insert an AT90S8515 microcontroller into the red 40-pin socket (SCKT3000D3) on the STK500 board.
2. Verify that the 6-pin ribbon cable is connected between the SPROG3 and the ISP6PIN headers and is oriented correctly.
3. Connect the 10-pin ribbon cable from the LEDS header to the PORTC header.
4. Apply power (12 V) to the supplied connector and turn on the STK500 power switch.
5. Connect the serial cable between RS232 CTRL and the host PC.
6. In AVR Studio, select Tools/STK500 from the menu.
7. Select the Board tab and verify that the VTARGET voltage is set to 5 V.
8. On the Program tab, select AT90S8515 from the Device pull-down menu.
9. Load the STK511 RX Decode.hex file, included on the Sample Software CD, into the field labeled Flash Input Hex File and press the Program button (see Figure 2-1 on page 2-2).
See “Receive Signal Routing” on page 4-6. for additional
-
Figure 2-1. Receiver Decode Software
2-2 STK511 User Guide
4842B–AVR–10/09

2.3.2 STK511 Receiver Interface Board Configuration

1. Verify that the Receiver Application Board has been inserted into the appropriate sockets on the STK511 Receiver Interface Board.
2. Connect the STK511 Receiver Interface Board to the STK500 by aligning EXPAND0 and EXPAND1 connectors and pressing together.
3. Switch the Data Selector switch to the STK511 position.
4. Verify power is supplied to the STK500 board.
The Transmitter Application Board as shipped will be set to run with the default receiver configuration register settings. The DIP switches on the STK511 Receiver Interface Board should be set according to the following values:
DIP switch #1….………..#12
OPMODE register: 000100011001
LIMIT register: 010101101001
Note: The default values are also shown on the bottom line of the silkscreen on the STK511 board.
5. Once the DIP switches have been properly set, press the Configure button to write these values into the receiver's registers.
6. Switch the Data Selector switch to the STK500 position and the receiver is now ready to pass data from the transmitter to the STK500 for decoding.
Getting Started

2.3.3 Using the Transmitter

To conserve battery life, the transmitter is shipped in a low current sleep mode. Pressing one of the two buttons will awaken the transmitter from its sleep mode and initiate periodic data transmissions corre sponding to the level of ambient light. Simultaneously pressing both buttons will toggle the modulation between ASK and FSK modes. If both LEDs blink during transmission then FSK is selected. If only one LED blinks while transmitting then ASK modulation is selected. The periodic RF transmission rate can be selected to occur quickly or slowly. Pressing one of the buttons results in a transmission rate of once every ¼ second while pressing the other button results in a transmission once every 8 seconds. The transmissions occur after the button is released. The transmitter enters a “sleep” mode after 30 seconds of activity.
It is possible to reprogram the transmitter via the supplied 6-pin header. For more information on how this is done,
See “Hardware Description” on page 5-1..

2.4 Evaluating the Demo

Once the system is set up, operation is straightforward. The transmitter will send light intensity informa­tion data periodically. This will be displayed as a bar graph using the LEDs on the STK500. For real-time updates, set the transmission rate to ¼ second intervals on the transmitter. Slowly cover up the transmit ter to view the LED bar graph change in response to changes in light intensity. Conversely, exposing the transmitter to a light source will cause the LED bar graph to illuminate more LEDs.
-
-
It is also possible to view the data being sent by connecting an oscilloscope to the test point on the Receiver Application Board labeled DATA. This test point can also be used to view the programming commands when the Configure button is pressed.
STK511 User Guide 2-3

3.1 Hardware Description

3.1.1 Overview

The Atmel UHF receivers ATA5743, ATA5760, and ATA5761 are considered intelligent receivers. They demodulate and process the incoming ASK or FSK RF signal before providing a digital output to the user. These receivers are well suited for low cost, low data rate transmissions. For more detail about the receiver IC, refer to its respective datasheet. This section will focus on the design and features of the Receiver Application Board.

3.1.2 IC_Active LED

The IC_Active signal on the Receiver Application Board provides status of receiver IC activity. If it is low, then the receiver is in sleep mode. When the receiver is in the active mode, the IC_Active line is driven high. The LED on the Receiver Application Board gives a visual indication of the value of this signal by turning on when IC_Active is high. When selected, polling will cause the IC_Active signal to pulse. This may cause the LED to illuminate less brightly. This is normal and provides the user with an intuitive indi cation of how often the receiver IC is in the active mode.
Section 3

STK511 Receiver Board

-

3.1.3 CDEM Capacitor

The CDEM capacitor, on the Receiver Application Board, works in conjunction with the Baud Range to set the data bandpass filter corner frequencies. The Baud Range is set in the receiver configuration reg isters and establishes the upper corner frequency, while the CDEM capacitor establishes the lower corner frequency of the data bandpass filter. A sufficiently large capacitor value must be used to allow the lowest frequency of the data to pass through. However, too large a capacitance results in poor set tling times and can skew or truncate incoming RF data. For suggested capacitance values for different Baud Rates, refer to the individual receiver datasheets.

3.1.4 Mode Selection

Unique to the Atmel ATA5743 only is the MODE input. This input changes the IC's internal basic clock cycle and can affect the polling duty cycle and Bit Check timing limits. If the receiver board was built for 315
MHz operation, the MODE input was connected to ground. If the board was built for 434 MHz, oper­ation, the MODE input was connected to + supply. The proper connection of the MODE input is achieved using resistor network R5/R6. 315 434
MHz operation corresponds to R5 populated with a 0Ω resistor and R6 left unpopulated.
Note: Changes to the MODE input also requires changes to the crystal oscillator, loop filter, LNA, and antenna
-
-
MHz operation corresponds to R5 unpopulated and R6 a 0 Ω resistor.
matching components. It is strongly recommended that the datasheet be referenced before attempting to make changes to the operating frequency.
STK511 User Guide 3-1
STK511 Receiver Board

3.1.5 XTAL Oscillator

The internal local oscillator (LO) for the receiver is determined by a scaled representation of the crystal frequency. The scale factor is different for each receiver. The ATA5743 receiver uses the crystal fre quency times sixty-four to achieve the LO frequency. The ATA5760 and ATA5761 both use the crystal times 128 for the LO. This scaling factor must be taken into consideration when determining the crystal frequency. The following illustrates how the crystal oscillator frequency can be calculated.
To determine the proper crystal frequency, subtract the intermediate frequency (IF) from the carrier fre­quency and then divide by the scaling factor for that IC. The IF for the receivers supported by this kit is about 1 below.
XTAL (f) = (315 MHz – 1 MHz)/64
The crystal manufacturer should specify the load capacitance for the crystal. It is recommended that the center frequency of the crystal be verified to ensure optimal operation of the receiver. This can be done by carefully measuring the RESET_MARKER frequency. This occurs on the DATA pin upon first applica tion of power and has a frequency of 1/(4096 × T device datasheet for more details pertaining to T
MHz. Using the ATA5743 at a carrier frequency of 315 MHz, the crystal frequency is calculated
= 314 MHz/64 = 4.90625 MHz
CLK
CLK
.
), where T
is the basic clock cycle. Refer to the
CLK
-
-

3.1.6 Signal Testpoints

Several testpoints were included on the Receiver Application Board to provide access to key signals. Signals accessible through testpoints are labeled Data, DCLK (DataCLK), and Polling (Enable).
The Data testpoint provides access to the main interface to the receiver IC. This is a bi-directional line that passes data to and from the receiver. It is an open collector output on the receiver so an external pull-up resistor is included on the Receiver Application Board.
DCLK (DataCLK) provides access to the Data Clock output from the receiver. This signal only appears under certain conditions but can greatly reduce the software effort needed to decoding the transmission. For the Data Clock to appear, the received RF signal must be encoded using Manchester or Bi-phase format. These forms of encoding are unique in that the duty cycle is always 50% regardless of the bit value transmitted. In this encoding scheme, sending sequential bits of the same value results in a square wave with some edge-to-edge time T. When the value of the bits sent is different from the previous one, the edge-to-edge time becomes 2T. The receiver looks for this transition from T to 2T and is able to syn chronize with the incoming transmission. Consequently, the receiver places Data Clock pulses on the D_CLK line that correspond with valid demodulated data.
The Polling (Enable) testpoint is an input signal to the receiver and allows the user to quickly place the receiver in the active mode (receiver continuously active). Asserting this signal low will cause the receiver to enter the active receive mode. Incoming signals will be processed according to the configura tion set in the registers. A logic high, places the receiver in the polling mode with sleep times set by the value in the OPMODE register.
-
-

3.1.7 Antenna Matching

On the Receiver Application Board, provisions have been made to match the receiver IC to an antenna. This match may include a SAW filter in some cases. This SAW filter is not required but can be used to achieve more image suppression. As shipped, the Receiver Application Board is matched to 50
Ω at the
SMA. It is intended for use with an off-the-shelf external whip antenna. An antenna with an impedance different from this will require additional matching.
3-2 STK511 User Guide
4842B–AVR–10/09

3.2 Software Description

3.2.1 Overview

Decoding of the incoming digital signal from the receiver is performed by the AT90S8515 microcontroller onboard the STK500 in socket SCKT3000D3. The demodulated RF signal present on the receiver DATA line is routed to bit 4 of PortB. Also the D_CLK (Data Clock) line, provided by the RF receiver, is routed to bit 2 of PortB. For this demo, the RF signal is in Manchester format.
It is possible to decode the data by measuring edge-to-edge timing of this line, but many Atmel receivers simplify this task by recovering the clock from the DATA signal. This clock can be found on the D_CLK line and will only appear when a predefined number of logic 1s (set in the OPMODE register under Bit Check) are followed by a logic 0. This logic 0 is considered the start bit and from this point forward the D_CLK line will provide a low going pulse for each data bit. The decoding microcontroller watches for these data clock pulses and records the state of the DATA line at each occurrence. The logic state of the DATA line following each clock pulse signifies the bit value.
Three 8-bit registers are reserved for buffering the incoming data. As the demodulated signal is received and decoded, as described above, it is loaded into these registers. Once this is complete, the three received bytes are compared to each other. For the received data to be considered valid at least two of the three received bytes must match. This redundancy improves system integrity.
STK511 Receiver Board
A valid message results in the display of data on the LEDs of the STK500 board.

3.2.2 Sample Software

Below is a sample of the Demo Receive Software that decodes the incoming demodulated signal:
/*********************************************
Function : CheckRX Date : 6/22/2004
Author : Toby Prescott
Company : Atmel Comments: Decode logic for incoming demodulated signal
*********************************************/
void CheckRX(void) {
// Initialize variables
int timeOut = 0, timeOutVal = 1000, i, j; int flag1 = 0, flag2 = 0;
// Look for D_CLK to begin pulse. This is for the start bit while(!flag1 && timeOut < timeOutVal)
{
}
// Check D_CLK. Exit when low
if(PINB.2 == 0){flag1 = 1;} // Increment timeout
else if(PINB.2 == 1){timeOut++;}
STK511 User Guide 3-3
STK511 Receiver Board
}
// If D_CLK pulse was found continue to decode the incoming data if(flag2)
{
timeOut = 0;
// Look for D_CLK to end pulse.
if(flag1) {
while(!flag2 && timeOut < timeOutVal)
{
// Check D_CLK. Exit when high
if(PINB.2 == 1){flag2 = 1;}
// Increment timeout else if(PINB.2 == 0){timeOut++;}
}
// Loop until all three bytes have been read in for(j = 0; j < 3; j++)
{
// Loop until eight bits of each byte have been read in. for(i = 8; i > 0; i--)
{
flag1 = 0; // Clear the flag timeOut = 0;// Clear timeout count
// Look for D_CLK to begin pulse.
while(!flag1 && timeOut < timeOutVal) {
// Check D_CLK. Exit when low
if(PINB.2 == 0) {
flag1 = 1;
//PORTD = 0x00;//For debug }
// Increment timeout
else if(PINB.2 ==1){timeOut++;}
}
flag2 = 0;// Clear the flag
timeOut = 0;// Clear timeout count
// Look for D_CLK to end pulse.
if(flag1) {
while(!flag2 && timeOut < timeOutVal)
3-4 STK511 User Guide
4842B–AVR–10/09
Loading...
+ 26 hidden pages