microcontrollers 8051 based microcontroller aduc832 from analog devices 12/2011 roggemans m. (mgm)

104
Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Upload: louisa-martens

Post on 08-Jun-2015

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Microcontrollers

8051 based microcontrollerADuC832 from Analog Devices

12/2011Roggemans M. (MGM)

Page 2: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

LES 1

• Doelstellingen:– situering vak, afspraken labo en evaluatie toelichten– concept embedded oplossing probleem– blokdiagramma computersysteem– wat is een microcontroller?– hoe ziet een basis 8051 er uit– ADuC mogelijkheden en blokdiagramma– memorymap 8051/ADuC832– MOV instructies (inwendige adressering)

Page 3: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Situering van het vak

• Embedded systemen• Hardware georiënteerd• Basis automatisering• Basis voor PLC• Specifieke uitwerking onderdeel

computersystemen• Manier van denken

Page 4: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Afspraken Labo Microcontrollers

• Aanwezigheid niet verplicht• Passieve aanwezigheid verboden• Actieve participatie verplicht

• Misbruik infrastructuur verboden:– niet eten of drinken in labo– respect voor apparatuur

• Stiptheid verplicht!!

Page 5: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Cursusmateriaal

• Nederlandstalige cursus:– thuis lezen als herhaling/voorbereiding les (min 5X)

• ADuC_condensed (onmisbaar in labo)

• Stick:– bevat info van telescript (onmisbaar in labo)

– bevat eigen programma’s (onmisbaar in labo)

• ADuC microcontroller kit met kabel (onmisbaar in labo)

• Slides (PPT) (beknopte versie cursus) (onmisbaar in labo)

Page 6: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Evaluatie

• GEEN permanente evaluatie:– lessen zijn er om te oefenen en vragen te stellen

• Open boek examen (praktische opgave):– vak kan je enkel leren door te doen!!!– vak vraagt zekere incubatietijd!!!– blok en examenperiode onvoldoende tijd!!!

• Je mag op het examen alles gebruiken behalve communicatiemiddel of laptop

Page 7: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Examenverloop en quotering

• Opgave beschikbaar op papier (moet je afgeven)• Je moet op de PC’s van het labo werken• Examen duurt 1,5u

Puntenverdeling:• Flowchart (5/20) (DIGITALE BEOORDELING)

• Werkt het programma 100% (5/20) (DIGITALE BEOORDELING)

• Programma (10/20) (ANALOGE BEOORDELING)

Page 8: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Concept embedded oplossing probleemVoedingsspannings-

bewakingSysteemvoeding Systeemclock

T sensor

Vref (DC)

CPU8/16/32 bit

AnalogeI/O

poort

Businterface

JTAGinterface

Timer/Countercircuits

Seriële interface

Debugsysteem (PC)

Adresbus

Databus

Signaalbewerking

Opto-coupler

Digitale I/O poort Digitale I/O poort

Powersavingmodes

Netspanning Batterij

Analogesignalen

SignaalbewerkingAnaloge

ingang

Analogeuitgang

Schakelaar

Galvanischgescheiden

digitale ingang

I2CSPIUSB

UART

MICROCONTROLLER

Externeinterruptingangen

Externebusinterface

Digitale signalen

ADC

DAC

I supply

Page 9: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Concept embedded oplossing probleem

• Universele hardware• Relatie tussen input en output :

• eenvoudig aanpasbaar (software=programma)• kan afhankelijk zijn van input en output (adaptief(remmen voertuig))• kan gebaseerd zijn op ervaringsgegevens (FUZZY)• is aanpasbaar nadat product verkocht is (firmware upgrade)• aanpasbaar aan voorkeuren gebruiker

+, -, x, /logische bewerkingen

voorwaardelijke beslissingen

Input:schakelaarsspanningen

seriëelsensoren

...

Output:spanningen

LED'scontactoren

motorenseriëel

...

Page 10: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Blokdiagramma computersysteem

CPU

X-talOsc.

PORADRES

DECODER

ROM(FLASH)(EPROM)

(EEPROM)

SRAM

ADRESBUS

DATABUS

PAR.POORT

SER.POORT

TIMERCOUNTER

Page 11: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Wat is een microcontroller?

Page 12: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Voordelen microcontroller (t.o.v. discrete computer)

• Slechts enkele componenten:– eenvoudige PCB– weinig kans op hardware fouten– betrouwbaar– low cost– kleine afmetingen

