Index: branch/leng/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.ini
===================================================================
--- branch/leng/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.ini	(revision 590)
+++ branch/leng/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.ini	(revision 591)
@@ -18,6 +18,8 @@
 PROCESSOR_MODE=0
 [COMMUNI]
 COMSPEED=8
+COMSPEED PROGRAM FLASH=8
+COMSPEED DATA FLASH=8
 [Driver Configuration]
 Renesas Communications=USB interface,0,
 [Target]
Index: branch/leng/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/leng/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf	(revision 590)
+++ branch/leng/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf	(revision 591)
@@ -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" "" 
@@ -46,7 +48,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" 
@@ -53,13 +55,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" "0000000000FE0000" 
-"{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" "0000000000FE02F0" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFFD00" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000006FC" 
+"{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" "0000000000000084" 
 "{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" 
@@ -76,10 +78,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_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_7" "0000000000000000" 
+"{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" 
@@ -109,7 +111,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_ITEMCnt" "0" 
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "a, 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" "ta0, 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" 
@@ -699,9 +705,10 @@
 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}SP4b2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 2 "0.17" 276 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 1 "0.46" 276 569 307 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
-"{WK_00000001_WATCH}SP4b2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 0 "0.37" 276 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811|32831" "0.0" 
+"{WK_00000001_CmdLine}" "WINDOW" 59422 0 2 "0.54" 276 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
+"{WK_00000001_IO}SP4b2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 3 "0.19" 276 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "0.65" 276 569 307 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" 
+"{WK_00000001_WATCH}SP4b2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 1 "0.16" 276 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 569 307 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" 
@@ -713,13 +720,13 @@
 "{WK_TB00000009_VERSIONCONTROL}" "TOOLBAR 0" 59419 1 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_TB00000011_CPU}" "TOOLBAR 0" 59419 2 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
 "{WK_TB00000012_MAP}" "TOOLBAR 0" 59419 1 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
-"{WK_TB00000013_SYMBOL}" "TOOLBAR 0" 59419 2 3 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
+"{WK_TB00000013_SYMBOL}" "TOOLBAR 0" 59419 2 4 "0.00" 0 0 0 0 0 18 0 "" "0.0" 
 "{WK_TB00000014_CODE}" "TOOLBAR 0" 59419 2 6 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_TB00000016_GRAPHIC}" "TOOLBAR 0" 59419 2 7 "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_TB00000023_RTOS}" "TOOLBAR 0" 59419 2 8 "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 4 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
+"{WK_TB00000028_RTOSDEBUG}" "TOOLBAR 0" 59419 2 3 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 "{WK_TB00000029_SYSTEMTOOL}" "TOOLBAR 0" 59419 2 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" 
 [WINDOW_POSITION_STATE_DATA_VD2]
 [WINDOW_POSITION_STATE_DATA_VD3]
Index: branch/leng/sp4b2/SP4b2/SP4b2.c
===================================================================
--- branch/leng/sp4b2/SP4b2/SP4b2.c	(revision 590)
+++ branch/leng/sp4b2/SP4b2/SP4b2.c	(revision 591)
@@ -11,118 +11,187 @@
 //importation bibliotheque
 #include "sfr32c87.h"
 
-void initPort1(void)
+void initPort3(void);
+
+void decodeChar(char c);
+
+void decodeCharfaible(char c);
+
+void Lcd4b(char c);
+
+void Lcd8b(char c);
+
+void LcdCom(char c);
+
+void Lcd_init(void);
+
+void LcdChar(char c);
+
+void tpo_ms(int a) ;
+
+void tpo_us(int a);
+
+void main(void){
+	while(1){
+	pd1=0xff;
+	p1=0x00;
+	initPort3();
+	Lcd4b(0x00);
+	initPort3();
+	Lcd8b(0x35);
+	
+	/*initPort3();
+	Lcd_init();
+	LcdChar('A');
+	LcdChar('test');
+	*/
+	
+
+	}
+
+}
+void initPort3(void)
 {
-	pd3=0xff;
-	p3=0x00;
+	pd1=0xff;
+	p1=0x00;
 }
