Fin Partie Gestion du son
This commit is contained in:
		
							parent
							
								
									5137bb9b95
								
							
						
					
					
						commit
						3933592a11
					
				
					 5 changed files with 37 additions and 39 deletions
				
			
		|  | @ -1,16 +0,0 @@ | |||
| * U:\Documents\TP_Pioustolet\Partie ASM\grpE_RAMOUCHE_CASEAU\dossier\soft\PjtKEIL_StepSon\PWM.asc | ||||
| V1 Compteur 0 PULSE(0 3.3 0 5u 0 0 5u) | ||||
| C1 Filtre 0 10n | ||||
| R1 Filtre PWM 3.9k | ||||
| V2 CompValue 0 SINE(1.65 1 2k) | ||||
| B1 PWM 0 V=if(V(CompValue)>V(Compteur),3.3,0) | ||||
| ;ac dec 100 1 10meg | ||||
| .tran 0 1.5m 0 0.01u | ||||
| * Compteur de l'unité Timer | ||||
| * Partie PWM de l'unité Timer | ||||
| * TIMER3 | ||||
| * PB0 | ||||
| * Chanel 3 | ||||
| * STM32F103 | ||||
| .backanno | ||||
| .end | ||||
							
								
								
									
										6
									
								
								dossier/soft/PjtKEIL_StepSon/Src/GestionSon.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								dossier/soft/PjtKEIL_StepSon/Src/GestionSon.h
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| //Il joue une donnée du tableau Son à chaque appel
 | ||||
| extern void callbackson(void); | ||||
| 
 | ||||
| //Permet le lancement de la séquence sonore
 | ||||
| extern void StartSon(void); | ||||
| 	 | ||||
|  | @ -19,14 +19,14 @@ FlagSon	dcb 0 | |||
| SortieSon dcd 0 | ||||
| 	EXPORT SortieSon | ||||
| 		 | ||||
| Index dcw 0 | ||||
| Index dcw 0xFFFF ;on met Index à sa valeur la plus haute pour être sûr de ne pas jouer le son tant qu'on aura pas fait appel à StartSon qui le mettra à 0 
 | ||||
| 	EXPORT Index | ||||
| 
 | ||||
| ; ===============================================================================================
 | ||||
| 	 | ||||
| ;Exportation de la fonction callbackson()
 | ||||
| 	EXPORT callbackson | ||||
| 
 | ||||
| 	EXPORT StartSon | ||||
| 
 | ||||
| 		 | ||||
| ;Section ROM code (read only) :		
 | ||||
|  | @ -74,5 +74,16 @@ FINSI | |||
| 		pop{r4} | ||||
| 		pop {PC} | ||||
| 		endp | ||||
| 			 | ||||
| StartSon proc | ||||
| 		push{lr} | ||||
| 		 | ||||
| 		ldr r0, = Index | ||||
| 		mov r1, #0 | ||||
| 		str r1, [r0] | ||||
| 		 | ||||
| 		pop{PC} | ||||
| 		endp | ||||
| 		 | ||||
| 		 | ||||
| 	END	 | ||||
|  | @ -1,4 +1,5 @@ | |||
| #include "DriverJeuLaser.h" | ||||
| #include "GestionSon.h" | ||||
| 
 | ||||
| int main(void) | ||||
| { | ||||
|  | @ -16,10 +17,6 @@ Timer_1234_Init_ff(TIM4, 6552); //6552  | |||
| // configuration du Timer 3 pour une PWM de fréquence 100kHz
 | ||||
| PWM_Init_ff(TIM3, 3, 720); | ||||
| 	 | ||||
| //Récupération de la fonction timer_callback() codée en ASM
 | ||||
| 	extern void callbackson(); | ||||
| 	 | ||||
| 	 | ||||
| 	 | ||||
| // Activation des interruptions issues du Timer 4
 | ||||
| // Association de la fonction à exécuter lors de l'interruption : timer_callback
 | ||||
|  | @ -33,23 +30,8 @@ GPIO_Configure(GPIOB, 0, OUTPUT, ALT_PPULL); | |||
| 
 | ||||
| //============================================================================	
 | ||||
| 	 | ||||
| StartSon(); | ||||
| while	(1) | ||||
| 	{ | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| /*char FlagCligno;
 | ||||
| 
 | ||||
| void timer_callback(void) | ||||
| { | ||||
| 	if (FlagCligno==1) | ||||
| 	{ | ||||
| 		FlagCligno=0; | ||||
| 		GPIOB_Set(1); | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		FlagCligno=1; | ||||
| 		GPIOB_Clear(1); | ||||
| 	} | ||||
| }*/ | ||||
|  | @ -388,6 +388,11 @@ | |||
|               <FileType>1</FileType> | ||||
|               <FilePath>.\Src\principal.c</FilePath> | ||||
|             </File> | ||||
|             <File> | ||||
|               <FileName>GestionSon.h</FileName> | ||||
|               <FileType>5</FileType> | ||||
|               <FilePath>.\Src\GestionSon.h</FilePath> | ||||
|             </File> | ||||
|           </Files> | ||||
|         </Group> | ||||
|         <Group> | ||||
|  | @ -439,7 +444,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> | ||||
|  | @ -817,6 +822,11 @@ | |||
|               <FileType>1</FileType> | ||||
|               <FilePath>.\Src\principal.c</FilePath> | ||||
|             </File> | ||||
|             <File> | ||||
|               <FileName>GestionSon.h</FileName> | ||||
|               <FileType>5</FileType> | ||||
|               <FilePath>.\Src\GestionSon.h</FilePath> | ||||
|             </File> | ||||
|           </Files> | ||||
|         </Group> | ||||
|         <Group> | ||||
|  | @ -1315,6 +1325,11 @@ | |||
|               <FileType>1</FileType> | ||||
|               <FilePath>.\Src\principal.c</FilePath> | ||||
|             </File> | ||||
|             <File> | ||||
|               <FileName>GestionSon.h</FileName> | ||||
|               <FileType>5</FileType> | ||||
|               <FilePath>.\Src\GestionSon.h</FilePath> | ||||
|             </File> | ||||
|           </Files> | ||||
|         </Group> | ||||
|         <Group> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue