Index: branch/best/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.ini
===================================================================
--- branch/best/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.ini	(revision 501)
+++ branch/best/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.ini	(revision 502)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=fe0004
+RESET=fe0000
Index: branch/best/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/best/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf	(revision 501)
+++ branch/best/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf	(revision 502)
@@ -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" "0000000000000001" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "00000000000000FB" 
 "{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" 
@@ -53,12 +53,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" "0000000000000400" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE02F2" 
+"{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_18" "00000000000006F6" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000A00" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000088" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000089" 
 "{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,9 +75,9 @@
 "{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_4" "0000000000FE0000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000020000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000000006F8" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000400" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000000000000" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "0000000000000000" 
@@ -108,9 +108,9 @@
 "{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, 2, 0, P, Col, Hex, MN" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "t, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "t, 2, 0, P, Col, Hex, MN" 
 "{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" 
Index: branch/best/sp4b1/SP4b1/SP4b1.c
===================================================================
--- branch/best/sp4b1/SP4b1/SP4b1.c	(revision 501)
+++ branch/best/sp4b1/SP4b1/SP4b1.c	(revision 502)
@@ -13,12 +13,12 @@
 void init_keyboard(void);
 void tpo_50ms(void);
 
-unsigned char touche = 0;
-char t;
 
+
 void main(void){
-
-pd10 = 0x0F;
+	char t;
+	unsigned char touche = 0;
+	pd10 = 0x0F;
 	pu31 = 1;
 	p10 = 0;
 	while(1)
@@ -101,6 +101,7 @@
 	}
 }
 
+
 void init_keyboard(void){
 	pd10 = 0x0F;p10=0;pu31 = 1;
 }
Index: branch/best/sp4b2/SPAb2/SPAb2/SessionM32C_E8a_SYSTEM.ini
===================================================================
--- branch/best/sp4b2/SPAb2/SPAb2/SessionM32C_E8a_SYSTEM.ini	(revision 501)
+++ branch/best/sp4b2/SPAb2/SPAb2/SessionM32C_E8a_SYSTEM.ini	(revision 502)
@@ -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=fe0012
+RESET=fe004a
Index: branch/best/sp4b2/SPAb2/SPAb2/SPAb2.c
===================================================================
--- branch/best/sp4b2/SPAb2/SPAb2/SPAb2.c	(revision 501)
+++ branch/best/sp4b2/SPAb2/SPAb2/SPAb2.c	(revision 502)
@@ -11,7 +11,7 @@
 
 #include "sfr32c87.h"
 
-#define LCD_RS  p3_0
+#define LCD_RS  p3_0 //** ##
 #define LCD_RW  p3_1
 #define LCD_E   p3_2
 #define LCD_DB4 p3_4
@@ -28,19 +28,145 @@
 void lcd_init(void); // initialisation de l'afficheur
 void lcd_str(unsigned char *str); // envoi d'une chaîne de caractère
 void lcd_car(unsigned char car);// envoi d'une donnée à afficher
+void clav_init(void); //initialisation du clavier
 
 
 void main(void)
 {
-	pd3 = 0xFF; //initialisation des ports en sorties
+	char t;
+	char touche = 0;
 	lcd_init();
-	lcd_str("Monsieur Laffont");
+	clav_init();
+	while(1)
+	{
+		t = p10;  //**
+		if(t  !=0xf0)
+		{
+			p10 = 0xfe;
+			t = p10;
+			if (t==0xbe)
+			{
+				lcd_com(0x01,0); //Clear LCD  //**********
+				tpo_ms(50);  //**
+				touche = '1';  //**
+				lcd_str("50 Km/h");
+			}
+			if (t==0xde)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);  //******
+				touche = '2';
+				lcd_str("70 Km/h");
+			}
+			if (t==0x7e)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '3';
+				lcd_str("90 Km/h");
+			}
+			p10 = 0xfd;
+			t = p10;
+			if (t==0xbd)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '4';
+				lcd_str("110 Km/h");
+			}
+			if (t==0xdd)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '5';
+				lcd_str("130 Km/h");
+			}
+			if (t==0x7d)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '6';
+				lcd_str("...");
+			}
+			p10 = 0xfb;
+			t = p10;
+			if (t==0x7b)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '9';
+				lcd_str("...");
+			}
+			if (t==0xdb)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '8';
+				lcd_str("...");
+			}
+			if (t==0xeb)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '7';
+				lcd_str("Ajout Zone");
+			}
+			p10 = 0xf7;
+			t = p10;
+			if (t==0xd7)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '0';
+				lcd_str("Arret Alarme");
+			}
+			if (t==0x77)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '#';
+				lcd_str("#");
+			}
+			if (t==0xe7)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '*';
+				lcd_str("*");
+			}
+			p10 = 0xf;
+			t = p10;
+			if (t==0xbe)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '1';
+				lcd_str("50 Km/h");
+			}
+			if (t==0xde)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '2';
+				lcd_str("70 Km/h");
+			}
+			if (t==0x7e)
+			{
+				lcd_com(0x01,0); //Clear LCD
+				tpo_ms(50);
+				touche = '3';
+				lcd_str("90 Km/h");
+			}
+		}
+
+	}
+	
 }
 
 void lcd_4b(unsigned char car){
     LCD_E = 1;
 
-    if (car & 16){ 
+    if (car & 16){ //***
         LCD_DB4 = 1;
     }
     else{
@@ -91,6 +217,7 @@
 }
 
 void lcd_init(void){
+	pd3 = 0xFF; //initialisation des ports en sorties
 	tpo_ms(15);
     lcd_4b(0x30,0);
     tpo_ms(5);
@@ -98,8 +225,8 @@
     tpo_us(100);
     lcd_4b(0x30,0);
     tpo_us(100);
-    lcd_4b(0x20,0); //mode 4 bits activé
-    lcd_com(0x28,0); //mode 4bits - 2 lignes
+    lcd_4b(0x20,0); //mode 4 bits activé 
+    lcd_com(0x28,0); //mode 4bits - 2 lignes 0x20 4 bits | 0x08 2 lignes
     lcd_com(0x06,0); //Incremente vers la gauche
     lcd_com(0x0E,0); //LCD à on, curseur à on
     lcd_com(0x01,0); //Clear LCD
@@ -106,6 +233,9 @@
     tpo_ms(5);
 }
 
+
+/*void _tp_prolog(){
+}*/
 void tpo_us(unsigned short duree){
 	tcspr = 0x8A;
 	ta0mr = 0x82;
@@ -134,3 +264,9 @@
         i ++;
     }
 }
+
+void clav_init(void){
+	pd10 = 0x0F;
+	pu31 = 1;
+	p10 = 0;
+}
Index: branch/best/sp4b2/SPAb2/SPAb2/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/best/sp4b2/SPAb2/SPAb2/SessionM32C_E8a_SYSTEM.hsf	(revision 501)
+++ branch/best/sp4b2/SPAb2/SPAb2/SessionM32C_E8a_SYSTEM.hsf	(revision 502)
@@ -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" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000000001" 
 "{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" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE0012" 
-"{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_15" "0000000000000400" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE0494" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFFD00" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000006F6" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000A00" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000" 
-"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "0000000000000089" 
 "{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" "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" "0000000000000000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000FE004A" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000020000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "00000000000006F8" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000000400" 
 "{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" 
@@ -701,13 +701,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" "395" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ScrollVert" "424" 
 "{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" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp11" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp12" "0" 
@@ -748,8 +748,8 @@
 [WINDOW_POSITION_STATE_DATA_VD1]
 "Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_00000001_IO}SPAb2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 2 "0.42" 305 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 1 "0.22" 305 683 371 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
-"{WK_00000001_WATCH}SPAb2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 0 "0.36" 305 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811|32831" "0.0" 
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 1 "0.43" 305 683 371 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
+"{WK_00000001_WATCH}SPAb2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 0 "0.15" 305 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811|32831" "0.0" 
 "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 180 683 371 350 200 18 0 "" "0.0" 
 "{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
 "{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
