Index: branch/leng/sp4c12/sp4c1/sp4c1/uart0.h
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/uart0.h	(revision 855)
+++ branch/leng/sp4c12/sp4c1/sp4c1/uart0.h	(revision 856)
@@ -11,4 +11,6 @@
 void uart0_init(void);
 char uart0_txchar(char c) ;
 
-void uart0_tx(char c);
\ No newline at end of file
+void uart0_tx(char c);
+
+char uart0_rx(char c);
\ No newline at end of file
Index: branch/leng/sp4c12/sp4c1/sp4c1/rectrame.c
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/rectrame.c	(nonexistent)
+++ branch/leng/sp4c12/sp4c1/sp4c1/rectrame.c	(revision 856)
@@ -0,0 +1,50 @@
+/***********************************************************************/
+/*                                                                     */
+/*  FILE        :sp4c1.c                                               */
+/*  DATE        :Wed, Jun 02, 2021                                     */
+/*  DESCRIPTION :main program file.                                    */
+/*  CPU GROUP   :87B                                                   */
+/*                                                                     */
+/*  This file is generated by Renesas Project Generator (Ver.4.18).    */
+/*  NOTE:THIS IS A TYPICAL EXAMPLE.                                    */
+/***********************************************************************/
+//importation bibliotheque
+#include "sfr32c87.h"
+#include "uart0.h"
+char c1,c2;
+int trame_ok=0;
+int i=0,f=0;
+int checksum=0;
+typedef struct {
+char* trames[80];} tabtrames;
+tabtrames TabTrames;
+
+void rectrame(char c)
+{
+	f=0;
+	while(uart0_rx(c)!='$'){
+		i=0;
+		//tant que la trame n'est pas terminée on la recopie dans le buffer tabtrames
+		while(uart0_rx(c)!='*')
+		{
+			TabTrames.trames[f][i]=uart0_rx(c);
+			i++;
+		}
+		f++;
+		c1=uart0_rx(c);
+		c2=uart0_txchar(c);
+		if((checksum+c2) ==(checksum+c1)){
+			trame_ok=1;
+			//checksum recoit le resultat du ou eclusif avec c2
+			checksum=checksum+c2;
+			if (checksum>=10){
+			checksum=checksum-10;
+			}
+		}
+	}	
+}
+
+int hex2int (char * c){
+int a=*c;
+return a;
+}
\ No newline at end of file
Index: branch/leng/sp4c12/sp4c1/sp4c1/Debug/ncrt0.r30
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: branch/leng/sp4c12/sp4c1/sp4c1/SessionM32C_E8a_SYSTEM.ini
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/SessionM32C_E8a_SYSTEM.ini	(revision 855)
+++ branch/leng/sp4c12/sp4c1/sp4c1/SessionM32C_E8a_SYSTEM.ini	(revision 856)
@@ -25,4 +25,4 @@
 [Target]
 M32C E8a SYSTEM=Renesas Communications
 [USER_DATA]
-RESET=fe0000
+RESET=fe0008
Index: branch/leng/sp4c12/sp4c1/sp4c1/sp4c1.hwp
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/sp4c1.hwp	(revision 855)
+++ branch/leng/sp4c12/sp4c1/sp4c1/sp4c1.hwp	(revision 856)
@@ -106,6 +106,7 @@
 "Relocatable file" "Renesas M32C Linker" "Renesas M32C C Compiler" 
 [PROJECT_FILES]
 "D:\leng\sp4c12\sp4c1\sp4c1\ncrt0.a30" "User" "Assembly source file" 2 
+"D:\leng\sp4c12\sp4c1\sp4c1\rectrame.c" "User" "C source file" 2 
 "D:\leng\sp4c12\sp4c1\sp4c1\sp4c1.c" "User" "C source file" 2 
 "D:\leng\sp4c12\sp4c1\sp4c1\uart0.c" "User" "C source file" 2 
 [FOLDER]
