Index: branch/graffin/sp4c12/sp4C12/SessionM32C_E8a_SYSTEM.ini
===================================================================
--- branch/graffin/sp4c12/sp4C12/SessionM32C_E8a_SYSTEM.ini	(revision 798)
+++ branch/graffin/sp4c12/sp4C12/SessionM32C_E8a_SYSTEM.ini	(revision 799)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=fe0000
+RESET=fe000a
Index: branch/graffin/sp4c12/sp4C12/sp4C12.hwp
===================================================================
--- branch/graffin/sp4c12/sp4C12/sp4C12.hwp	(revision 798)
+++ branch/graffin/sp4c12/sp4C12/sp4C12.hwp	(revision 799)
@@ -105,10 +105,14 @@
 "Relocatable file" "Renesas M32C Linker" "Renesas M32C Assembler" 
 "Relocatable file" "Renesas M32C Linker" "Renesas M32C C Compiler" 
 [PROJECT_FILES]
+"D:\tp_sp4_graffin\sp4c12\sfr32c87.h" "User" "C header file" 2 
 "D:\tp_sp4_graffin\sp4c12\sp4C12\ncrt0.a30" "User" "Assembly source file" 2 
 "D:\tp_sp4_graffin\sp4c12\sp4C12\sp4C12.c" "User" "C source file" 2 
+"D:\tp_sp4_graffin\sp4c12\sp4C12\uart0.c" "User" "C source file" 2 
+"D:\tp_sp4_graffin\sp4c12\sp4C12\uart0.h" "User" "C header file" 2 
 [FOLDER]
 "Assembly source file" "Assembly source file" 
+"C header file" "C header file" 
 "C source file" "C source file" 
 [GENERAL_DATA_PROJECT]
 "USE_CUSTOM_LINKAGE_ORDER" "1" 
@@ -127,14 +131,15 @@
 [OPTIONS_Debug_Renesas M32C C Compiler]
 "C source file" "0489906ee8757d10" 1 
 "D:\tp_sp4_graffin\sp4c12\sp4C12\sp4C12.c" "0489906ee8757d10" 1 
+"D:\tp_sp4_graffin\sp4c12\sp4C12\uart0.c" "07a0488609757d10" 1 
 [OPTIONS_Debug_Renesas M32C Configurator]
-"Single Shot" "0489906ee8757d10" 6 
+"Single Shot" "07a0488609757d10" 6 
 [OPTIONS_Debug_Renesas M32C Librarian]
-"Single Shot" "0489906ee8757d10" 5 
+"Single Shot" "07a0488609757d10" 5 
 [OPTIONS_Debug_Renesas M32C Linker]
-"Single Shot" "0489906ee8757d10" 3 
+"Single Shot" "07a0488609757d10" 3 
 [OPTIONS_Debug_Renesas M32C Stype Converter]
-"Single Shot" "0489906ee8757d10" 4 
+"Single Shot" "07a0488609757d10" 4 
 [OPTIONS_Debug]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
@@ -153,14 +158,15 @@
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C C Compiler]
 "C source file" "0489906ee8757d10" 1 
 "D:\tp_sp4_graffin\sp4c12\sp4C12\sp4C12.c" "0489906ee8757d10" 1 
+"D:\tp_sp4_graffin\sp4c12\sp4C12\uart0.c" "07a0488609757d10" 1 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Configurator]
-"Single Shot" "0489906ee8757d10" 6 
+"Single Shot" "07a0488609757d10" 6 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Librarian]
-"Single Shot" "0489906ee8757d10" 5 
+"Single Shot" "07a0488609757d10" 5 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Linker]
-"Single Shot" "0489906ee8757d10" 3 
+"Single Shot" "07a0488609757d10" 3 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Stype Converter]
-"Single Shot" "0489906ee8757d10" 4 
+"Single Shot" "07a0488609757d10" 4 
 [OPTIONS_Debug_M32C_E8a_SYSTEM]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
@@ -179,14 +185,15 @@
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C C Compiler]
 "C source file" "0489906ee8757d10" 1 
 "D:\tp_sp4_graffin\sp4c12\sp4C12\sp4C12.c" "0489906ee8757d10" 1 
+"D:\tp_sp4_graffin\sp4c12\sp4C12\uart0.c" "07a0488609757d10" 1 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Configurator]
-"Single Shot" "0489906ee8757d10" 6 
+"Single Shot" "07a0488609757d10" 6 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Librarian]
-"Single Shot" "0489906ee8757d10" 5 
+"Single Shot" "07a0488609757d10" 5 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Linker]
-"Single Shot" "0489906ee8757d10" 3 
+"Single Shot" "07a0488609757d10" 3 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Stype Converter]
-"Single Shot" "0489906ee8757d10" 4 
+"Single Shot" "07a0488609757d10" 4 
 [OPTIONS_Debug_M32C_Simulator]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