Nadeel microcontroller (t.o.v. discrete computer):

– minder flexibel (je koopt een totaal pakket, maar er is wel veel keuze)

– minder rekenkracht/geheugen

Page 13: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

CPU

X-talOsc.

PORADRES

DECODER

ROM(FLASH)(EPROM)

(EEPROM)

SRAM

ADRESBUS

DATABUS

PAR.POORT

SER.POORT

TIMERCOUNTER

Basis 8051CPU

X-talOsc.

PORADRES

DECODER

ROM(FLASH)(EPROM)

(EEPROM)

SRAM

ADRESBUS

DATABUS

PAR.POORT

SER.POORT

TIMERCOUNTER

Page 14: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 15: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 16: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Memory map 8051

GPR

00000001

0002

00000001

0002

FFFDFFFEFFFF

FFFD

00040003

00040003

FFFFFFFE

XRAMDATA memory

ROMCODE memory

PROGRAMMA

CPU

Registers

SFR

PIOSIOAD

Timers

00

02

FFFE

8180

FEFF

01

8081

Data bus

Adres bus

RD#

WR#

PSEN#

8 bit 8 bit

MOVC@DPTR

MOVX@DPTR

I/O & control

Read/Write16 bit adres 8 bit adres

Read/WriteRead only

Controlebus

Page 17: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 18: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Memory map 8051 (ADuC832)

General Purpose Registers

Page 19: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Memory map 8051 (ADuC)

Onderste 128 GPR’s

Page 20: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Memory map 8051 (XC888)

SFR’s “oude” 8051

Page 21: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Memory- map 8051

(ADuC832)

Page 22: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Memory- map 8051

(ADuC832)

Page 23: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Memory map ADuC832

256 bytesregisters

Page 24: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

De MOV instructies

Mnemonic OP-CODE Uitvoeringssnelheid Symbolische werking

Page 25: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Alle MOV instructies (tussen registers met 8 bit getallen)

Page 26: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

LES 2

• Doelstellingen:– Testen en verdelen van de hardware– Verkennen van de IDE (Integrated design environment) en

WSD software– Overlopen schema’s ADuC bord– maken programma’s (via sjabloon):

• schakelaars naar LED’s• knipperlicht zonder tijdsvertraging (basis uitvoeringstijd instructies)

• knipperlicht vaste snelheid (met delaya0k05s)

• knipperlicht variabele snelheid (met delaya0k05s)

• looplicht variabele snelheid (rotate instucties)• Knight rider (herhaald gebruik rotate instructies)

Page 27: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Hardware ADuC bord

Page 28: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 29: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 30: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 31: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuC832 poorten

Page 32: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 3

• Doelstellingen:– MOVX en MOVC– looplicht via tabel (DJNZ, CJNE, DB, DPTR)– gebruik van de drivers voor:

• LCD• SIO• Arithmetic

Page 33: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

MOVC & MOVX

Page 34: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

DPTR instructies

Page 35: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

DJNZ of lussen tellen

Page 36: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

CJNE of getallen testen

Page 37: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuCEZ; LCD interace ; initlcd klaar zetten LCD voor gebruik; lcdoutchar schrijven van ascii code (accu=input); lcdoutbyte schrijven hex waarde accu naar LCD; lcdoutnib afdrukken 4 laagste bits accu op LCD; lcdoutmsga afdrukken ascii string @dptr, tot 000h code

De reële adressen +80hVoor gebruik met driver:00 wordt 80h, 01 wordt 81h,…

Page 38: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuCEZ

; Seriële interface; initsio klaar zetten seriële poort 9600 baud; siooutchar afdrukken ascii code (accu=input); siooutbyte afdrkken getal in accu ; siooutnib afdrukken 4 laagste bits accu; siooutmsga afdrukken ascii string @dptr tot 000h code; sioinchar inlezen van 1 ascii code in de accu

; sioinbufa inlezen van ascii buffer vanaf adres strtbuf, max 20h karakters!

Page 39: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuCEZ; Arithmetic:; mul16 vermenigvuldigen 2 16 bit getallen; mul32 vermenigvuldigen 2 32 bit getallen; div16 delen 2 16 bit getallen; div32 delen 2 32 bit getallen; add16 optellen 2 16 bit getallen; add32 optellen 2 32 bit getallen; sub16 verschil 2 16 bit getallen; sub32 verschil 2 32 bit getallen; hexbcd8 omvormen 8 bit hex naar bcd; hexbcd16 omvormen 16 bit hex naar bcd; bcdhex8 omvormen 8 bit bcd naar hex; bcdhex16 omvormen 16 bit bcd naar hex

