Index: branch/Guer/sp4b1/Yoann_Guer_projet1/SessionM32C_E8a_SYSTEM.ini
===================================================================
--- branch/Guer/sp4b1/Yoann_Guer_projet1/SessionM32C_E8a_SYSTEM.ini	(revision 484)
+++ branch/Guer/sp4b1/Yoann_Guer_projet1/SessionM32C_E8a_SYSTEM.ini	(revision 485)
@@ -18,9 +18,11 @@
 PROCESSOR_MODE=0
 [COMMUNI]
 COMSPEED=8
+COMSPEED PROGRAM FLASH=8
+COMSPEED DATA FLASH=8
 [Driver Configuration]
 Renesas Communications=USB interface,0,
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=fe0004
+RESET=fe0002
Index: branch/Guer/sp4b1/Yoann_Guer_projet1/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/Guer/sp4b1/Yoann_Guer_projet1/SessionM32C_E8a_SYSTEM.hsf	(revision 484)
+++ branch/Guer/sp4b1/Yoann_Guer_projet1/SessionM32C_E8a_SYSTEM.hsf	(revision 485)
@@ -45,7 +45,7 @@
 "{55384715-F881-421C-A548-D7D1ABE158E1}PDMRCtrlViews" "0" 
 "{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" "00000000000000FE" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "0000000000000000" 
@@ -52,13 +52,13 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "0000000000000000" 
 "{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" "0000000000000400" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE0349" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFFD00" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000700" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000A04" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE0002" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "000000000000C400" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000081" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000000" 
 "{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" 
@@ -75,10 +75,10 @@
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_33" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_34" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_35" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000FE0003" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000020000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000400" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "36" 
@@ -108,9 +108,11 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth12" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth2" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "touche, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "touche, 10, 0, P, Col, Hex, N" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "1" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "test, 10, 0, P, Col, Hex, N" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "2" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "150" 
@@ -681,13 +683,13 @@
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp98" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp99" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ScrollHorz" "0" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ScrollVert" "494" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ScrollVert" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth0" "200" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth1" "100" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth2" "100" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth3" "100" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp0" "1" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp1" "1" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp0" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp1" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp10" "1" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp11" "1" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp12" "0" 
Index: branch/Guer/sp4b1/Yoann_Guer_projet1/Yoann_Guer_projet1.c
===================================================================
--- branch/Guer/sp4b1/Yoann_Guer_projet1/Yoann_Guer_projet1.c	(revision 484)
+++ branch/Guer/sp4b1/Yoann_Guer_projet1/Yoann_Guer_projet1.c	(revision 485)
@@ -8,149 +8,205 @@
 /*  This file is generated by Renesas Project Generator (Ver.4.18).    */
 /*  NOTE:THIS IS A TYPICAL EXAMPLE.                                    */
 /***********************************************************************/