@@ -205,14 +212,15 @@
 [OPTIONS_Release_Renesas M32C C Compiler]
 "C source file" "0489906ee8757d10" 1 
 "D:\tp_sp4_graffin\sp4c12\sp4C12\sp4C12.c" "0489906ee8757d10" 1 
+"D:\tp_sp4_graffin\sp4c12\sp4C12\uart0.c" "07a0488609757d10" 1 
 [OPTIONS_Release_Renesas M32C Configurator]
-"Single Shot" "0489906ee8757d10" 6 
+"Single Shot" "07a0488609757d10" 6 
 [OPTIONS_Release_Renesas M32C Librarian]
-"Single Shot" "0489906ee8757d10" 5 
+"Single Shot" "07a0488609757d10" 5 
 [OPTIONS_Release_Renesas M32C Linker]
-"Single Shot" "0489906ee8757d10" 3 
+"Single Shot" "07a0488609757d10" 3 
 [OPTIONS_Release_Renesas M32C Stype Converter]
-"Single Shot" "0489906ee8757d10" 4 
+"Single Shot" "07a0488609757d10" 4 
 [OPTIONS_Release]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
Index: branch/graffin/sp4c12/sp4C12/uart0.c
===================================================================
--- branch/graffin/sp4c12/sp4C12/uart0.c	(revision 798)
+++ branch/graffin/sp4c12/sp4C12/uart0.c	(revision 799)
@@ -12,12 +12,17 @@
 #include "sfr32c87.h" 
 #include "uart0.h"
 
-char c;
+char tram[80];
+char c,c1,c2,t1,t2,check=0,t3,t4;
+int i=0,debut=0,fin_tram=0,validation=0;
 
 void main(void)
 {
-int i=0;
+
 uart0_init();
+pd1_0=1;
+pd1_1=1;
+
 /*
 while (1)
 {
@@ -31,10 +36,8 @@
 */
 while (1)
 {
-	c=uart0_rx();
-	
+	fin_tram=rectram();
 }
-
 }
 
 void uart0_init(void)
@@ -68,6 +71,58 @@
 
 char uart0_rx(void)
 {
-	while (ri_u0c1!=0);
+	while (!ri_u0c1);
 	return u0rb;
-}
\ No newline at end of file
+}
+
+
+
+
+int decode_int(char ch)
+{
+    char res;
+    if (ch>=0x30 && ch<=0x39){
+		res=ch-48;
+	}
+	 if (ch>=0x41 && ch<=0x46){
+		res=ch-55;
+	}
+    return (res);
+}
+
+int rectram(char * Buffer){
+	fin_tram=0;
+	c=uart0_rx();
+	if (c=='\n' || c=='\r'){
+		return 1;
+		}
+	if (c=='*'){
+		/*p1_1=1;
+		while (i!=10000){i++;}
+		p1_1=0;*/
+		c1=uart0_rx();
+		c2=uart0_rx();
+		debut=0;
+		i=0;
+		t1=(check&0xf0)>>4;//decode_int(c1);decode_int(c1);
+		t2=check&0x0f;//decode_int(c2);decode_int(c2);
+		t3=decode_int(c1);
+		t4=decode_int(c2);
+		if (t1==t3 && t2==t4 ){
+			validation=1;}
+		}
+	if (debut==1){
+		i++;
+		tram[i]=c;
+		*(Buffer+i)=c;
+		check=check^c;
+	}
+	if (c=='$'){
+		/*p1_0=1;
+		while (i!=10000){i++;}
+		p1_0=0;*/
+		debut=1;
+		fin_tram=0;
+		tram[0]=c;
+		}
+	}
Index: branch/graffin/sp4c12/sp4C12.hws
===================================================================
--- branch/graffin/sp4c12/sp4C12.hws	(revision 798)
+++ branch/graffin/sp4c12/sp4C12.hws	(revision 799)
@@ -21,7 +21,12 @@
 [MAKEFILE_BUILD_INFO]
 "$(WORKSPDIR)\make\$(PROJECTNAME)_$(CONFIGNAME).mak" "" "$(WORKSPDIR)\make" 0 0 0 
 [VD_CONFIGURATION_OPTIONS]
+"ACTIVE_DESKTOP" "0" 
 [VD_CONFIGURATIONS]
+"0" "Default1" "1" 
+"1" "Default2" "1" 
+"2" "Default3" "1" 
+"3" "Default4" "1" 
 [OPTIONS_DEBUG_TAB]
 0 0 0 0 0 
 [VCS]
