Atmel STK502 Spezifikationen

Stöbern Sie online oder laden Sie Spezifikationen nach Netzwerk-Switches Atmel STK502 herunter. Atmel STK502 Specifications Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 23
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
1
AVR064: STK502 – A Temperature Monitoring
System with LCD Output
Features
Presenting Data on an LCD Display
Temperature Measurement
Real Time Clock (RTC)
UART Communication with a PC
PWM Implementation
Introduction
The STK502 board is a top module designed to add ATmega169 support to the
STK500 development board from Atmel. STK500 and STK502 provide all hardware
needed to get started developing with the ATmega169. This application note is an
example of how to use the ATmega169 and the STK502.
It includes:
ATmega169 code example written in IAR EWAVR 2.27.
Flowcharts explaining the code.
Instruction on how to configure the STK502.
A pre-programmed ATmega169 including the example in this application note is
shipped with each STK502 kit.
The source code is found on the “AVR Technical Library” CD shipped with the
STK502. It can also be found on the Atmel web site, www.atmel.com.
8-bit
Microcontroller
Application
Note
Rev. 2529A–AVR–11/02
Seitenansicht 0
1 2 3 4 5 6 ... 22 23

Inhaltsverzeichnis

Seite 1 - Application

1AVR064: STK502 – A Temperature Monitoring System with LCD OutputFeatures • Presenting Data on an LCD Display• Temperature Measurement• Real Time Cloc

Seite 2 - ATmega169

10AVR064 2529A–AVR–11/02Initialize After a Reset the firmware will initialize the ATmega169 and its integrated peripherals.The initialization runs onl

Seite 3 - Menu 1 Menu 2

11AVR0642529A–AVR–11/02Set up the ADC in Single Ended mode. Differential mode can be selected by settingADC_init(Differential) instead of ADC_init(Sin

Seite 4 - Description

12AVR064 2529A–AVR–11/02Temperature Calculation In this function the voltage over the NTC thermistor will be measured and the tempera-ture calculated.

Seite 5

13AVR0642529A–AVR–11/02Receive Data from PC These routines take care of data coming from the PC through the UART interface.Figure 12. Receive Packet

Seite 6

14AVR064 2529A–AVR–11/02Store_Rx_data The packet is then converted from ASCII to hexadecimal. One HEX-byte can contain 1 -3 ASCII bytes. ASCII-bytes t

Seite 7

15AVR0642529A–AVR–11/02Transmit Packet to PC These routines transmit the data from ATmega169 to the PC.Figure 13. Transmit Packet to PCA transmit pac

Seite 8 - Interrupts Used

16AVR064 2529A–AVR–11/02Table 2. Transmit Packet to PCPreamble “STK502” 6 byteASCII-space (0x20) 1 byteHOUR 2 byteASCII-space (0x20) 1 byteMINUTE 2 b

Seite 9 - Figure 8. Main Loop

17AVR0642529A–AVR–11/02STK500 Switches Figure 14. CheckButtonsThere are three switches that are used as inputs to the application. To do several tas

Seite 10 - 2529A–AVR–11/02

18AVR064 2529A–AVR–11/02To adjust the variable MINUTE: Press SW7 until “CLOCK” appears in the LCD display,and select this by pressing SW6 to activate

Seite 11

19AVR0642529A–AVR–11/02After the LCD_displayBuffer has been updated, the LCD_updatedComplete will be setto FALSE, and LCD_updateRequired to TRUE. This

Seite 12

2AVR064 2529A–AVR–11/02Application Overview This application note describes how to get started with the ATmega169 microcontroller(MCU), the first AVR

Seite 13

20AVR064 2529A–AVR–11/02LCD Set-up Data Figure 17. LCDsetupDataIf Menu 1 isn’t active the welcome string will scroll over the LCD. If Menu 1 is activ

Seite 14

21AVR0642529A–AVR–11/02Terminal All temperature and time information is transmitted through the UART-interface. A pro-gram on a PC can receive this da

Seite 15

22AVR064 2529A–AVR–11/02Figure 19. HyperTerminalOne can also adjust the variables within the ATmega169 from the terminal. This has tobe done accordin

Seite 16

Printed on recycled paper.© Atmel Corporation 2002.Atmel Corporation makes no warranty for the use of its products, other than those expressly contai

Seite 17

3AVR0642529A–AVR–11/02Figure 2. Menu SystemPlease see section “STK500 Switches” on page 17, for more detailed information onhow to use the menu syste

Seite 18

4AVR064 2529A–AVR–11/02Hardware DescriptionATmega169 ATmega169 is an ultra low power AVR 8-bit RISC microcontroller. It includes 16K byteSelf-programm

Seite 19

5AVR0642529A–AVR–11/02LCD Display Liquid Crystal Displays (LCDs) are categorized as non-emissive display devices. In thatrespect, they do not produce

Seite 20

6AVR064 2529A–AVR–11/02Hardware Configuration In order to make the example code work, it is required to set up the cables and switchesin the correct o

Seite 21

7AVR0642529A–AVR–11/02• Connect the “Segment pins from ATmega169” to the “STK502 LCD pins” with the 34-pin cable. • Place a jumper on the 2-pin header

Seite 22

8AVR064 2529A–AVR–11/02ATmega169 Firmware The firmware that realizes the temperature control application is written in IAR EWAVR2.27b. The timing rela

Seite 23

9AVR0642529A–AVR–11/02Main Loop Figure 8 shows the main loop. Figure 8. Main LoopStore DatafromReceive BufferSend DatafromTransmitBufferTemperatureCa

Kommentare zu diesen Handbüchern

Keine Kommentare