Академический Документы
Профессиональный Документы
Культура Документы
.
.
.
1
1.1
2.1
3.1
4.1
5.1
6.1
2
MOSFET 1.2
THYRISTOR 2.2
TRIAC 3.2
DIAC 4.2
5.2
3
1.3
2.3
3.3
A 4.3
B 5.3
6.3
4
1.4
2.4
3.4
4.4
5.4
5
1.5
2.5
3.5
4.5
5.5
6.5
7.5
8.5
9.5
(PLD 6
1.6
2.6
PLD 3.6
PAL 4.6
GAL 5.6
6.6
PIC 16F84A 7
PIC 16F84A 1.7
PIC 16F84A 2.7
3.7
MPLAB 7.4
PIC 5.7
8
LED 1.8
LED 2.8
LCD 3.8
LM 16251 4.8
3
9
1.9
2.9
3.9
4.9
5.9
6.9
7.9
8.9
9.9
10.9
11.9
12.9
13.9
14.9
GEMMA15.9
GEMMA16.9
10
1.10
2.10
3.10
4.10
5.10
6.10
7.10
8.10
11
1.11
2.11
3.11
4.11
5.11
6.11
7.11
12
1.12
2.12
3.12
13
1.13
2.13
3.13
4.13
5.13
6.13
7.13
14
1.14
2.14
3.14
4.14
5.14
15
1.15
PIC 16F84A 2.14
PIC 16F84A 3.15
25h
8h
9h
10
6h
8h
11
8h
8h
12
10h
10h
13
20h
10h
14
8h
6
(PLD )
30h
15
10h
PIC 16F84A 7
10h
POWER POINT
.
. PSPICE
PCBOARD
PSPICE
www. als design . frdownloadseval. html
www. cadence. comproductsoracaddowloadspspice schcmaticin dex . aspx
www. engr . u ky . edu~catheypspice061301. html
A
. B
PIC16F84
MICROCHIP MPL AB
. ICPROG MPL AB
MICROSIM-PSPICEA
1.A
1.1.A
MICROSIM-PSPICE
.
DmarrerWindows
DesignLabo Eval 8Programme
.Schematics
.
.
.
.
2.1.A
1.APSPICE
Crer un nouveau schma ( cration de
rpertoire et fichiers )
Ouvrir un schma existant ( la recherche
est guide )
Editeur de symboles
SIMULATION
Lancement de la
simulation
Couleurs des
marqueurs ( signaux
visualis sous Probe)
Placement d'un
marqueur tension /
courant
Rafrachir l'cran
Validation de
l'affichage des
tensions du point
de dpart ou de
repos sur le schma
/ suppression de
l'affichage
Validation de
l'affichage de courants
du point de dpart
ou de repos sur le
schma / suppression
de l'affichage
ANNOTATIONS
Trac de courbe
DESSIN
Trac de rectangle
Trac de cercle
Insertion d'images
Editeur d'attributs
PSPICE
1.A
2.A
Schematics
.
Drawtext ABC
. Save as File
Nom. Sch Nom
Enregistrer . Rpertoire Dans
.File Save
(Gets) 1.2.A
Get Get New Part Draw
. New Part
Advanced basic . Gets
.Advanced
*
. Part Name
Place
.
.
.
. Supp
. Rotate Edit
. Flip Edit Miroir
.
.
9
Gnd OV
.Gnd Earth Analog Gnd Ground
2.2.A
Draw
. . Draw wire Wire
3.2.A
.
. k1 R1
7400 U1A
NAND
Stimulus
.
.
*
.
*
Pkgref Value
Value
. Save attr
.OK Pkgref .
.
.
.
10
s Henry H Farad F
.PSPICE
Label
.
.
. Labels)
3.A
.
. Transient Analysis
AC Sweep
Set up Analysis
. Set up Analysis
.
Transient Transient
Print Step
. 10000 1000
. Final time
4.A
Microsim probe Simulate
. Add Trace
. 1 0
.
11
.
Toggle Cursor Tools
. Cursor
Voltage Analog
.
. Mark Label
Vs Ve Vs = f(Ve)
Axis X Axis Settings Plot
. . Variable
. Voltage Analog
. VVe Ve X
.
2.A
. PSPICE
12
PSPICE 2.A
13
B
MICROSIM PC BOARDS
.B
PSPICE
.PC BOARDS
PC BOARDS
1.B
PSPICE
SIMULATION ONLY
.
. Jump
Jump1 Vcc
Jump1 GND
Jump2 niV
Packaging 1.1.B
.
PKGTYPE
. 14 D1P14 PKGTYPE Dual Inline Package
PSPICE
Tools Package OK
Net list 2.1.B
. .
slooTCreate layout net list OK
.
14
SIMULATIONONLY
PC Board
3.1.B
PC Board
PCSPICE Tools Run PC Board yes
. 1.B PC Board
1.B
.pca
.
PC Board
2.B
inch
.option mm Tools option
routage
. .
. CTRLM CTRLR
15
.
.Jump
.
. RATS
Tools Optimize Rats
.
Optimisation
.
ToolsOption
egatuor .
Jump
.VIA PADSTACK
routage automatique B .3
routeur
.
Draw Board signal keepin
.
. Draw Keep out
16
2.B
.
File report Bill off Materials
.
Job
Configuration
17
A4
FileJob setupNew
Definie page
3.B 1
New
Board signal keepin et solder
3.B
New page 2
4.B Board signal keepin OK OK silktop
4.B
18
1.C
Pic aff.asm
Horloge
Les macros
include stdmac.h
equ d40
CTreglage
equ d60
equ d24
equ d10
Max60
Max24
MaxUnite
equ h10
equ h20
equ h40
equ h80
Aff1
Aff2
Aff3
Aff4
equ d0
equ d1
equ d2
equ d3
ToucheRA0
ToucheRA1
ToucheRA2
ToucheRA3
equ d4
SortieRA4
19
rm
NBinter
rm
NbTempoReg
1
1
1
rm
rm
rm
Secondes
Minutes
Heures
1
1
rm
rm
DataAff12
DataAff34
rm
1
1
1
rm
rm
rm
Aff1Data
Aff2Data
Aff3Data
Aff4Data
goto Init
Programme dinterruption
Inter toujours ladresse 4
4zprog
org
Initialisation du
CTinterNBinter movlf
compteur CTinter
Drapeau dinter 0
INTCONT0IF
bcf
Suite
Retour au programme principal
retfie
Compteur SecondesMinutesHeures.
Secondes
incf
SecondesSecondes1
Si
SecondesMax60RazSecondes
20
Compteur
beqc
SecondesMax60
alors on va RazSecondes sinon retour
return
Raz Secondes
Secondes
clrf RazSecondes
Minutes
incf
RegMin
MinutesMinutes1
Si
MinutesMax60RazMinutes
beqc
MinutesMax60
alors on va RazMinutes sinon retour
return
Raz Minutes
Minutes
clrf RazMinutes
Heures
incf
RegHeur
HeuresHeures1
Si
HeuresMax24RazHeures
beqc
HeuresMax24
alors on va RazHeures sinon retour
return
return
Programme principal
initialisations
passer en page 1 accs TRIS et
STATUSRP0
bsf
Init
OPTION
Tout PORTB en sortie
TRISB
RA4 en sortie le reste
TRISASortieRA4
en entre
1RBPU0PS00PS11PS2 pas de
pull Up
sur port B et timer
OPTIO
prdiv32
Repasser en page 0
STATUSRP0
movlf CTinterNBinter
inters
Raz des variables
Secondes
Minutes
Heures
Boucle du programme principal
Dtection touches clavier
clrf
bcf
movlw
movwf
bcf
movlw
movwf
call DetecteTouches
21
Boucle
Affichage multiplex
Affichage multiplex
Affiche
call
La sortie clignote la seconde
ClignoSortie
call
On reboucle
Boucle
goto
Sous programmes
BcdUniteAff3Data
movff
BcdDizaineAff4Data
movff
return
BinW movf
Si Bin 0 on retourne
skipz
Sinon IncBcdUnite
IncBcdUnite
goto
return
BcdUnite BcdUnite1
BcdUnite
On dcrmente Bin
Bin
decf
Si
BcdUniteMaxUniteRazBcdUnite
beqc
BcdUniteMaxUnite
on va RazBcdUnite
Bcl
goto
sinon Bcl
BcdUnite
Raz
BcdUnite
BcdDizaine
BcdDizaine
incf
22
BinBcd
Bcl
incf IncBcdUnite
clrf RazBcdUnite
BcdDizaine1
Bcl
Affichage multiplex
On charge la donne
quartet bas
On charge lafficheur
quartet haut
On envoie PORTB
On temporise
Pareil...
Pareil...
Pareil...
goto
Aff1DataW
movf
Aff1
iorlw
Affiche
PORTB movwf
T1mS
call
Aff2DataW movf
Aff2 iorlw
PORTB movwf
T1mS
call
Aff3DataW movf
Aff3 iorlw
PORTB movwf
T1mS
call
Aff4DataW movf
Aff4 iorlw
PORTB movwf
T1mS
call
NbTempoReg
movf
TempoRgl
skipz
goto decreme
decf
decreme
SecondesW
On ne garde que le bit 0
1 andlw
Si 0 alors SortieRA40
ClrRA4
bz
Sinon SortieRA41 et voila
SetRA4
goto
Sortie1
PORTASortieRA4
bcf
return
movf ClignoSortie
ClrRA4
goto Affiche
Sortie0
return
NbTempoReg
PORTASortieRA4
23
bsf
SetRA4
RazSec
call
RegHeures
call
RegMinutes
call
Reset ou return
PORTAToucheRA3
btfss
Init
call
return
Rglage de lhorloge
Secondes
return
movlf
btfss DetecteTouches
clrf
movlf
RazSec
RegMinutes
RegHeures
call
include Tempo4.inc
Fin
Fin du programme
end
picad.asm 2.C
24
include registres.h
include stdmac.h
org
0x20zreg zone registre libre usage gnral
NbTempo
NbTempo1
rm
rm
1
1
org
0zprog
Initialisation
Init
bsf
STATUSRP0
clrf
TRISB
bcf
STATUSRP0
Incremente
Decremente
incf
decf
btfss
goto
goto
Passer en page 1
PORTB en sortie
Repasser en page 0
PORTB
call
T1mS
goto
Boucle
PORTBPORTB1
PORTB
call
T1mS
goto
Boucle
PORTBPORTB1
Temporisation logicielle
include Tempo4.inc
end
chenillard.asm 3.C
25
Programme chenillard sur le PORTB le sens est dpendant de RA0 et RA3
La vitesse de dfilement dpend de RA1 et RA2
include registres.h
include stdmac.h
Dfinition des constantes
CTtempo
equ 100
B0
equ 0
B1
equ 1
B2
equ 2
B3
equ 3
SensBit0
equ 0
Rservaton des variables
org
0x20zreg zone registre libre usage gnral
NBtempo
Vitesse
Sens
rm
rm
rm
1
1
org
0zprog
Reset toujours ladresse 0
Initialisation
Init
bsf
STATUSRP0
Passer en page 1
clrf
TRISB
PORTB en sortie
bcf
STATUSRP0
Repasser en page 0
clrf
PORTB
Tout PORTB 0
bsf
PORTB0
Bit 0 du PORTB 1
movlf CTtempoVitesseInitialisation
de
la
Tempo
goto
TestRA3
Si oui alors le bit 0 du
registre
bsf
SensSensBit0
Sens est mis 1 Set
26
TestRA3
B3 appuy
registre
RA3
PORTAB3
goto
TestSens
bcf
SensSensBit0
SensSensBit0
Gauche
Droite
goto
gauche
goto
est
il
Gauche
rlf
PORTB
goto
RegleVitesse
Rotation gauche
Droite
rrf
PORTB
Rotation droite
Rglage de la vitesse
RegleVitesse
btfsc
PORTAB1
appuy
goto
TestMoins
vitesse
Plus
incf
Vitesse
TestMoins
btfsc
PORTAB2
B2 appuy
goto
Temporisation
temporise
Moins
decf
Vitesse
decfsz NBtempo
goto
Attente
goto
TestRA0
include Tempo4.inc
end
27
Bouton
btfsc
Si non alors on
Initialisation de Tempo
Tempo base de temps
Dcrmente le NBtempo jusqua 0
Si pas 0 alors Attente
Si 0 on reboucle