Page 40: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuCEZ

; Diverse; delaya0k05s tijdsvertraging (waarde in accu)*0,05s

Page 41: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 4

• Doelstellingen– talstelsels– basis wiskundige berekeningen (+,-,x,/, 8 en 16 bit, CY vlag)

– teller op LCD (een decimaal en een hex, stand dip-switches bij op tellen, een decimaal en een hex stand dip-switches er van aftrekken (4 tellers!!))

– uurwerk in uu:mm:ss, met software delay

Page 42: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Talstelsels

Getal=voorstelling!!Decimaal getal:

– 0, 1, 2, 3, 4, 5, 6, 7, 8, 9– waarde afhankelijk plaats getal 123 1 2 3

Binair getal:– 0, 1– waarde afhankelijk plaats getal 1001 1 0 0 1

Page 43: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Talstelsels

Hexadecimaal getal:– 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F– waarde afhankelijk plaats getal FF

BCD getal:– 0, 1, 2, 3, 4, 5, 6, 7, 8, 9– binair gecodeerd: 0000, 0001, 0010, 0011, ...

Page 44: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Talstelsels

Page 45: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Optelling

Page 46: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 47: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Verschil berekenen

Page 48: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

INC en DEC

Page 49: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Vermenigvuldigen en delen

Page 50: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 5

• Doelstellingen:– Overlopen instructieset (adhv. CONDENSED) :

• speciale “verplaats” instructies• logische instructies (ANL, ORL, XRL)• bit-instructies• voorwaardelijke sprongen• stack bij subroutines (LCALL, RET, PUSH en POP)

– Programma looplicht 1 uit 4 via functieschakelaars:• contactdender• overnamecontact

Page 51: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Basis stack

werking

ffh

00h

7fh

80h 80h

ffh

SFR (I/O)GPR

81h=SP85h

Stack ruimte

85h

86h

90h

Eerste byte gebruikt als stack

Wordt niet gebruikt als stack

Indirect adresseerbare registers Direct adresseerbare registers

Page 52: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

subroutine aanroepen

LCALL

RET

Subroutine

LCALL

Returnaddress 1

Returnaddress 2

Page 53: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

STACK bij CALL en RET

instructie ninstructie n+1instructie n+2instructie n+3call subroutineinstructie n+5instructie n+6

XXYY

Externe controller-geheugen met

instructiesAdres vande

instructies16-bits

Interne controller-geheugen

Stack-pointer register(wijst naar intern

geheugen in decontroller)

07h

08h

09h

0Ah

0Bh

SP+1

SP+1

YYXX

SP na reset

SP 8-bit

subroutine

return

1

2

3

4 5

opslaanLSB

opslaanMSB

Program counter 16-bit

PC = subroutine

6

7

8

9

PChigh =XXSP-1

PClow =YYSP-1

Jump to XXYY

Jump to subroutine

PChigh PClow

Page 54: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 6

• Doelstellingen:– principe AD omvorming– mogelijkheden ADC ADuC832– Mogelijkheden DAC ADuC832– lezen potmeter– lezen potmeter als voltmeter tussen 0-5v

Page 55: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADC

Page 56: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADC SAR

Page 57: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADC sample and hold

Page 58: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADC 1LSB

1LSB= Vref/(aantal schaaldelen)

5v/4096=0,001220703v2,5v/4096=0,000610351v

Page 59: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuC832 ADCOutput formaat ADC

ADC SFR’s

Page 60: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuC832 ADC

Optionele buffering voor externe signalen.

-beveiliging tegen overspanning

-opvangen capacitieve load S&H

Page 61: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 62: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 63: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuC832 DAC

Page 64: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

ADuC832 DAC

Page 65: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

DAC SFR’s

Page 66: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 7

• Afwerken alle vorige oefeningen• Stellen van vragen

Page 67: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 8

• Doelstellingen:– Timers 0, 1 – RTC (TIC)– Oefening:

• Afdrukken van een uurwerk in UU:MM:SS op LCD

Page 68: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Timers 0 & 1 OSC/12

C/T=0

C/T=1

Page 69: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Timers 0 & 1OSC/12