+
 void decodeChar(char c){
+//affectation valeur de c aux bits de data de 4 à 7
 if(c & 0x10){
-	p3_4=1;
+	p1_4=1;
 	}
-else{
-	p3_4=0;
+	else{
+	p1_4=0;
 	}
+
 if(c & 0x20){
-	p3_5=1;
+	p1_5=1;
 		}
-else{
-		p3_5=0;}
+	else{
+	p1_5=0;
+	}
 
 if(c & 0x80){
-	p3_6=1;
+	p1_6=1;
 	}
-else{
-		p3_6=0;
+	else{
+	p1_6=0;
 	}
+
 if(c & 0xf0){
-	p3_7=1;
+	p1_7=1;
 	}
-else{
-		p3_7=0;
+	else{
+	p1_7=0;
 	}
 }
 
-void decodeCharF(char c){
+void decodeCharfaible(char c){
 if(c & 0x01){
-	p3_1=1;
+	p1_0=1;
 	}
-else{
-	p3_1=0;
+	else{
+	p1_0=0;
 	}
 
 if(c & 0x02){
-	p3_2=1;
+	p1_1=1;
 		}
-else{
-	p3_2=0;
+	else{
+	p1_1=0;
 	}
 
 if(c & 0x08){
-	p3_3=1;
+	p1_2=1;
 	}
-else{
-	p3_3=0;
+	else{
+	p1_2=0;
 	}
 
 if(c & 0x0f){
-	p3_4=1;
+	p1_3=1;
 	}
-else{
-	p3_4=0;
+	else{
+	p1_3=0;
 	}
 }
 
 void Lcd4b(char c){
-p3_2=1;
+p1_2=1;
 decodeChar(c);
-p3_2=0;
+p1_2=0;
 }
 
 void Lcd8b(char c){
-p3_2=1;
+p1_2=1;
 decodeChar(c);
-decodeCharF(c);
-p3_2=0;
+decodeCharfaible(c);
+p1_2=0;
 }
 
 void LcdCom(char c){
-p3_0=0;
+p1=0;
+/*
+//display on
+p3_7=1;p3_6=1;p3_5=1;
+//mode entree
+p3=0;
+p3_6=1;p3_5=1;
+*/
+//ecriture car
+Lcd8b(c);
+}
 
+void Lcd_init(void)
+{
+p1_0=0;
+tpo_ms(15);
+Lcd4b(0x30);
+tpo_ms(5);
+Lcd4b(0x30);
+tpo_us(100);
+Lcd4b(0x30);
+tpo_us(100);
+Lcd4b(0x20);
+LcdCom(0x28);
+LcdCom(0x06);
+LcdCom(0x0E);
+LcdCom(0x01);
+tpo_ms(5);
+
+	
+}
 
+void LcdChar(char c){
+p1_0=1;
 Lcd8b(c);
 }
 
-void Lcd_init(void){
-Lcd4b();
-LcdCom();	
+/*
+void tpo_ms(int a){
+tcspr = 0x8A;
+ta0mr = 0x82;
+ta0 = a*1000; 
+ ta0s = 1;ta0os = 1; 
+ ta0ic = 0x00; 
+ while(ir_ta0ic != 1); 
+ ta0s = 0; 
 }
 
-void LcdChar(char c){
-p3_0=1;
-Lcd4b(c);
+void tpo_us(int a){
+tcspr = 0x8A;
+ta0mr = 0x82;
+ta0 = a; 
+ ta0s = 1;ta0os = 1; 
+ ta0ic = 0x00; 
+while(ir_ta0ic != 1); 
+ ta0s = 0; 
 }
+*/
 
 
 
-void main(void)
-{
-	while(1){
-	pd3=0xff;
-	p3=0xff;
-	initPort1();
-	Lcd4b(0x00);
-	initPort1();
-	Lcd8b(0x00);
-	initPort1();
-	Lcd_init();
-	LcdChar(0x00);
-	
-	
-	
 
-	}
 
-}
 
-
