Index: branch/zemeta/Emb_App.tws
===================================================================
--- branch/zemeta/Emb_App.tws	(revision 468)
+++ branch/zemeta/Emb_App.tws	(revision 469)
@@ -9,6 +9,7 @@
 [OPEN_WORKSPACE_FILES]
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\can.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 
+"E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\periph.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\uart0.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\conf_noyau.cfg" 
@@ -22,6 +23,7 @@
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" -8 -30 1596 527 1 4 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\can.c" 50 50 1430 351 0 2 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 75 75 1430 351 0 3 
+"E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 50 50 1430 339 0 9 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\periph.c" 0 0 1430 351 0 7 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\uart0.c" 125 125 1430 351 0 6 
 [LOADED_PROJECTS]
Index: branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf
===================================================================
--- branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf	(revision 468)
+++ branch/zemeta/Emb_App/SessionM32C_E8a_system.hsf	(revision 469)
@@ -141,8 +141,8 @@
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRWndInstanceKey0" "{WK_00000001_PDMR}EmbM32C87AppSessionM32C_E8a_system" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "0" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "0" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000004044" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000020" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000258" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000001" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "0000000000000000" 
@@ -149,12 +149,12 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000512" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF0572" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FF2D4A" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFF800" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000BA2" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000000008DC" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000001" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000004044" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000013CE" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000090A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000000000C0" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000" 
@@ -171,9 +171,9 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_33" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_34" "000000000000036A" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000008" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000BD8" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000FF0008" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000120000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000000013D4" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000512" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" 
@@ -223,7 +223,13 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007_SCOPE" "Current Scope," 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008" "capt_detecte, 2, 0, P, Col, Dec, MA" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "9" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0009" "mode_course, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0009_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010" "num_piste, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0010_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011" "appui_Bp, 2, 0, P, Col, Dec, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0011_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "12" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200" 
@@ -325,14 +331,15 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_2018_zemeta\tp_info6\bsp\lcd.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\crt0mr.a30" 
-"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\programme_principal_etud.c" 
+"E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\Emb_App\conf_noyau.cfg" 
+"E:\tp_info6_2018_zemeta\tp_info6\Disassembly" 
+"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\Debug\mr308.inc" 
+"E:\tp_info6_2018_zemeta\tp_info6\bsp\periph.c" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\uart0.c" 
-"E:\tp_info6_2018_zemeta\tp_info6\bsp\dma0.c" 
-"E:\tp_info6_2018_zemeta\tp_info6\bsp\periph.c" 
-"E:\tp_info6_2018_zemeta\tp_info6\Emb_App\Debug\mr308.inc" 
-"E:\tp_info6_2018_zemeta\tp_info6\Disassembly" 
 "E:\tp_info6_2018_zemeta\tp_info6\bsp\can.c" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
@@ -380,5 +387,5 @@
 [FLASH_DETAILS]
 "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" 
 [BREAKPOINTS]
-"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 92283440 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"d:\profs\tp_info14_travail\tp_info14\emb_app\programme_principal_etud.c" 95 92799536 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/zemeta/Emb_App/programme_principal_etud.c
===================================================================
--- branch/zemeta/Emb_App/programme_principal_etud.c	(revision 468)
+++ branch/zemeta/Emb_App/programme_principal_etud.c	(revision 469)
@@ -118,7 +118,8 @@
 //				correspondant au nom du véhicule si le nom se termine par '*'
 CanFrame comm,comm2,comm3;
 unsigned short k=1,k2=1, angle_reel, error,error2,d_reel,D/*=714*/, d_max = 2000, appui_Bp = 0 ; // D = 500 pour piste verte , D = 714 pour piste verte
-unsigned short consigne_tour/*=450*/, vitesse_roue/*=20*/, capt_detecte, comRoue, mode_course ,num_piste ;  // V = 30 pour piste verte , V = 38 pour piste bleu  
+unsigned short consigne_tour/*=450*/, vitesse_roue/*=20*/, capt_detecte, comRoue, mode_course ,num_piste ,depart;  // V = 30 pour piste verte , V = 38 pour piste bleu  
+unsigned char verte,bleue,rouge,noire;
 CanFrame requete,requete3,requete4 ;  
 
 void main()
@@ -138,6 +139,7 @@
 	sta_tsk(id_aber);
 	sta_tsk(id_appui);
 	sta_tsk(id_mode);
+	sta_tsk(id_piste);
 	sta_tsk(id_piste_verte_bleue); // à activer pour piste verte et bleue
 	
 	comRoue=-k2*error2 ;
@@ -384,6 +386,26 @@
 		dly_tsk(5) ;
 		mode_course = periph[ADDR('M')].val;
 		num_piste = (mode_course<<8) ; // verte = 256 ; bleu = 512 ; rouge = 768 ; rouge = 1024 ; 
+		depart = (mode_course>>15);
 		dly_tsk(5) ;
 	}
+}
+
+void piste()
+{
+	while (1)
+	{
+		dly_tsk(5) ;
+		switch(num_piste)
+		{
+			case 256: verte=1;
+			break;
+			case 512: bleue=1;
+			break;
+			case 768: rouge=1;
+			break;
+			case 1024: noire=1;
+			break;
+		}
+	}dly_tsk(5);
 }
\ No newline at end of file
Index: branch/zemeta/Emb_App/conf_noyau.cfg
===================================================================
--- branch/zemeta/Emb_App/conf_noyau.cfg	(revision 468)
+++ branch/zemeta/Emb_App/conf_noyau.cfg	(revision 469)
@@ -145,6 +145,17 @@
 };
 
 task[]{
+	entry_address	= piste();
+	name	= id_piste;
+	stack_size	= 256;
+	stack_section	= stack;
+	priority	= 2;
+	initial_start	= OFF;
+	exinf	= 0x0;
+};
+
+
+task[]{
 	entry_address	= acquis_distance();
 	name	= id_dist;
 	stack_size	= 256;