C/T=0

C/T=1

Page 70: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

T0 en T1 SFR’s

Page 71: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

TMOD register

Page 72: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

RTC (TIC)

TIC SFR’s

Page 73: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

TIMECON

Page 74: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 9

• Doelstellingen:– Uitleg interrupt op 8051 en generiek– Belang van:

• PUSH-POP• uitvoeringstijd• flowchart

– Oefening:• knipperlicht op interrupt, teller LCD in hoofdprogramma• teller lcd in interrupt, looplicht in hoofdprogramma

– Uitleggen hoe interrupt interval instelbaar

Page 75: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interrupt

Tijd

1 cyclus programma

Test HW Test HW Test HW

Geen test HW Geen test HW Geen test HW

Page 76: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Initialisaties(geen interrupts)

Taak 1

Test HW

Speciaal 1

Speciaal 2

Taak 2

Taak 3

Initialisaties(ook interrupts)

Taak 1

Taak 2

Taak 3

Interruptroutine

Speciaal 1

Speciaal 2

RETI

Met interruptZonder interrupt

Hoofdprogramma

Hoofdprogramma

Neen

Ja

Door hardware opgestart

Page 77: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interrupts

• Noodzakelijk wanneer hardware niet kan wachten op polling door CPU

• Wordt gegenereerd door hardware:– timers, I/O pinnen, ADC, SIO, system,...

• Initialisatie nodig:– hardware die interrupt zal genereren– CPU

• Er moet een interruptroutine klaar staan

Page 78: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Mogelijke interrupt bronnen en -adressen

-Interrupts zijn HARDWARE GEBEURTENISSEN.

-Een interrupt activeert een interruptroutine (indien ingeschakeld).

-Een interruptroutine moet met een RETI afgesloten worden.

-PUSH en POP kunnen noodzakelijk zijn.

-Interruptroutines zijn beperkt in de tijd.

-Bij meer dan een interruptbron zijn PRIORITEITEN belangrijk.

-Overlappingen in het geheugen moeten vermeden worden.

Page 79: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interrupt structuur

Page 80: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Standaard 8051 interrupt hardware

Page 81: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 82: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 83: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 10

• Doelstellingen:– Uitleg over stappenmotoren– Uitleg over DC motoren– oefening met stappenmotor– oefening met DC motor

Page 84: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 84

Digitale output:stappen motoren

Page 85: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 85

Digitale output:stappen motoren

Page 86: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 86

Digitale output

Page 87: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 87

Digitale output

Page 88: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 88

Digitale output

Page 89: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 89

Digitale output

Page 90: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 90

Digitale output:current chopping

Page 91: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 91

Digitale output (recirculatie)

Page 92: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 92

Digitale output (braking)

Page 93: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 93

Digitale output:full step aansturing

Page 94: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 94

Digitale output:half step aansturing

Page 95: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 95

Digitale output (microstepping0

Page 96: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 96

Digitale output:microstepping

Page 97: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Interface Technieken 97

Digitale output:inductieve belasting

Page 98: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 11

• Doelstellingen:– Speciale mogelijkheden:

• Fail safe werking– Spanningsbewaking– Software bewaking

• Snelheid processor wijzigen• Low power mogelijkheden (hier generiek bespreken)

– Afwerken oefeningen vorige les

Page 99: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Fail safe werking:• Systeem kan de fout ingaan door:

– storingen in voedingsspanning• spanningsbewaking • overspanningsbeveiliging

– storingen in programmaverloop (externe of interne factoren)

• externe beinvloeding (EMC, EMI)• eventuele bugs in code• uitblijven van verwachte signalen (inputs)

– defect gaan van de hardware (heel duur om op te vangen)

• space, nucleaire toepassingen, ...

– Bewaking van de systeemklok

Page 100: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 101: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)
Page 102: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Snelheid processor aanpassen:

• OSC:– RC, XTAL, TTL-klok– kunnen gekozen worden uit gamma aan

mogelijkheden (toepassingsafhankelijk, wat is beschikbaar in systeem)

• PLL: – aanpassen ingangsklok aan basisfrequentie

hardware

Page 103: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

PLLCON

Page 104: Microcontrollers 8051 based microcontroller ADuC832 from Analog Devices 12/2011 Roggemans M. (MGM)

Les 12

• Doelstellingen:– stellen van vragen– afwerken van oefeningen– oplossen specifieke problemen