-#include "sfr32c87.h"
-void init_keyboard(void);
-void tpo_50ms(void);
-unsigned char touche = 0;
-int cpt=1;
-	
-void main(void)
-{   
-	init_keyboard() ;   
+	#include "sfr32c87.h"
 
+#define LDC_DC p3_0
+#define LDC_E p3_2
 	
-	while(1)
-	{     
-		
-	if(cpt==1)
-	{
-		p10=0xFE;
-	}
-	if(cpt==2)
-	{
-		p10=0xFD;
-	}
-	if(cpt==3)
-	{
-		p10=0xFB;
-	}
-	if(cpt==4)
-	{
-		p10=0xF7;
-		cpt=0;
-	}
-	cpt++;
+void init_port3(void);
+void init_port10(void);
+void LCD_4bits(char c);
+void LCD_8bits(char c);
+void LCD_commande(char c);
+void LCD_affichage(char c);
+void LCD_init(char c);
+void tempo(int duree_us);
 	
-	switch(p10)
-	{
-		case 0xbE:
-		{
-			touche=1;
-		}
-		break;
+void main(void)
+{    
+	init_port3();
+	init_port10();
+	LCD_init();
 		
-		case 0xde:
+	while(1)
+	{	
+		static int cpt=1;
+		char touche, memotouche;
+			
+			
+		if(cpt==1)
 		{
-			touche=2;
+			p10=0xFE;
 		}
-		break;
-		
-		case 0x7E:
+		if(cpt==2)
 		{
-			touche=3;
+			p10=0xFD;
 		}
-		break;
-		
-		case 0xbd:
+		if(cpt==3)
 		{
-			touche=4;
+			p10=0xFB;
 		}
-		break;
-		
-		case 0xdd:
+		if(cpt==4)
 		{
-			touche=5;
+			p10=0xF7;
+			cpt=0;
 		}
-		break;
-		
-		case 0x7d:
+		cpt++;
+
+
+		switch(p10)
 		{
-			touche=6;
+			case 0xbE:
+			{
+				touche='1';
+			}
+			break;
+	
+			case 0xde:
+			{
+				touche='2';
+			}
+			break;
+	
+			case 0x7E:
+			{
+				touche='3';
+			}
+			break;
+	
+			case 0xbd:
+			{
+				touche='4';
+			}
+			break;
+	
+			case 0xdd:
+			{
+				touche='5';
+			}
+			break;
+	
+			case 0x7d:
+			{
+				touche='6';
+			}
+			break;
+	
+			case 0xEb:
+			{
+				touche='7';
+			}
+			break;
+	
+			case 0xdb:
+			{
+				touche='8';
+			}
+			break;
+	
+			case 0x7b:
+			{
+				touche='9';
+			}
+			break;
+	
+			case 0xe7:
+			{
+				touche='*';
+			}
+			break;
+	
+			case 0xd7:
+			{
+				touche='0';
+			}
+			break;
+	
+			case 0x77:
+			{
+				touche='#';
+			}
+			break;
 		}
-		break;
-		
-		case 0xEb:
-		{
-			touche=7;
-		}
-		break;
-		
-		case 0xdb:
-		{
-			touche=8;
-		}
-		break;
-		
-		case 0x7b:
-		{
-			touche=9;
-		}
-		break;
-		
-		case 0xe7:
-		{
-			touche=10;
-		}
-		break;
-		
-		case 0xd7:
-		{
-			touche=11;
-		}
-		break;
-		
-		case 0x77:
-		{
-			touche=12;
-		}
-		break;
-	}	
-		
-	/*	if(p10==0xdd)
-		{
-				touche = 5;
-				tpo_50ms();
-		}
 			
-		if(p10==0x7e)
+		if(touche != memotouche)
 		{
-				touche = 3;
-				tpo_50ms();
+			LCD_commande(0x01);	
+			tempo(5000);
+			LCD_affichage(touche);
 		}
 		
-		
-		 
-		if ( (p10 & 0xf0)!= 0xf0 )
-		{
-			touche = p10;
-			tpo_50ms();
-		 }*/
+		memotouche=touche;
+					
+		}     
 	}
+	
+void init_port3()
+{
+	pd3=0xFF;
+	p3=0;
+	pu06=0; pu07=0;
 }
-
-void init_keyboard(void)
+	
+void init_port10()
 {    
-	pd10 = 0x0F;p10=0;pu31 = 1;pu30=1;
+	pd10 = 0x0F;
+	p10=0;
+	pu31 = 1;
+	pu30=1;
 }
-
-void tpo_50ms(void)
+	
+void LCD_4bits(char c)
+{	
+	LDC_E=1; //correspond à E
+	p3=((p3 & 0x0F) | ( c & 0xF0));
+	LDC_E=0; //enregistre les données sur un front descendant de E
+}
+	
+void LCD_8bits(char c)
 {
+	LCD_4bits(c);
+	LCD_4bits(c<<4);
+}
+	
+void LCD_commande(char c)
+{
+	LDC_DC=0;	//à 0 correspond à une commande
+	LCD_8bits(c);
+}
+	
+void LCD_affichage(char c)
+{
+	LDC_DC=1; //à 1 on transmet une data
+	LCD_8bits(c);
+}
+	
+void LCD_init(char c)
+{
+	LDC_DC=0;
+	tempo(15000);
+	LCD_4bits(0x30);
+	tempo(5000);
+	LCD_4bits(0x30);
+	tempo(100000);
+	LCD_4bits(0x30);
+	tempo(100000);
+	LCD_4bits(0x20);
+	LCD_commande(0x28);
+	LCD_commande(0x06);
+	LCD_commande(0x0E);
+	LCD_commande(0x01);
+	tempo(5000);
+}
+	
+void tempo(int duree_us)
+{
 	tcspr = 0x8A;
 	ta0mr = 0x82;
-	ta0 = 50000;
+	ta0 = duree_us;
 	ta0s = 1;
 	ta0os = 1;  
 	ta0ic = 0x00;
 	while(ir_ta0ic != 1);          
 	ta0s = 0;                      
-	}
\ No newline at end of file
+}
\ No newline at end of file
Index: branch/Guer/sp4a12/main.c
===================================================================
--- branch/Guer/sp4a12/main.c	(revision 484)
+++ branch/Guer/sp4a12/main.c	(revision 485)
@@ -129,7 +129,7 @@
 
 int calcul_vitesse(int *platitude,int *plongitude)
 {
-    float vitesse,distance;
+    long vitesse,distance;
 
     if((tab_memoirelatlong[0]!=*platitude) || (tab_memoirelatlong[1]!=*plongitude))
     {
