Atmel STK511 Скачать руководство пользователя страница 26

STK511 Transmitter Board

STK511 User Guide

5-3

4842B–AVR–10/09

Multi-function Ports: The ATtiny13 has excellent I/O capabilities, despite its 8-pin packaging, due to 
multiple functionality of each I/O pin (excluding V

CC

 and GND). Because of this flexibility, ISP program-

ming, external (pin-change) interrupts, analog signal input, external clock input, and many other features 
are possible. 

Low-current Sleep Mode: Three levels of sleep are possible with the ATtiny13, each offering a different 
combination of in-sleep/wake-up capabilities and current-saving options. One configuration, as demon-
strated in the accompanying demo software, permits the ATtiny13 to draw less than 1 µA of current while 
asleep. 

Internal RC Oscillator: The ATtiny13 contains a fuse-selectable, calibrated internal RC oscillator, which 
provides a 4.8 MHz or 9.6 MHz clock. No external components are required. The accuracy of the oscilla-
tor is ±10% of the nominal frequency. Atmel Application Note AVR053 outlines a method to re-calibrate 
the oscillator to an accuracy approaching ±1%.

External Clock Input: In addition to an internal RC oscillator clock source, the ATtiny13 can accept an 
external clock signal. The T575x transmitter ICs can provide this buffered clock if a 0-

Ω

 resistor is 

installed at the R1 location on the transmitter application board. The frequency of this T575x-supplied 
clock is f

XTAL

/4. 

5.1.4

Circuit Description

Button-inputs S1 and S2: Two button inputs allow the user to control the function of the transmitter. 
These button inputs are connected between ports PB1/PB2 of the ATtiny13 and the +3 V supply.   Ini-
tially, these ports are set as input, a hi-Z tristate condition. The voltage level on these ports is held low by 
the two 220k resistors, R7 and R8, to ground. This is necessary because the voltage at the T575x 
PA_ENABLE port must be < 0.25 V to remain low, or else RF energy could be inadvertently radiated. 
Resistors R2 and R6 limit the current into these two ports. When a button is pushed, the +3 V supply 
(through the R6/R7 or R2/R8 voltage divider) is presented to the corresponding port (PB1 or PB2, 
respectively). This change in level on the port pin is sensed by the microcontroller and a pin-change 
interrupt is generated. Firmware then directs the microcontroller to the appropriate Interrupt Service 
Routine vector. 

Indicator LEDs: Activity on switches S1 and S2, as well as the port states of PB1 and PB2 (such as 
transmitter activation, or ASK/FSK modulation), is indicated on these LEDs. R4 and R9 are source-cur-
rent-limiting resistors.

A/D Converter: The ATtiny13 has a built-in 10-bit A/D converter. The STK511 transmitter demonstrates 
the capability of this ADC with a CdS cell incorporated as a light-intensity sensor. This cell has a dark 
resistance of ~200 k

Ω

 and an illuminated resistance < 100 

Ω

. In the circuit, resistor R3 sets the bias from 

port PB4 (when set to output high) on the CdS cell. R3 is also a part of a voltage divider with R5 that 
determines the input voltage range to the ADC port (PB3). In addition, the parallel resistance of R5 and 
the CdS cell is calculated to provide a range of ~0 V up to 1.1 V to the ADC input (1.1 V is the internal 
voltage reference value for the ADC).

Antenna: The STK511 transmitter incorporates a PC-board-trace loop antenna. The antenna is driven 
by the single-ended output of the T575x through port ANT1. Bias voltage for the T575x’s power amplifier 
is fed to ANT1 through a printed-trace inductor of 50 mH-100 mH, L2. At the output of the T575x, C2, 
C10, and L2 form a matching network, which can be set-up as a C, L, LC, or 

π

 configuration. C4 and C5 

are additional matching capacitors, which compensate for the inductance of the loop. The optimum load 
(ie, antenna) impedance for the T5750/3/4 can be found in the respective IC’s documentation. 

Содержание STK511

Страница 1: ...4842B AVR 10 09 STK511 AVR based Uni directional Radio Starter Kit User Guide ...

Страница 2: ...ection 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 Standal...

Страница 3: ... 6 4 3 2 Sample Software 4 7 Section 5 STK511 Transmitter Board 5 1 5 1 Hardware Description 5 1 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 Software Description 5 5 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 ...

Страница 4: ...nal 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 MHz to 915 MHz and complete reference designs for receivers and transmitters While above mentioned ICs are supported by this kit pre ...

Страница 5: ... 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 software One CR2032 battery External whip antenna RX only TX antenna is PCB trace Optional items not included in the kit Atmel AVR STK500 Starter Kit and Development System ...

Страница 6: ... 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 C...

Страница 7: ...ication 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 ...

Страница 8: ...ansmissions 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 t...

Страница 9: ... 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 capacit...

Страница 10: ...ta 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 s...

Страница 11: ...icrocontroller 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 recei...

Страница 12: ... data if flag2 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 Cl...

