Geekclock. Chaos Singularity Code and Hardware Walkthrough. Andreas Müller

Ähnliche Dokumente
Industrial USB3.0 Miniature Camera with color and monochrome sensor

Informatik für Mathematiker und Physiker Woche 2. David Sommer

Bedienungsanleitung / Manual für il-debug_i Interface für den Debugger il_debug

Microcontroller VU Exam 1 (Programming)

Anleitung zur Verwendung des Update-Tools für

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL - USER GUIDE June 2016

USB -> Seriell Adapterkabel Benutzerhandbuch

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL USER GUIDE June 2016

miditech 4merge 4-fach MIDI Merger mit :

Englisch-Grundwortschatz

Mock Exam Behavioral Finance

CABLE TESTER. Manual DN-14003

Exercise (Part XI) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Fachprojekt for Embedded System: Design and Implement Your Own Embedded Systems (2) LS 12, TU Dortmund

Geekclock und Elektronik - Dokumentation

Vortrag zur Seminarphase der PG Solar Doorplate MSP430 Wichtigste Grundlagen von David Tondorf

Jan Monsch. Donnerstag, 2. Mai 13

Microcontroller Kurs Microcontroller Kurs/Johannes Fuchs 1

RECHNUNGSWESEN. KOSTENBEWUßTE UND ERGEBNISORIENTIERTE BETRIEBSFüHRUNG. BY MARTIN GERMROTH

Einleitung Die Pins alphabetisch Kapitel 1 Programmierung des ATmega8 und des ATmega

NEWSLETTER. FileDirector Version 2.5 Novelties. Filing system designer. Filing system in WinClient

Cycling. and / or Trams

Kurzanleitung um Transponder mit einem scemtec TT Reader und der Software UniDemo zu lesen

Cycling and (or?) Trams

Pressglas-Korrespondenz

TomTom WEBFLEET Tachograph

auf differentiellen Leitungen

