Microcontrollers. by Andy Zwirko – K1RA Tom Zeltwanger – KG3V Eric Nystrom – W4EON. Overview. What are microcontrollers? Microcontrollers vs. microprocessors Where are microcontrollers used? Popular microcontrollers & vendors Programming microcontrollers
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
F I N
Plus de contenu associé
Transcription de la présentation
Microcontrollers by Andy Zwirko – K1RA Tom Zeltwanger – KG3V Eric Nystrom – W4EON
Overview • What are microcontrollers? • Microcontrollers vs. microprocessors • Where are microcontrollers used? • Popular microcontrollers & vendors • Programming microcontrollers • Microcontroller projects (Eric, Tom, Andy)
What is a Microcontroller? • An embedded, low power (uW/nW) computer that usually runs a dedicated task • An interrupt driven device providing real time, predictable responses to events • A self contained device with no external address and data buses
What is a Microcontroller? • A microcontroller (µC, uC or MCU) is a single integrated circuit that contains the four major parts of every computer system • A device optimized for control applications
What is in a Microcontroller? • A computer has some type of memory where it can store variables and instructions or steps • Memory may be RAM, ROM, (E)EPROM, Flash
What is in a Microcontroller? • Computers have various input and output (I/O) capabilities to support various peripherals.
What is in a Microcontroller? • Microcontroller range from 8 – 40+ pin packages • Extra pins provide analog and digital I/O options • 8, 16, 32 & 64 bit instructions & data controllers
Where To Use a Microcontroller? • A microcontroller would allow sensing the button • The uC and its program could then flash the LED based on its system clock and pgm timer
C Source File Assembly Language File C Compiler/Linker Assembler/Linker Device Programmer Programming Languages for the PIC
PIC Instruction Set W – The W register (or accumulator) is used as temp storage for many instructions f – “f” represents a user defined variable or system memory location k – “k” represents a literal number or a defined constant d – The value or “d” (0 or 1) determines where the numerical results is stored W (d=0) or f (d=1) b – “b” represents a particular bit in a 8-bit memory location (7,6,5,4,3,2,1,0)
Programming the PIC (S/W) • MPLAB Integrated Development Environment (IDE) • Assembly for free, C compilers cost $$$
Arduino (ATmega based) • The 555 of the 21st century • Open Source Hardware • Open architecture for expansion • Shield add-ons: • USB, ethernet, wireless/XBee, motor, MIDI, BT, LCD • Open Source Software Development Tools • Integrated Development Environment • Rich library sets for supporting peripherals I/O • Linux, MacOSX and Windows support
CWlink Objectives • Learn about Arduino boards and development • Demonstrate useful Ham Arduino App • Start by sending canned CW text • Upgrade to accept hand-keyed CW for record/playback (preserve “fist”) • Long Term - Untethered rig operation for CW using a Keyer (vs. keyboard)
Arduino Duemilanove Board • Microcontroller ATmega168 • Clock Speed 16 MHz • Operating Voltage 5V • Input Voltage 7-12V • Digital I/O Pins 14 • 6 provide PWM output • Analog Input Pins 6 • DC Current per I/O Pin 40 mA • DC Current for 3.3V Pin 50 mA • Flash Memory 16 KB • 2 KB used by boot loader • SRAM 1 KB • EEPROM 512 bytes
CWlink Architecture Rig Arduino Board Serial Output Serial – Wireless Link Serial Input Keyer
Cwlink Keyer State Diagram Power Up Init Cal Failed (loop) Init Success Cal Cal Success Mode Switch Change Record 5 Sec Timeout Playback Mode Switch Change
Signal Generator for Antenna Analyzer • PIC 16F1827 • 18 pin device • 32 MHz • Accurate internal clock so no crystal needed • Pins used • 3 pins to control DDS80 • 2 pins for Serial IO • 1 pin for AD converter • 3 pins for in circuit programming
Analyzer Development • Development Tools • CCS C compiler • CCS ICD 64 programmer (in circuit) • Code • 2 Files • 600 source lines • Reused code from other projects • Only minor modifications for this project • Resources: • ROM used: 1830 words (45%) • RAM used: 52 (14%) • PIC code functions • Serial Interface • Set frequency of DDS • Read AD converter
Architecture Diagram • About 8 hours of development time. • Code for analysis and plotting is contained in a PC program written in Java.
Lessons Learned • The bridge is a wideband device. The bridge measures what the antenna is receiving as well as the component from the signal generator. Measurement differs from day to night.
PICEL-III Development Board • PIC Programmer for 18-pin PICs via PC USB Port made by AA0ZZ • Hardware components: • PIC 16F628A • 2x16 line LCD (with backlight) • Rotary encoder • Three general purpose pushbuttons • Three LEDs • Speaker with driver • Stereo jack for CW paddle input • Stereo jack with transistor driver to key TX • Transistor conditioner for converting low-level signals for PIC input (frequency counter) detection • Multi-purpose BNC connector for signal I/O • Expansion port for AmQRP DDS-30/60
WSPR Beacon Code • AA0ZZ created signal generator program for PICEL-III (0-60 MHz) • W3PM modified AA0ZZ program • modulate signal generator with WSPR “whisper” encoding scheme TX-only • ~2700 lines of code w/ comments • WSPR signal conveys call sign, Maidenhead grid locator and power level • Example: KW4VA FM18 17 • Forward Error Correction (FEC) is employed • Modulation scheme narrow-band 4-FSK modulation.
KW4VA Beacon DX Last 24 Hours • Stations spotting / hearing WSPR beacon in the last 24 hours (30/40m) • KW4VA beacon running 20 mW and attic antenna fed with 300 ohm feed line