Index: branch/beaufour/sp4c12/SP4c12/SessionM32C_Simulator.hsf
===================================================================
--- branch/beaufour/sp4c12/SP4c12/SessionM32C_Simulator.hsf	(revision 803)
+++ branch/beaufour/sp4c12/SP4c12/SessionM32C_Simulator.hsf	(revision 804)
@@ -8,10 +8,23 @@
 "" 
 [GENERAL_DATA]
 "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" 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBatchFileName" "" 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointFlag" "-1 " 
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlBreakpointStatus" "-1 " 
+"{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}TclTkCtrlLogFileName" "" 
+"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" "" 
+"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" "" 
+"{7943C44E-7D44-422A-9140-4CF55C88F7D3}DifferenceCtrlViews" "0" 
 [LANGUAGE]
 "English" 
 [CONFIG_INFO_VD1]
-0 
+1 
 [CONFIG_INFO_VD2]
 0 
 [CONFIG_INFO_VD3]
@@ -19,10 +32,28 @@
 [CONFIG_INFO_VD4]
 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_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 341 683 371 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "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" 
+"{WK_TB00000003_BOOKMARKS}" "TOOLBAR 0" 59419 1 1 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000004_TEMPLATES}" "TOOLBAR 0" 59419 1 0 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000005_SEARCH}" "TOOLBAR 0" 59419 0 1 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
+"{WK_TB00000007_DEBUG}" "TOOLBAR 0" 59419 2 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
+"{WK_TB00000008_DEBUGRUN}" "TOOLBAR 0" 59419 2 1 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
+"{WK_TB00000009_VERSIONCONTROL}" "TOOLBAR 0" 59419 1 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000012_MAP}" "TOOLBAR 0" 59419 1 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000018_DEFAULTWINDOW}" "TOOLBAR 0" 59419 1 2 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000026_MACRO}" "TOOLBAR 0" 59419 1 6 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000028_RTOSDEBUG}" "TOOLBAR 0" 59419 2 2 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000029_SYSTEMTOOL}" "TOOLBAR 0" 59419 2 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 [WINDOW_POSITION_STATE_DATA_VD2]
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"D:\TP SP4 BEAUFOUR\sp4c12\SP4c12\SP4c12.c" 
+"D:\TP SP4 BEAUFOUR\sp4c12\SP4c12\ncrt0.a30" 
 [TARGET_NAME]
 "M32C Simulator" "" 0 
 [STATUSBAR_STATEINFO_VD1]
Index: branch/beaufour/sp4c12/SP4c12/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/beaufour/sp4c12/SP4c12/SessionM32C_E8a_SYSTEM.hsf	(revision 803)
+++ branch/beaufour/sp4c12/SP4c12/SessionM32C_E8a_SYSTEM.hsf	(revision 804)
@@ -102,8 +102,37 @@
 "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_SAMPLEING_RATE" "1000" 
 "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_VIEW" "0,0,0,0,0,0" 
 "{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ImageCtrlViews" "0" 
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "0" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "4" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth0" "120" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth1" "298" 
+"{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" "valeur, 2, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Global," 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "trame, 6, 0, P, Col, Hex, MA" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Global," 
+"{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" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth2" "120" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth3" "200" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ECX_WATCH_ITEMCnt" "0" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth0" "120" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth1" "150" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth12" "150" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth2" "120" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth3" "200" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ECX_WATCH_ITEMCnt" "0" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth0" "120" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth1" "150" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth12" "150" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth2" "120" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth3" "200" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ECX_WATCH_ITEMCnt" "0" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndInitial_Radix" "0" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndInstanceKey0" "{WK_00000001_WATCH}SP4c12SessionM32C_E8a_SYSTEM" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchRecord" "" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchSave" "" 
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndUpdate_Interval" "100" 
@@ -568,7 +597,7 @@
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp491" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp492" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp493" "1" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp494" "1" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp494" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp495" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp496" "0" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0Exp497" "0" 
@@ -668,7 +697,7 @@
 "{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" "491" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ScrollVert" "494" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth0" "200" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth1" "100" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1ColWidth2" "100" 