@@ -127,16 +128,17 @@
 "D:\leng\sp4c12\sp4c1\sp4c1\ncrt0.a30" "01022a5d8b757d10" 2 
 [OPTIONS_Debug_Renesas M32C C Compiler]
 "C source file" "01022a5d8b757d10" 1 
+"D:\leng\sp4c12\sp4c1\sp4c1\rectrame.c" "0a5863b12cb57d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\sp4c1.c" "01022a5d8b757d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\uart0.c" "02447834eb757d10" 1 
 [OPTIONS_Debug_Renesas M32C Configurator]
-"Single Shot" "02447834eb757d10" 6 
+"Single Shot" "0a5863b12cb57d10" 6 
 [OPTIONS_Debug_Renesas M32C Librarian]
-"Single Shot" "02447834eb757d10" 5 
+"Single Shot" "0a5863b12cb57d10" 5 
 [OPTIONS_Debug_Renesas M32C Linker]
-"Single Shot" "02447834eb757d10" 3 
+"Single Shot" "0a5863b12cb57d10" 3 
 [OPTIONS_Debug_Renesas M32C Stype Converter]
-"Single Shot" "02447834eb757d10" 4 
+"Single Shot" "0a5863b12cb57d10" 4 
 [OPTIONS_Debug]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
@@ -154,16 +156,17 @@
 "D:\leng\sp4c12\sp4c1\sp4c1\ncrt0.a30" "01022a5d8b757d10" 2 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C C Compiler]
 "C source file" "01022a5d8b757d10" 1 
+"D:\leng\sp4c12\sp4c1\sp4c1\rectrame.c" "0a5863b12cb57d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\sp4c1.c" "01022a5d8b757d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\uart0.c" "02447834eb757d10" 1 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Configurator]
-"Single Shot" "02447834eb757d10" 6 
+"Single Shot" "0a5863b12cb57d10" 6 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Librarian]
-"Single Shot" "02447834eb757d10" 5 
+"Single Shot" "0a5863b12cb57d10" 5 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Linker]
-"Single Shot" "02447834eb757d10" 3 
+"Single Shot" "0a5863b12cb57d10" 3 
 [OPTIONS_Debug_M32C_E8a_SYSTEM_Renesas M32C Stype Converter]
-"Single Shot" "02447834eb757d10" 4 
+"Single Shot" "0a5863b12cb57d10" 4 
 [OPTIONS_Debug_M32C_E8a_SYSTEM]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
@@ -181,16 +184,17 @@
 "D:\leng\sp4c12\sp4c1\sp4c1\ncrt0.a30" "01022a5d8b757d10" 2 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C C Compiler]
 "C source file" "01022a5d8b757d10" 1 
+"D:\leng\sp4c12\sp4c1\sp4c1\rectrame.c" "0a5863b12cb57d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\sp4c1.c" "01022a5d8b757d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\uart0.c" "02447834eb757d10" 1 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Configurator]
-"Single Shot" "02447834eb757d10" 6 
+"Single Shot" "0a5863b12cb57d10" 6 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Librarian]
-"Single Shot" "02447834eb757d10" 5 
+"Single Shot" "0a5863b12cb57d10" 5 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Linker]
-"Single Shot" "02447834eb757d10" 3 
+"Single Shot" "0a5863b12cb57d10" 3 
 [OPTIONS_Debug_M32C_Simulator_Renesas M32C Stype Converter]
-"Single Shot" "02447834eb757d10" 4 
+"Single Shot" "0a5863b12cb57d10" 4 
 [OPTIONS_Debug_M32C_Simulator]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
@@ -208,16 +212,17 @@
 "D:\leng\sp4c12\sp4c1\sp4c1\ncrt0.a30" "01022a5d8b757d10" 2 
 [OPTIONS_Release_Renesas M32C C Compiler]
 "C source file" "01022a5d8b757d10" 1 
+"D:\leng\sp4c12\sp4c1\sp4c1\rectrame.c" "0a5863b12cb57d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\sp4c1.c" "01022a5d8b757d10" 1 
 "D:\leng\sp4c12\sp4c1\sp4c1\uart0.c" "02447834eb757d10" 1 
 [OPTIONS_Release_Renesas M32C Configurator]
