step1, step2 , stepSon

This commit is contained in:
elouali403 2023-04-07 09:49:10 +02:00
parent 15cdcee56f
commit 2306ac577e
14 changed files with 344 additions and 88 deletions

View file

@ -10,7 +10,7 @@
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -154,6 +154,21 @@
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>VarTime</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>0x20000000</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -174,7 +189,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -196,6 +211,18 @@
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<LogicAnalyzers>
<Wi>
<IntNumber>0</IntNumber>
<FirstString>((portb &amp; 0x00000002) &gt;&gt; 1 &amp; 0x2) &gt;&gt; 1</FirstString>
<SecondString>00000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F240000000000000000000000000000000000000004010008</SecondString>
</Wi>
<Wi>
<IntNumber>1</IntNumber>
<FirstString>VarTime &gt;&gt; 1</FirstString>
<SecondString>FF00000000000000000000000000000080842E410000000000000000000000000000000056617254696D65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000002000000000000000000E03F2400000000000000000000000000000000000000D8030008</SecondString>
</Wi>
</LogicAnalyzers>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
@ -260,7 +287,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -353,7 +380,7 @@
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>

View file

@ -10,7 +10,7 @@
<TargetName>Simu</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -424,7 +424,7 @@
<TargetName>CibleSondeKEIL</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1338,11 +1338,6 @@
<Layers>
<Layer>
<LayName>&lt;Project Info&gt;</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayTarg>0</LayTarg>
<LayPrjMark>1</LayPrjMark>
</Layer>

View file

@ -10,17 +10,16 @@
;Section RAM (read write):
area maram,data,readwrite
VarTime dcd 0
VarTime dcd 0 ; adresse
; ===============================================================================================
;constantes (équivalent du #define en C)
TimeValue equ 900000
TimeValue equ 900000 ; valeur
EXPORT Delay_100ms ; la fonction Delay_100ms est rendue publique donc utilisable par d'autres modules.
export VarTime
;Section ROM code (read only) :
area moncode,code,readonly
@ -41,19 +40,19 @@ TimeValue equ 900000
Delay_100ms proc
ldr r0,=VarTime
ldr r0,=VarTime ; r0=VarTime(VarTime est une adresse)
ldr r1,=TimeValue
str r1,[r0]
ldr r1,=TimeValue ; r1=TimeValue (TimeValue est une valeur)
str r1,[r0] ; TimeValue est stockée dans l'adresse stockée dans R0, c'est-à-dire dans VarTime
BoucleTempo
ldr r1,[r0]
ldr r1,[r0] ; r1 = *r0 r1 = VarTime en C
subs r1,#1
str r1,[r0]
bne BoucleTempo
subs r1,#1 ; r1 = r1 - 1
str r1,[r0] ; *r0 = r1 VarTime = r1 en C
bne BoucleTempo ; boucle while
bx lr
bx lr ; on retourne à l'adresse stockée dans le registre lr
endp

View file

@ -10,7 +10,7 @@
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
@ -75,7 +75,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -153,7 +153,24 @@
<Name>-U066CFF574857847167074929 -O2254 -S0 -C0 -A0 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103RB$Flash\STM32F10x_128.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>27</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134220352</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Src\Cligno.s</Filename>
<ExecCommand></ExecCommand>
<Expression>\\BacASable\Src/Cligno.s\27</Expression>
</Bp>
</Breakpoint>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -174,7 +191,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -267,7 +284,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -374,7 +391,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>

View file

@ -10,7 +10,7 @@
<TargetName>Simu</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -424,7 +424,7 @@
<TargetName>CibleSondeKEIL</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1338,11 +1338,6 @@
<Layers>
<Layer>
<LayName>&lt;Project Info&gt;</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayTarg>0</LayTarg>
<LayPrjMark>1</LayPrjMark>
</Layer>

View file

@ -1,7 +1,9 @@
PRESERVE8
THUMB
include Driver/DriverJeuLaser.inc
export timer_callback
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
area mesdata,data,readonly
@ -9,7 +11,7 @@
;Section RAM (read write):
area maram,data,readwrite
FlagCligno dcd 0
; ===============================================================================================
@ -21,10 +23,23 @@
area moncode,code,readonly
; écrire le code ici
timer_callback
push {LR}
ldr r1, =FlagCligno
ldr r1,[r1]
MOV r0, #1
CMP r1, #0
BEQ si_zero ;boucle si =1
BL GPIOB_Set
MOV r1, #0
B fin
si_zero BL GPIOB_Clear
MOV r1, #1
fin ldr r2, =FlagCligno
str r1, [r2]
pop {LR}
BX LR
END
END

View file

@ -17,7 +17,8 @@ CLOCK_Configure();
// configuration du Timer 4 en débordement 100ms
//** Placez votre code là ** //
Timer_1234_Init_ff(TIM4,7200000);
Active_IT_Debordement_Timer(TIM4,2, timer_callback);
// Activation des interruptions issues du Timer 4
@ -42,20 +43,5 @@ while (1)
}
}
char FlagCligno;
void timer_callback(void)
{
if (FlagCligno==1)
{
FlagCligno=0;
GPIOB_Set(1);
}
else
{
FlagCligno=1;
GPIOB_Clear(1);
}
}

View file

@ -0,0 +1,5 @@
#define GestionSon
void CallbackSon (void)
void StartSon (void)

View file

@ -1,7 +1,13 @@
PRESERVE8
THUMB
include Driver/DriverJeuLaser.inc
export CallbackSon
export StartSon
import Son
import LongueurSon
export SortieSon
; ====================== zone de réservation de données, ======================================
;Section RAM (read only) :
area mesdata,data,readonly
@ -9,6 +15,8 @@
;Section RAM (read write):
area maram,data,readwrite
SortieSon dcw 0
Index dcd LongueurSon
@ -21,10 +29,46 @@
area moncode,code,readonly
; écrire le code ici
CallbackSon ; corps de la fonction Callback
push {LR}
push {r4-r7}
ldr r0, =Son ; L'adresse du tableau de sons est stockée dans r0
ldr r1, =Index ; L'adresse de l'index de table est stockée dans r1
ldr r2, [r1] ; L'index actuel est stocké dans r2
ldr r3, =LongueurSon ; L'adresse de la taille du tableau est stockée dans r3-
ldr r4, [r3] ; La valeur de la taille du tableau est stockée dans r4
cmp r2, r4 ; on vérifie qu'on n'est pas à la fin du tableau
beq fin
ldr r5, =SortieSon ; L'adresse de sortie est stockée dans r5
ldrsh r6, [r0, r2, lsl #1] ; La valeur de l'échantillon pointée par l'index est stockée dans r6
mov r7, #720 ; Mise à l'échelle
mul r6, r7
asr r6, #16
add r6, #360
mov r0, r6
add r2, r2, #1 ; Incrémentation de l'index
str r2, [r1] ; la nouvelle valeur de l'index est envoyée dans index
str r6, [r5] ; la valeur de l'échantillon est stockée dans SortieSon
bl PWM_Set_Value_TIM3_Ch3 ; Mise à jour du rapport cyclique dans le cas de l'utilisation de la PWM
fin pop {r4-r7}
pop {LR}
bx LR
StartSon ; corps de la fonction StartSon
ldr r1, =Index ; L'adresse de l'index de table est stockée dans r1
mov r2, #0 ; Mise à 0
str r2, [r1] ; La nouvelle valeur de l'index (0) est envoyée dans index
bx LR
END
; 8. Signal PWM à l'état haut (3,3V) si CompValue est supérieure au Compteur
; Signal PWM à l'état bas (0V) si CompValue est inférieur au Compteur
;15. Fc = 1/(2*pi*RC). On choisit R=1,8 kOhms et on trouve après calcul C=22,1 nF

View file

@ -9,7 +9,7 @@
export Son
LongueurSon DCD 5512
PeriodeSonMicroSec DCD 91
PeriodeSonMicroSec DCD 91
Son
DCW -6911
DCW 20666

View file

@ -2,8 +2,9 @@
#include "DriverJeuLaser.h"
void CallbackSon(void); //définie en langage d'assemblage
extern void StartSon(void);
int bouton =0 ;
int main(void)
{
@ -14,15 +15,27 @@ int main(void)
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
CLOCK_Configure();
//Configuration timer 4
Timer_1234_Init_ff(TIM4,6552);
Active_IT_Debordement_Timer(TIM4,2, CallbackSon);
//Configuration PWM
PWM_Init_ff (TIM3, 3, 720); // Fréquence de la PWM = PeriodeSonMicroSec / 720
GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL);
StartSon();
//============================================================================
while (1)
{
if(bouton==1){
StartSon();
bouton=0;
}
}
}

View file