@@ -687,8 +716,9 @@
 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}SP4c12SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 1 "0.49" 180 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "0.51" 180 683 371 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
+"{WK_00000001_IO}SP4c12SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 2 "0.29" 180 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 1 "0.42" 180 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}SP4c12SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 0 "0.29" 180 -1600 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" 
@@ -712,8 +742,11 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"D:\TP SP4 BEAUFOUR\sp4c12\SP4c12\SP4c12.c" 
 "D:\TP SP4 BEAUFOUR\sp4c12\SP4c12\ncrt0.a30" 
-"D:\TP SP4 BEAUFOUR\sp4c12\SP4c12\SP4c12.c" 
+"D:\TP SP4 BEAUFOUR\sp4b2\SP4b2\sfr32c87.h" 
+"D:\TP SP4 BEAUFOUR\sp4b2\SP4b2\SP4b2.c" 
+"D:\TP SP4 BEAUFOUR\sp4b1\SP4b1\SP4b1.c" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -760,5 +793,4 @@
 [FLASH_DETAILS]
 "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" 
 [BREAKPOINTS]
-"d:\tp sp4 beaufour\sp4c12\sp4c12\sp4c12.c" 25 16646910 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/beaufour/sp4c12/SP4c12/SP4c12.c
===================================================================
--- branch/beaufour/sp4c12/SP4c12/SP4c12.c	(revision 803)
+++ branch/beaufour/sp4c12/SP4c12/SP4c12.c	(revision 804)
@@ -12,6 +12,8 @@
 
 #define plcd p3;
 
+//Fonction initialisation//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
 void init_portserie(void)
 {
 	u0mr = 0b00000101; // 4800 bauds, 8 bits de données, 1 bit de stop, pas de parité
@@ -21,22 +23,77 @@
 	u0smr = 0;
 	u0c0 = 0b00010000; //configuration F = 20 Mhz
 	u0brg = 0xFF; //configuration de m = 255
-	u0c1 = 0b00010001;
-	pd6 = pd6 || 0b00001000; //faux mais il faut changer juste les bits de poid faible
-	ps0 = 10001000;
+	u0c1 = 0b00000101;
+	pd6_3 = 1;
+	pd6_2 = 0;
+	pd6_1 = 0;
+	pd6_0 = 0;
+	ps0_3 = 1;
+	ps0_2 = 0;
+	ps0_1 = 0;
+	ps0_0 = 0;
 }
 
+//Fonction transmission/reception//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
 void transmission (char c)
 {
-	while (ti_u0c1 = 1)
-	{u0tb = c;}
+	while (ti_u0c1 != 1);
+	u0tb = c;
 }
 
+char reception ()
+{
 
-void main(void)
+	while (ri_u0c1 != 1);
+	return(u0rb);
+}
+
+//Fonction lecture trame//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+int rectrame (char * buffer)
 {
+	int i=1;
+	do
+	{
+		*(buffer+i) = reception();
+		i++;
+	}while(*(buffer+i)!= '*');
+	return (i+1);
+}
+
+void creation_tab_trame (int col, int *lig,char tram[80],char tab_tram[10][80])
+{
+	int i;
+	for (i=0;i<=col;i++)
+	{
+		tab_tram[*lig][i]=tram[i];
+	}
+	*lig++;
+}
+
+char valeur;
+char trame[80];
+char tab_trame[10][80];
+void main(void)   	//reception de caractère 
+{
+	
+	int i,nb,ligne;
+		//initialisation des led en sortie
 	init_portserie();
+	nb=rectrame (trame);
+	creation_tab_trame(nb,&ligne,trame,tab_trame);
+	if (ligne==10){ligne=0;}
+}
+
+/*void main(void)   	//Transmission de caractère 
+{
+	int i;
+	init_portserie();
 	while (1)
-		transmission ('A');	
+	for (i=0;i<26;i++)
+	{
+		transmission ('A'+i);
+	}	
 }
-
+*/
\ No newline at end of file