-"Single Shot" "02447834eb757d10" 6 
+"Single Shot" "0a5863b12cb57d10" 6 
 [OPTIONS_Release_Renesas M32C Librarian]
-"Single Shot" "02447834eb757d10" 5 
+"Single Shot" "0a5863b12cb57d10" 5 
 [OPTIONS_Release_Renesas M32C Linker]
-"Single Shot" "02447834eb757d10" 3 
+"Single Shot" "0a5863b12cb57d10" 3 
 [OPTIONS_Release_Renesas M32C Stype Converter]
-"Single Shot" "02447834eb757d10" 4 
+"Single Shot" "0a5863b12cb57d10" 4 
 [OPTIONS_Release]
 "" 0 
 "[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON3] " 6 
Index: branch/leng/sp4c12/sp4c1/sp4c1/rectrame.h
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/rectrame.h	(nonexistent)
+++ branch/leng/sp4c12/sp4c1/sp4c1/rectrame.h	(revision 856)
@@ -0,0 +1,15 @@
+/***********************************************************************/
+/*                                                                     */
+/*  FILE        :sp4c1.c                                               */
+/*  DATE        :Wed, Jun 02, 2021                                     */
+/*  DESCRIPTION :main program file.                                    */
+/*  CPU GROUP   :87B                                                   */
+/*                                                                     */
+/*  This file is generated by Renesas Project Generator (Ver.4.18).    */
+/*  NOTE:THIS IS A TYPICAL EXAMPLE.                                    */
+/***********************************************************************/
+void irectrame(int* a);
+
+void rectrame(char c);
+
+int hex2int (char * c);
\ No newline at end of file
Index: branch/leng/sp4c12/sp4c1/sp4c1/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/SessionM32C_E8a_SYSTEM.hsf	(revision 855)
+++ branch/leng/sp4c12/sp4c1/sp4c1/SessionM32C_E8a_SYSTEM.hsf	(revision 856)
@@ -8,7 +8,7 @@
 "" 
 [GENERAL_DATA]
 "FIRST_CONNECTION_TAG" "NO" 
-"MRULABELS_DATAMANAGER_KEY" "FE030E|FE02E6|0|FE0000" 
+"MRULABELS_DATAMANAGER_KEY" "181|FE030E|FE02E6|0|FE0000" 
 "RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_TRUE_STORE_TAG" 
 "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" "" 
 "{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlViews" "0" 
@@ -23,7 +23,9 @@
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBrowseDirectory" "" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlLogFileName" "" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlSplitterPosition" "242" 
-"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlViews" "0" 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlViews" "1" 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "17" 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineWndInstanceKey0" "{WK_00000001_CmdLine}" 
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" "" 
 "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_END_ADDRESS" "" 
 "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_START_ADDRESS" "" 
@@ -54,7 +56,7 @@
 "{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" "0000000000FE0000" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE0008" 
 "{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" 
@@ -111,11 +113,13 @@
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "u0tb, 10, 0, P, Col, Hex, N" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "c, 10, 0, P, Col, Hex, N" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "c, 2, 0, P, Col, Hex, MN" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "i, 10, 0, P, Col, Hex, N" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "i, 1, 0, P, Col, Hex, MN" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002_SCOPE" "Current Scope," 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "3" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "u0tb, 10, 0, P, Col, Hex, N" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003_SCOPE" "Current Scope," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "4" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "150" 
@@ -686,18 +690,27 @@
 "{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" "32" 
+"{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" "0" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp1" "1" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp2" "0" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp3" "1" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp4" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp0" "1" 
+"{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" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp13" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp2" "1" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp3" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp4" "1" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp5" "1" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp6" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp7" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp8" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp9" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ScrollHorz" "0" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ScrollVert" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ScrollVert" "1" 
 [LANGUAGE]
 "English" 
 [CONFIG_INFO_VD1]