Страница 13: ...nt ReceiveData j 1 i 1 Check level of DATA line Load value into register if PINB 4 0 flag2 If DATA line low load a 1 This will reverse the data and Turn off the LED when a 0 was sent ReceiveData j 1 i 1 Check for two of the three bytes received to match before displaying if ReceiveData 0 ReceiveData 1 ReceiveData 0 ReceiveData 2 DisplayData ReceiveData 0 Load data to be displayed delay_ms 40 Wait ...

Страница 14: ...1 Receiver Board 3 6 STK511 User Guide 4842B AVR 10 09 DisplayData ReceiveData 1 Load data to be displayed delay_ms 40 Wait DisplayLED Write to LEDs delay_ms 40 Wait ResetRX Set the Receiver back to polling ...

Страница 15: ... Configuration Options Figure 4 2 STK511 Receiver Interface Board Figure 4 3 Receiver Application Board STK511 Receiver Interface Board Figure 4 2 Receiver Application Board Figure 4 3 Stand alone configuration Figure 4 4 on page 4 2 STK500 Development Board Figure 4 5 on page 4 2 STK500 511 Assembly Figure 4 6 on page 4 2 ...

Страница 16: ...is com bined with the Receiver Interface Board and connected to an external 5 volt power supply it s configuration registers can be programmed and the resulting demodulation performance can be evalu ated This configuration enables fast real time changes to the receiver settings while evaluating its RF performance For example the receiver can be changed from Baud Range 0 1 to 1 8 kHz to Baud Range ...

Страница 17: ...11 Receiver Interface Board Figure 4 7 shows the hardware placement and gives a short description of key components Figure 4 7 STK511 Receiver Interface Board Hardware Placement 4 2 1 Receiver Connectors As stated previously the STK511 Receiver Interface Board was designed to interface with Atmel s RF Receiver Application Boards There are two rows of connectors labeled U2 on the STK511 Receiver In...

Страница 18: ...es on the STK511 Receiver Interface Board allow individual bits in these registers to be modified As an added convenience the STK511 Receiver Interface Board contains a silkscreen legend that specifies each bit function for both registers as well as their corresponding default value The configuration register DIP switches connect to the following I O ports of the ATmega8515 AVR microcontroller whi...

Страница 19: ...wrong position can cause a lot of unexplained problems Always verify that this switch is set to desired position 4 2 5 Configure Push Button The configuration selected by the DIP switches is not programmed into the receiver until the Configure button is pressed When pressed the on board microcontroller programs these values into the appropri ate registers of the receiver Each register is written t...

Страница 20: ...firmware supplied with the STK511 Receiver Interface Board performs the following functions Clears the Reset Marker upon power up Reads the values set by the configuration register DIP switches Programs the OPMODE and LIMIT registers via the bi directional DATA line Holds the receiver in a polling mode via the POL ON line Many Atmel receivers generate a Reset Marker signal consisting of a 128 kHz ...

Страница 21: ... in polling mode with a sleep time defined by the register setting 4 3 2 Sample Software Below is a sample of the STK511 Receiver Interface Board Firmware that shows how to write to the LIMIT register Procedure WriteLIMITReg Function Write register value from EEProm to RX Author Toby Prescott Date 03 12 2004 State unsigned char WriteLIMITReg void Local Variabledeclaration unsigned char cBitPos Poi...

Страница 22: ...ait to Synchronization pulse end pos edge Timeout nach 300 μs delay_us 50 Short Delay Program if TestBit cTempByte cBitPos 1 If the current bit is low made an low impulse delay_us TimeT4 Delay until programmingpulse t4 t5 t7 2 SetBit DDRB RX_DATA Begin the programming pulse PortB 4 Output Low delay_us TimeT7 WaitUs 200 μs for t7 ClearBit DDRB RX_DATA End the Programming pulse PortB 4 Input Open de...

Страница 23: ...ch 300 μs delay_us 50 Short Delay Program if TestBit cTempByte cBitPos 1 If the current bit is low made an low impulse delay_us TimeT4 Delay until programmingpulse t4 t5 t7 2 SetBit DDRB RX_DATA Begin the programming pulse PortB 4 Output Low delay_us TimeT7 WaitUs 200 μs for t7 ClearBit DDRB RX_DATA End the Programming pulse PortB 4 Input Open delay_us 50 Short Delay iQuit 1 delay_us 2000 Wait unt...

Страница 24: ...buttons is user programmable The transmitter software accompanying this kit demonstrates both single button and simultaneous two button presses Indicator LEDs Two LEDs located above the buttons confirm button press action and indicate the soft ware controlled activity of the T575x transmitter IC CdS Photocell To demonstrate the capability of the 10 bit A D converter ADC resident in the ATtiny13 th...

Страница 25: ...ata transmission while only one LED flashes during ASK ASK modulation occurs when the AVR enables the T5750 3 4 IC and sends a serial data stream to the IC s control input In contrast an FSK modulated signal is generated when the AVR sends the serial data stream to the crystal oscillator s pair of load capacitors The lower shifted RF FSK frequency is obtained by asserting an AVR I O low which conn...