@ -10,7 +10,7 @@
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc</tExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
@ -154,6 +154,14 @@
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>0x200000A0</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
@ -174,7 +182,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -199,8 +207,13 @@
<LogicAnalyzers>
<Wi>
<IntNumber>0</IntNumber>
<FirstString>((portb &amp; 0x00000002) &gt;&gt; 1 &amp; 0x2) &gt;&gt; 1</FirstString>
<SecondString>FF000000000000000000000000000000E0FFEF400100000000000000000000000000000028706F7274622026203078303030303030303229203E3E2031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000F03F160000000000000000000000000000000000000096020008</SecondString>
<FirstString>((portb &amp; 0x00000001) &amp; 0x1) &gt;&gt; 0</FirstString>
<SecondString>00800000000000000000000000000000E0FFEF400100000000000000000000000000000028706F72746220262030783030303030303031290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000001000000000000000000E03F1700000000000000000000000000000000000000B40A0008</SecondString>
</Wi>
<Wi>
<IntNumber>1</IntNumber>
<FirstString>`SortieSon</FirstString>
<SecondString>FF0000000000000000000000000000000000894000000000000000000000000000000000536F72746965536F6E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000002000000000000000000E03F1700000000000000000000000000000000000000B40A0008</SecondString>
</Wi>
</LogicAnalyzers>
<DebugDescription>
@ -267,7 +280,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>0</IsCurrentTarget>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -346,6 +359,13 @@
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>bouton</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
@ -374,7 +394,7 @@
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aLa>1</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
@ -460,7 +480,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
<IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>18</CpuCode>
<DebugOpt>
@ -666,6 +686,38 @@
</File>
</Group>
<Group>
<GroupName>Son</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Src\bruitverre.asm</PathWithFileName>
<FilenameWithoutPath>bruitverre.asm</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Src\GestionSon.s</PathWithFileName>
<FilenameWithoutPath>GestionSon.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<tvExp>0</tvExp>

View file

@ -10,7 +10,7 @@
<TargetName>Simu</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -410,6 +410,21 @@
</File>
</Files>
</Group>
<Group>
<GroupName>Son</GroupName>
<Files>
<File>
<FileName>bruitverre.asm</FileName>
<FileType>2</FileType>
<FilePath>.\Src\bruitverre.asm</FilePath>
</File>
<File>
<FileName>GestionSon.s</FileName>
<FileType>2</FileType>
<FilePath>.\Src\GestionSon.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
@ -419,7 +434,7 @@
<TargetName>CibleSondeKEIL</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -819,6 +834,21 @@
</File>
</Files>
</Group>
<Group>
<GroupName>Son</GroupName>
<Files>
<File>
<FileName>bruitverre.asm</FileName>
<FileType>2</FileType>
<FilePath>.\Src\bruitverre.asm</FilePath>
</File>
<File>
<FileName>GestionSon.s</FileName>
<FileType>2</FileType>
<FilePath>.\Src\GestionSon.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<GroupOption>
@ -897,7 +927,7 @@
<TargetName>CibleSondeST</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
@ -1297,6 +1327,21 @@
</File>
</Files>
</Group>
<Group>
<GroupName>Son</GroupName>
<Files>
<File>
<FileName>bruitverre.asm</FileName>
<FileType>2</FileType>
<FilePath>.\Src\bruitverre.asm</FilePath>
</File>
<File>
<FileName>GestionSon.s</FileName>
<FileType>2</FileType>
<FilePath>.\Src\GestionSon.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
@ -1322,12 +1367,7 @@
<LayerInfo>
<Layers>
<Layer>
<LayName>&lt;Project Info&gt;</LayName>
<LayDesc></LayDesc>
<LayUrl></LayUrl>
<LayKeys></LayKeys>
<LayCat></LayCat>
<LayLic></LayLic>
<LayName>StepSon</LayName>
<LayTarg>0</LayTarg>
<LayPrjMark>1</LayPrjMark>
</Layer>

View file

@ -0,0 +1,68 @@
Version 4
SHEET 1 1084 820
WIRE 208 16 96 16
WIRE 784 16 208 16
WIRE 944 16 864 16
WIRE 1008 16 944 16
WIRE -368 80 -512 80
WIRE 96 96 96 16
WIRE 944 144 944 16
WIRE -512 176 -512 80
WIRE 96 224 96 176
WIRE 944 256 944 208
WIRE -512 304 -512 256
WIRE 96 384 -48 384
WIRE -48 480 -48 384
WIRE -48 608 -48 560
FLAG -512 304 0
FLAG -368 80 Compteur
FLAG 944 256 0
FLAG 1008 16 Filtre
FLAG -48 608 0
FLAG 96 384 CompValue
FLAG 208 16 PWM
FLAG 96 224 0
SYMBOL voltage -512 160 R0
WINDOW 3 -372 78 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(0 3.3 0 5u 0 0 5u)
SYMATTR InstName V1
SYMBOL cap 928 144 R0
SYMATTR InstName C1
SYMATTR Value 10n
SYMBOL res 880 0 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 3.9k
SYMBOL voltage -48 464 R0
WINDOW 3 49 61 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value SINE(1.65 1 2k)
SYMATTR InstName V2
SYMBOL bv 96 80 R0
SYMATTR InstName B1
SYMATTR Value V=if(V(CompValue)>V(Compteur),3.3,0)
TEXT 272 256 Left 2 !;ac dec 100 1 10meg
TEXT 272 296 Left 2 !.tran 0 1.5m 0 0.01u
TEXT -880 40 Left 2 ;Compteur de l'unité Timer
TEXT -96 -24 Left 2 ;Partie PWM de l'unité Timer
TEXT -904 -56 Left 4 ;TIMER3
TEXT 688 80 Left 4 ;PB0
TEXT 480 0 Left 2 ;Chanel 3
TEXT 384 -168 Left 5 ;STM32F103
LINE Normal 688 48 752 -16
LINE Normal 688 -16 688 48
LINE Normal 752 48 688 -16
LINE Normal 752 48 752 48
LINE Normal 720 -208 720 -16
LINE Normal 256 -208 720 -208
LINE Normal 720 784 720 48
LINE Normal 720 784 720 784
LINE Normal 720 816 720 784
RECTANGLE Normal -192 352 -912 16 2
RECTANGLE Normal 592 656 -128 -48 2
RECTANGLE Normal 640 736 -976 -96
RECTANGLE Normal 752 48 688 -16