@@ -710,7 +723,8 @@
 0 
 [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}sp4c1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 2 "0.38" 180 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
+"{WK_00000001_CmdLine}" "WINDOW" 59422 0 2 "0.01" 180 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
+"{WK_00000001_IO}sp4c1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 3 "0.38" 180 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
 "{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "0.43" 180 569 307 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
 "{WK_00000001_REGISTERS}sp4c1SessionM32C_E8a_SYSTEM" "WINDOW" 59421 0 0 "1.00" 180 2048 0 350 200 2065 0 "" "0.0" 
 "{WK_00000001_WATCH}sp4c1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 1 "0.19" 180 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811|32831" "0.0" 
@@ -737,10 +751,12 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"D:\leng\sp4c12\sp4c1\sp4c1\sp4c1.c" 
 "D:\leng\sp4c12\sp4c1\sp4c1\uart0.c" 
 "D:\leng\sp4c12\sp4c1\sp4c1\ncrt0.a30" 
-"D:\leng\sp4c12\sp4c1\sp4c1\sp4c1.c" 
 "D:\leng\sp4c12\sp4c1\sp4c1\uart0.h" 
+"D:\leng\sp4c12\sp4c1\sp4c1\rectrame.c" 
+"D:\leng\sp4c12\sp4c1\sp4c1\rectrame.h" 
 "D:\leng\sp4c12\sp4c1\sp4c1\sfr32c87.h" 
 "D:\leng\sp4c12\sp4c1\sp4c1\sect308.inc" 
 [TARGET_NAME]
Index: branch/leng/sp4c12/sp4c1/sp4c1/sp4c1.c
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/sp4c1.c	(revision 855)
+++ branch/leng/sp4c12/sp4c1/sp4c1/sp4c1.c	(revision 856)
@@ -11,18 +11,33 @@
 //importation bibliotheque
 #include "sfr32c87.h"
 #include "uart0.h"
+#include "rectrame.h"
+
 void main(void)
 {
 	char c;
-	char i='a';
+	char c1,c2;
+	char i='A';
 	int k=0;
+	uart0_init();
 	while(1){
-	uart0_init();
-	c=uart0_txchar('a');
-	c=uart0_txchar(i);
+	//uart0_tx('a');
+	uart0_tx(i);
+	/*//affichage alphabet
 	for(k=0;k<=26;k++)
 		{
+		uart0_init();
 		c=uart0_txchar(i+k);
+		//uart0_rx();
 		}
+	*/
+
+	rectrame('$test');
+	rectrame('$test');
+	
+	
 	}
-}
+	
+	
+	
+}
Index: branch/leng/sp4c12/sp4c1/sp4c1/uart0.c
===================================================================
--- branch/leng/sp4c12/sp4c1/sp4c1/uart0.c	(revision 855)
+++ branch/leng/sp4c12/sp4c1/sp4c1/uart0.c	(revision 856)
@@ -31,15 +31,18 @@
 	ps0_3 = 1;
 	
 	//p240 datasheet mode Uart 8bits
-	u0brg=0;
+	u0brg=00000010;
 	smd0_u0mr =1;
 	smd1_u0mr = 0;
 	smd2_u0mr = 1;
-	//u0c0=0;
-	//u0c1=0x11;
-	u0brg=00000001;
+	//regle baud 4800
+	u0c0=0x00;
+	u0c1=0x11;
+	u0brg=00011101;//cf p246
+	//u0brg=00111101;
 	u0tb=0;
 }
+
 char uart0_txchar(char c)
 {
 	//transmission de c
@@ -46,9 +49,22 @@
 	u0tb=c;
 	return u0tb;
 }
+
 void uart0_tx(char c)
 {
+	
 	//transmission de c
 	u0tb=c;
 }
 //reception u0rb p248
+
+
+char c;
+char uart0_rx(char c)
+{
+while(!ri_u0c1);//tant qu'on ne recoit pas le complete flag cf 1444sfr32
+c=u0rb;
+return c;
+}
+
+	