Страница 26: ...ltage at the T575x PA_ENABLE port must be 0 25 V to remain low or else RF energy could be inadvertently radiated Resistors R2 and R6 limit the current into these two ports When a button is pushed the 3 V supply through the R6 R7 or R2 R8 voltage divider is presented to the corresponding port PB1 or PB2 respectively This change in level on the port pin is sensed by the microcontroller and a pin cha...

Страница 27: ...turer specified load capacitor for the crystal used It places the transmitter at the main frequency of operation e g 315 MHz 433 92 MHz etc for ASK FSK mod ulation f0 With microcontroller port PB0 C6 is switched in and out of a parallel combination with C7 to generate an FSK modulated signal When configured as an input PB0 is in a hi Z tri state condition and C6 is not part of the crystal s capaci...

Страница 28: ...the CdS photocell as a light intensity sensor The resistance of the photocell s output which is inversely proportional to the amount of light incident on the sensor is converted to an input voltage signal to the A D converter The resulting A D conversion quantization is binned into one of eight value ranges which is transmitted to the companion receiver mated to the STK511 The relative intensity o...

Страница 29: ...31 SREG save Status Register CLI TP Disable interrupts WDR TP Clear watchdog timer RCALL Debounce TP Add delay for debounce IN r16 PINB see which button was pushed CPI R16 0x06 TP IF BOTH BREQ ISRPinBoth CPI R16 0x02 TP IF only S2 BREQ ISRPinS2 CPI R16 0x04 TP IF only S1 BREQ ISRPinS1 RJMP ISRPinChgEnd TP Exit if glitch ISRPinBoth CPI MODE FSK TP For both buttons pressed check current state BREQ S...

Страница 30: ... to 8 sec OUT WDTCR R16 LDI R16 0x61 TP This will start the timer when sei OUT WDTCR R16 TP Then set number of interrupts in 30 sec LDI WDTcounter 0x04 0x04 sleep after 8x4 32 secs RJMP ISRPinLoop TP Exit button ISR when button released ISRPinLoop WDR TP Clear watchdog timer IN R16 PINB TP Check for button release ANDI R16 0x06 TP If either button still pressed loop BRNE ISRPinLoop TP When both bu...

Страница 31: ...pop statements IN R31 SREG TP Save status register CLI TP Disable interrupts RCALL SensorADC TP Read the sensor data RCALL Xmt TP Send the data DEC WDTcounter TP Decrement number of WDT interrupts LDI r16 0x00 TP Reset I O states OUT PORTB r16 set ports to low OUT DDRB r16 set ports to inputs ISRWatchDogEnd LDI R16 0x20 TP Clear interrupt flags OUT GIFR R16 LDI R16 0xF7 OUT MCUSR R16 WDR TP Clear ...

Страница 32: ...ycle correction factor also referred to as relaxation factor can be calculated as follows Correction Factor 20log max RF on time in ms 100 ms While use of this duty cycle correction factor is most often applied to OOK ASK applications it can also be applied to FSK modulation and harmonic frequencies For 315 and 434 MHz the limit is 6 042 and 11 000 µV m respectively Harmonic and other spurious emi...

Страница 33: ...ot permitted The following conditions apply to RF transmission duty cycles RF must end 5 seconds after release of manual transmission RF must end 5 seconds after start of an automatic transmission Periodic transmissions aren t allowed unless they are used to determine security or safety system integrity and the RF transmission does not exceed one transmission of not more than one second per hour p...

Страница 34: ... register Receiver Application Board rotated 180 when mounted on the Receiver Interface Board Verify that Receiver Application Board signal testpoints are placed toward the DIP switches LED s on Receiver Interface Board not active Power not applied Verify that Power is supplied to the Receiver Interface Board through either the Receiver Application Board or the STK500 Board VTG jumper Correspondin...

Страница 35: ...1 are properly oriented ISP ribbon cable not connected properly Ensure ribbon cable connected between ISP6PIN header and SPROG3 header Check orientation of pin 1 on headers Incorrect device selected Select ATmega8515 from the Device menu Verify that the signature byte matches in the Advanced tab Device present in STK500 sockets Remove all devices from the programming sockets of the STK500 ISP jump...

Страница 36: ...properly supplied to all boards See troubleshooting section for each board Data Selector switch not set to STK500 position Set the switch to the proper position and re run the demo Microcontroller socket on STK500 not populated The demo uses an AT90S8515 microcontroller in the STK500 to decode the received signal Corrupted software in the STK500 microcontroller Reload the Receiver Decode software ...

Страница 37: ...OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTY OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE OR NON INFRINGEMENT IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIRECT CONSEQUENTIAL PUNITIVE SPECIAL OR INCIDEN TAL DAMAGES INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF PROFITS BUSINESS INTERRUPTION OR LOSS OF INFORMATION ARISING OUT OF TH...

Страница 38: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Microchip ATAKSTK511 9 ...

Отзывы: