Etape 3 #1

Merged
yoboujon merged 29 commits from etape_3 into main 2023-05-29 22:57:47 +02:00
4 changed files with 60 additions and 36 deletions
Showing only changes of commit ea995a5dfe - Show all commits

View file

@ -125,7 +125,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGDARM</Key>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=15,39,661,712,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=463,144,884,571,1)(121=476,571,897,998,1)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=18,101,612,852,0)(131=255,99,849,850,0)(132=49,93,643,844,0)(133=-1105,32,-511,783,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=15,39,661,712,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=10,69,431,496,1)(121=30,595,451,1022,1)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=18,101,612,852,0)(131=255,99,849,850,0)(132=49,93,643,844,0)(133=-1105,32,-511,783,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@ -142,7 +142,7 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>89</LineNumber>
<LineNumber>65</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222334</Address>
<ByteObject>0</ByteObject>
@ -153,14 +153,14 @@
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Principale.asm</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Simu_Etape0\Principale.asm\89</Expression>
<Expression>\\Simu_Etape0\Principale.asm\65</Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>59</LineNumber>
<LineNumber>66</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222326</Address>
<Address>134222338</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
@ -169,14 +169,14 @@
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Principale.asm</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Simu_Etape0\Principale.asm\59</Expression>
<Expression>\\Simu_Etape0\Principale.asm\66</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>56</LineNumber>
<LineNumber>92</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222316</Address>
<Address>134222342</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
@ -185,14 +185,14 @@
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\Principale.asm</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Simu_Etape0\Principale.asm\56</Expression>
<Expression>\\Simu_Etape0\Principale.asm\92</Expression>
</Bp>
<Bp>
<Number>3</Number>
<Type>0</Type>
<LineNumber>118</LineNumber>
<LineNumber>171</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222508</Address>
<Address>134222642</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
@ -201,14 +201,30 @@
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\FonctionEtape2.asm</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Simu_Etape0\FonctionEtape2.asm\118</Expression>
<Expression>\\Simu_Etape0\FonctionEtape2.asm\171</Expression>
</Bp>
<Bp>
<Number>4</Number>
<Type>0</Type>
<LineNumber>170</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222638</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\FonctionEtape2.asm</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Simu_Etape0\FonctionEtape2.asm\170</Expression>
</Bp>
<Bp>
<Number>5</Number>
<Type>0</Type>
<LineNumber>80</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222362</Address>
<Address>134222370</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
@ -219,22 +235,6 @@
<ExecCommand></ExecCommand>
<Expression>\\Simu_Etape0\FonctionEtape.asm\80</Expression>
</Bp>
<Bp>
<Number>5</Number>
<Type>0</Type>
<LineNumber>150</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134222588</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\FonctionEtape2.asm</Filename>
<ExecCommand></ExecCommand>
<Expression>\\Simu_Etape0\FonctionEtape2.asm\150</Expression>
</Bp>
<Bp>
<Number>6</Number>
<Type>0</Type>
@ -254,7 +254,7 @@
<Bp>
<Number>7</Number>
<Type>0</Type>
<LineNumber>92</LineNumber>
<LineNumber>150</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
@ -263,14 +263,14 @@
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\FonctionEtape.asm</Filename>
<Filename>.\FonctionEtape2.asm</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>8</Number>
<Type>0</Type>
<LineNumber>82</LineNumber>
<LineNumber>182</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
@ -279,14 +279,14 @@
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>.\Principale.asm</Filename>
<Filename>.\FonctionEtape2.asm</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>9</Number>
<Type>0</Type>
<LineNumber>93</LineNumber>
<LineNumber>96</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
@ -302,7 +302,7 @@
<Bp>
<Number>10</Number>
<Type>0</Type>
<LineNumber>94</LineNumber>
<LineNumber>97</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>

View file

@ -14,6 +14,7 @@
EXPORT Set_SCLK
EXPORT Reset_SCLK
EXPORT DriverGlobal
EXPORT Tempo
;**************************************************************************
@ -32,6 +33,7 @@
SCLK EQU 5
SIN1 EQU 7
MILSEC EQU 1304
PF DCD (1<<31)
DataSend DCB 1
@ -109,6 +111,24 @@ Reset_SCLK PROC
ENDP
Tempo PROC
MOV R1,#10 ;*******
MUL R0,R0,R1 ;10*Argument
MOV R2,#MILSEC ;1304, la constante pour avoir 0.01ms
MOV R3,#0 ;0
WHILE_NBMIL ;for(int i=0;i<10*Arg;i++)
ADD R3,R3,#1 ;i++
MOV R1,#0 ;j=0
CMP R3,R0 ;SI i==10*Arg alors on arrête la boucle
BXEQ LR
WHILE_NOPL ;for(int j=0;j<1304;j++)
NOP ;Timing
ADD R1,R1,#1 ;j++
CMP R1,R2 ;SI j==1304 alors on arrête la sous-boucle
BNE WHILE_NOPL ;NON : On retourne dans cette boucle
B WHILE_NBMIL ;OUI : On retourne dans la surboucle
ENDP
;****************************************************************************
;R1 = *ValCourante
;R2 = NBLed (i)

View file

@ -29,6 +29,7 @@
IMPORT Set_SCLK
IMPORT Reset_SCLK
IMPORT DriverGlobal
IMPORT Tempo
EXPORT main
@ -60,7 +61,9 @@ main PROC
;*******************************************************************************
; ETAPE 2
;*******************************************************************************
BL DriverGlobal;
BL DriverGlobal ;*******************
MOV R0, #10 ;Argument : 10ms
BL Tempo; :Tempo(10)
;*******************************************************************************
; ETAPE 1

View file

@ -7,6 +7,7 @@ Le but sera de faire fonctionner diverses LEDS à l'aide d'un STM32 et tout cela
|Set_X|**1** - R0 : PINAX||Pour un output donné, met à 1 ce dernier.|
|Reset_X|**1** - R0 : PINAX||Pour un output donné, force à 0 ce dernier.|
|DriverGlobal|||Pour une Barette de LED donnée, envoie les signaux demandés|
|Tempo|**1** - R0 : Nms||Pour un temps donné, le processeur se met en attente (similaire à sleep)|
---
Chaque fonction prendra des arguments de R0 à R3 (avec R3 étant une référence au tas si le besoin d'argument est supérieur à 3). Le renvoi se fait sur R0.