ETHISCHES ARGUMENTIEREN IN DER SCHULE: GESELLSCHAFTLICHE, PSYCHOLOGISCHE UND PHILOSOPHISCHE GRUNDLAGEN UND DIDAKTISCHE ANSTZE (GERMAN

Exercise 6. Compound Types and Control Flow. Informatik I für D-MAVT. M. Gross, ETH Zürich, 2017

Tube Analyzer LogViewer 2.3

Introduction to Python. Introduction. First Steps in Python. pseudo random numbers. May 2016

CALCULATING KPI QUANTITY-INDEPENDENT ROUTE TIME

D-BAUG Informatik I. Exercise session: week 1 HS 2018

Data Structures and Algorithm Design

prorm Budget Planning promx GmbH Nordring Nuremberg

Werbemittel-Spezifikationen

C R 2025 C LOSE PUSH OPEN

DPM_flowcharts.doc Page F-1 of 9 Rüdiger Siol :28

Datasheet. Page 1 of 7

PONS DIE DREI??? FRAGEZEICHEN, ARCTIC ADVENTURE: ENGLISCH LERNEN MIT JUSTUS, PETER UND BOB

EasyLine by Hama GmbH & Co KG Postfach Monheim/Germany Tel. +49 (0)9091/502-0 Fax +49 (0)9091/

Installationsanleitung / installation manual - DIMMbox

Word-CRM-Upload-Button. User manual

UNIGATE CL Konfiguration mit WINGATE

Unit 1. Motivation and Basics of Classical Logic. Fuzzy Logic I 6

Analog GSM-Gateway TRF

Zu + Infinitiv Constructions

Materialien zu unseren Lehrwerken

ABB i-bus EIB. EIB Power Supply Units

Registration of residence at Citizens Office (Bürgerbüro)

PONS DIE DREI??? FRAGEZEICHEN, ARCTIC ADVENTURE: ENGLISCH LERNEN MIT JUSTUS, PETER UND BOB

Eingebettete Taktübertragung auf Speicherbussen

TracVision - Update der Tracking Frequenzen

Die besten Chuck Norris Witze: Alle Fakten über den härtesten Mann der Welt (German Edition)

Presentation of a diagnostic tool for hybrid and module testing

Übungsstunde: Informatik 1 D-MAVT

CAN-Bus RPM adapter. User Manual Anwender-Beschreibung

p^db=`oj===pìééçêíáåñçêã~íáçå=

Stromzwischenkreisumrichter Current Source Inverter (CSI)

Bosch Rexroth - The Drive & Control Company

Weather forecast in Accra

Stromzwischenkreisumrichter Current Source Inverter (CSI)

H o c h s c h u l e D e g g e n d o r f H o c h s c h u l e f ü r a n g e w a n d t e W i s s e n s c h a f t e n

Introduction to Python. Introduction. First Steps in Python. pseudo random numbers. May 2018

Die AVR Mikrocontrollerfamilie

Wortstellung. Rule 1. The verb is the second unit of language in a sentence. The first unit of language in a sentence can be:

Microcontroller Architectures and Examples

Die Technik hinter IoT: Arduino, Raspberry Pi & Co.

Betriebsarten-Umschalter Common mode / Differential mode switch

Number of Maximal Partial Clones

PONS DIE DREI??? FRAGEZEICHEN, ARCTIC ADVENTURE: ENGLISCH LERNEN MIT JUSTUS, PETER UND BOB

Sporadischer Neustart von WPC-Geräten FINALE LÖSUNG

Westfalia Bedienungsanleitung. Nr

Ägyptisch-Arabisch für Minimalisten: Schnell Arabisch lernen mit Lautschrift (German Edition)

ECSS LISN 2-75A. ECSS LISN 2-75A Netznachbildung Double path AMN (LISN) Description: Beschreibung:

18007: 2m Big Wheel Horizontal polarisierte Rundstrahlantenne

TracVision - Update der Tracking Frequenzen

Die Bedeutung neurowissenschaftlicher Erkenntnisse für die Werbung (German Edition)

Grundlagen MATLAB. Vorlesung Batteriemodellierung mit MATLAB

Keysight Technologies Using InfiniiMax Probes with Test Equipment other than Infiniium Oscilloscopes

Virtual PBX and SMS-Server

FOXY ADVANCED PASSION OF MOVEMENT

Big Data Analytics. Fifth Munich Data Protection Day, March 23, Dr. Stefan Krätschmer, Data Privacy Officer, Europe, IBM

GL module Master Time Code, Timer and Time generator (LTC)

Mul$media im Netz (Online Mul$media) Wintersemester 2014/15. Übung 02 (Nebenfach)

Worx Landroid - Software Update

Accelerating Information Technology Innovation

Sinn und Aufgabe eines Wissenschaftlers: Textvergleich zweier klassischer Autoren (German Edition)

Analyse und Interpretation der Kurzgeschichte "Die Tochter" von Peter Bichsel mit Unterrichtsentwurf für eine 10. Klassenstufe (German Edition)

HIR Method & Tools for Fit Gap analysis

Newsletter August 2007

Copyright by Max Weishaupt GmbH, D Schwendi

Killy Literaturlexikon: Autoren Und Werke Des Deutschsprachigen Kulturraumes 2., Vollstandig Uberarbeitete Auflage (German Edition)

MSP 430. Einführung. Was kann er? Hauptthemen. Wie sieht er aus? 64 / 100 polig. Was kann er? MSP 430 1

Softwareupdate-Anleitung // Porty L 600 / Porty L 1200

Programming for Engineers

Finite Difference Method (FDM)

Schalten einer kapazitiven Last mit einem Transistor

Wissenschaftliche Dienste. Sachstand. Payment of value added tax (VAT) (EZPWD-Anfrage ) 2016 Deutscher Bundestag WD /16

Transkript:

Geekclock Code and Hardware Walkthrough Chaos Singularity 2007

1 Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten 2 What is an MCU? ATMega8 features Differences from coding on a PC 3 Hardware Overview Circuit diagram 4 Software concept Structure Overview Code Walkthrough

Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten 1 Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten 2 3 4

Stromkreis Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten Strom fliesst nur im geschlossenen Kreis hier sind LED und Widerstand in Serie gleicher Strom fliesst durch beide Elemente Spannungen über den Elementen sind unterschiedlich bei Parallelschaltung wäre es umgekehrt

Ohm sches Gesetz Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten Proportionalität zwischen Widerstand R, Strom I durch R, und Spannung U über R: U = R I Beispiel von der letzten Folie benötigter Widerstand? Spannung über Widerstand (Batteriespannung - LED bias): U = 4.5V 2V = 2.5V Strom: LED soll ca 10mA haben Widerstand: R = U I = 2.5V 10mA = 2.5V 0.01A = 250Ω

Elektronik Knotenpunkt- und Maschenregel Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten Kirchhoff sche Gesetze: Knotenregel: Summe aller Ströme in einem Knoten ist Null ( es gehen keine Elektronen verloren) Maschenregel: Summe aller Spannungen in einer Masche ist Null ( es fällt über einer idealen Leitung keine Spannung ab)

Widerstand Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten Symbol: R Schaltzeichen: Kenngrösse: Widerstand mit Einheit Ohm (Ω) Spannung über Widerstand ist proportional zu Strom Farbcodierung gibt Widerstandswert an

Kondensator Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten Symbol: C Schaltzeichen: Kenngrösse: Kapazität mit Einheit Farad (F ) Schaltzeichen für Elektrolytkondensatoren: speichert Strom / stabilisiert Spannung Werte sind meist direkt aufgedruckt

Diode und LED Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten Symbol: D Schaltzeichen: bzw. (LED) Dioden lassen Strom nur in eine Richtung durch Einbaurichtung (Polarität) beachten in der Geekclock als Anzeige (LED) und Verpolungsschutz LED: Light Emitting Diode

Quarz Elektronik Stromkreis Gesetz von Ohm Knotenpunkt- und Maschenregel Komponenten Symbol: Q Schaltzeichen: liefert sehr stabile Referenzfrequenz Funktionsweise: Quarzplättchen mit angelegten Elektroden: Quarz verbiegt sich beim Anlegen einer Spannung Spannung weg Deformation umgekehrt Spannung wird produziert positive Rückkoppelung nur bei Resonanzfrequenz und Harmonischen

Elektronik What is an MCU? ATMega8 features Differences from coding on a PC 1 Elektronik 2 What is an MCU? ATMega8 features Differences from coding on a PC 3 4

Elektronik What is a microcontroller? What is an MCU? ATMega8 features Differences from coding on a PC Wikipedia: A microcontroller (or MCU) is a computer-on-a-chip. It is a type of microprocessor emphasizing self-sufficiency and cost-effectiveness, in contrast to a general-purpose microprocessor (the kind used in a PC). RAM, ROM, memory and a CPU are, along with various peripherals, all contained on a single chip, which can be programmed to fulfill a specific task.

ATMega8 Elektronik What is an MCU? ATMega8 features Differences from coding on a PC RISC Microcontroller, max 16MHz 23 I/O lines lots of integrated peripherals timers AD converters PWM internal or external oscillator possible sleep mode support In-System Programmable Flash memory

Elektronik MCU coding peculiarities What is an MCU? ATMega8 features Differences from coding on a PC less powerful hardware in our case 32kHz core frequency (up to 16MHz would be possible) 1KB SRAM 8KB Flash memory... ought to be enough for everyone no FPU

Elektronik What is an MCU? ATMega8 features Differences from coding on a PC MCU coding peculiarities (continued) no OS only one process no virtual memory, etc hard real time is possible avr-libc provides some functions no printf no easy way to tell if an error is in software or in hardware programs are usually designed to never reach an end

Elektronik some advice for efficient coding What is an MCU? ATMega8 features Differences from coding on a PC use gcc with -Os (-O2 and optimize for size) don t use 32bit integers, when you only need 8bit ( use uint8 t or int8 t) [demo] condition checks are preferable to expressions with modulo operations or multiplications avoid floating point variables and functions (sin(), sqrt(),..) keep variable count low (even if the SRAM is big enough if you have only a few variables, they can always stay in the registers) there is usually no need to code in assembler don t worry... 32kHz is more than it might seem

Elektronik Hardware Overview Circuit diagram 1 Elektronik 2 3 Hardware Overview Circuit diagram 4

Elektronik Overview Hardware Overview Circuit diagram core: ATMega8 MCU clock from 32kHz crystal (low frequency to save power) 6 LEDs to show time in binary button to control clock diode to protect MCU from wrong polarity interface for programming via LPT cable or USB programmer

Elektronik Software concept Structure Overview Code Walkthrough 1 Elektronik 2 3 4 Software concept Structure Overview Code Walkthrough

Software concept Elektronik Software concept Structure Overview Code Walkthrough hardware timer generates interrupt each second time is updated in interrupt routine button generates interrupt time is shown in main routine after button was pressed

Structure overview Elektronik Software concept Structure Overview Code Walkthrough geekclock.c: interrupts, main-routine lowlevel.c: initialisation (Timer, Ports), lowlevel functions datetime.c: calendar functions, time functions led.c: LED control, effects

Code Elektronik Software concept Structure Overview Code Walkthrough (Code)

Questions Questions Questions?