Index: branch/KANAAN/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/KANAAN/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf	(revision 705)
+++ branch/KANAAN/sp4b1/SP4b1/SessionM32C_E8a_SYSTEM.hsf	(revision 706)
@@ -8,7 +8,7 @@
 "" 
 [GENERAL_DATA]
 "FIRST_CONNECTION_TAG" "NO" 
-"MRULABELS_DATAMANAGER_KEY" "FE0000|FE02DF|FE0002|FE02EB" 
+"MRULABELS_DATAMANAGER_KEY" "FE02FE|FE02F7|FE0000|FE030C|FE0308|FE034B|FE0352|FE0005|FE000C|FE02DF|FE0002|FE02EB" 
 "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" "" 
@@ -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" "0000000000000001" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "00000000000000EF" 
 "{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" 
@@ -54,12 +56,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" "0000000000FE0318" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000FE0374" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFFD00" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "00000000000006FE" 
 "{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "0000000000000A02" 
 "{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" "0000000000000081" 
 "{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" 
@@ -146,7 +148,21 @@
 "{D3D4595F-12B4-4866-8F9A-78C30AC967E3}T_EVENT_BC3" "0,0,1,0,1,0,1,0,0,0" 
 "{D3D4595F-12B4-4866-8F9A-78C30AC967E3}T_EVENT_BC4" "0,0,1,0,1,0,1,0,0,0" 
 "{D3D4595F-12B4-4866-8F9A-78C30AC967E3}T_SESSION_IS_SAVED" "YES" 
-"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventCtrlViews" "0" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventCtrlViews" "2" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd0ColWidth0" "40" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd0ColWidth1" "50" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd0ColWidth2" "280" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd0ColWidth3" "300" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd0ScrollHorz" "0" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd0ScrollVert" "0" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd1ColWidth0" "40" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd1ColWidth1" "50" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd1ColWidth2" "280" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd1ColWidth3" "300" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd1ScrollHorz" "0" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWnd1ScrollVert" "0" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWndInstanceKey0" "{WK_00000001_EVENT}SP4b1SessionM32C_E8a_SYSTEM" 
+"{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventWndInstanceKey1" "{WK_00000001_EVENT}SP4b1SessionM32C_E8a_SYSTEM" 
 "{E6D16242-FB42-44CE-B289-ED9FE8563816}MR308DXCtrlViews" "0" 
 "{EEDC9300-6FBE-11D5-8613-00A024591A38}LocalsCtrlViews" "0" 
 "{EEDC9301-6FBE-11D5-8613-00A024591A38}StackTraceCtrlViews" "0" 
@@ -154,7 +170,7 @@
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileDir" "$(CONFIGDIR)" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlSaveFileName" "" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOCtrlViews" "1" 
-"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOSelection IOWnd0" "" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOSelection IOWnd0" "{Port P10 register?{p10?{p10_0?p10_1?p10_2?p10_3?p10_4?p10_5?p10_6?p10_7?}}Port P10 direction register?{pd10?{pd10_0?pd10_1?pd10_2?pd10_3?pd10_4?pd10_5?pd10_6?pd10_7?}}}" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ColWidth0" "321" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ColWidth1" "100" 
 "{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd0ColWidth2" "100" 
@@ -689,6 +705,26 @@
 "{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}IOWnd1Exp10" "1" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp11" "1" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp12" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp13" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp14" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp15" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp16" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp17" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp18" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp19" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp2" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp3" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp4" "0" 
+"{F866DB60-6186-11D5-8BBE-0004E2013C71}IOWnd1Exp5" "0" 
+"{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" 
 [LANGUAGE]
@@ -703,9 +739,11 @@
 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}SP4b1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 1 "0.33" 180 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.31" 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}SP4b1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 0 "0.36" 180 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 3 "0.07" 500 -1600 232 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" 
+"{WK_00000001_EVENT}SP4b1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 0 "0.11" 500 0 0 350 200 18 0 "32774|32775|32777|<<separator>>|32780|<<separator>>" "0.0" 
+"{WK_00000001_IO}SP4b1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 4 "0.40" 500 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.21" 500 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}SP4b1SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 1 "0.29" 500 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" 
@@ -730,6 +768,7 @@
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
 "C:\Users\frkanaan\Desktop\p_sp4_2021_Freddy_Kanaan\sp4b1\SP4b1\SP4b1.c" 
+"C:\Users\frkanaan\Desktop\p_sp4_2021_Freddy_Kanaan\sp4b2\SP4b2\SP4b2.hws" 
 "C:\Users\frkanaan\Desktop\p_sp4_2021_Freddy_Kanaan\sp4b1\SP4b1\ncrt0.a30" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
@@ -777,5 +816,5 @@
 [FLASH_DETAILS]
 "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" 
 [BREAKPOINTS]
-"c:\users\frkanaan\desktop\p_sp4_2021_freddy_kanaan\sp4b1\sp4b1\sp4b1.c" 21 16646894 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"c:\users\frkanaan\desktop\p_sp4_2021_freddy_kanaan\sp4b1\sp4b1\sp4b1.c" 18 16646882 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/KANAAN/sp4b1/SP4b1/SP4b1.c
===================================================================
--- branch/KANAAN/sp4b1/SP4b1/SP4b1.c	(revision 705)
+++ branch/KANAAN/sp4b1/SP4b1/SP4b1.c	(revision 706)
@@ -11,7 +11,7 @@
 
 #include "sfr32c87.h"
 
-unsigned char t,touche;
+unsigned char t, touche;
 void main()
 {
 
@@ -28,37 +28,36 @@
 		{
 			p10=0xBF;
 			t=p10;
+			if(t==0xBE)
+				touche='1';
+			if(t==0xBD)
+				touche='4';
+			if(t==0xBB)
+				touche='7';
 			if(t==0xB7)
-			touche='1';
-			if(t==0xBB)
-			touche='4';
-			if(t==0xBD)
-			touche='7';
-			if(t==0xBE)
-			touche='*';
+				touche='*';
 
 			p10=0xDF;
 			t=p10;
+			if(t==0xDE)
+				touche='2';
+			if(t==0xDD)
+				touche='5';
+			if(t==0xDB)
+				touche='8';
 			if(t==0xD7)
-			touche='2';
-			if(t==0xDB)
-			touche='4';
-			if(t==0xDD)
-			touche='8';
-			if(t==0xDE)
-			touche='0';
+				touche='0';
 
 			p10=0xEF;
 			t=p10;
+			if(t==0xEE)
+				touche='3';
+			if(t==0xED)
+				touche='6';
+			if(t==0xEB)
+				touche='9';
 			if(t==0xE7)
-			touche='3';
-			if(t==0xEB)
-			touche='6';
-			if(t==0xED)
-			touche='9';
-			if(t==0xEE)
-			touche='#';
-			
+				touche='#';
 		}
 	}	
 }
Index: branch/KANAAN/sp4b2/SP4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/KANAAN/sp4b2/SP4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf	(revision 705)
+++ branch/KANAAN/sp4b2/SP4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf	(revision 706)
@@ -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" "" 
@@ -703,8 +705,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}SP4b2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 2 "0.22" 180 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 1 "0.22" 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_CmdLine}" "WINDOW" 59422 0 1 "0.11" 180 -1600 232 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.22" 180 0 0 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.22" 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}SP4b2SessionM32C_E8a_SYSTEM" "WINDOW" 59422 0 0 "0.56" 180 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" 
@@ -729,8 +732,8 @@
 [WINDOW_POSITION_STATE_DATA_VD3]
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
+"C:\Users\frkanaan\Desktop\p_sp4_2021_Freddy_Kanaan\sp4b2\SP4b2\SP4b2\SP4b2.c" 
 "C:\Users\frkanaan\Desktop\p_sp4_2021_Freddy_Kanaan\sp4b2\SP4b2\SP4b2\ncrt0.a30" 
-"C:\Users\frkanaan\Desktop\p_sp4_2021_Freddy_Kanaan\sp4b2\SP4b2\SP4b2\SP4b2.c" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
@@ -777,5 +780,5 @@
 [FLASH_DETAILS]
 "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" 
 [BREAKPOINTS]
-"c:\users\frkanaan\desktop\p_sp4_2021_freddy_kanaan\sp4b2\sp4b2\sp4b2\sp4b2.c" 71 16646984 1 "{00000000-0000-0000-C000-000000000046}" "" 
+"c:\users\frkanaan\desktop\p_sp4_2021_freddy_kanaan\sp4b2\sp4b2\sp4b2\sp4b2.c" 101 16647048 1 "{00000000-0000-0000-C000-000000000046}" "" 
 [END]
Index: branch/KANAAN/sp4b2/SP4b2/SP4b2/SP4b2.c
===================================================================
--- branch/KANAAN/sp4b2/SP4b2/SP4b2/SP4b2.c	(revision 705)
+++ branch/KANAAN/sp4b2/SP4b2/SP4b2/SP4b2.c	(revision 706)
@@ -11,15 +11,16 @@
 
 #include "sfr32c87.h"
 
-#define LCD_E
-#define LCD_RW
-#define LCD_DC
-#define LCD_E_DIR
-#define LCD_RW_DIR
-#define LCD_DC_DIR
-#define LCD_PORT
-#define LCD_PORT_DIR
+#define LCD_E p3_2
+#define LCD_RW p3_1
+#define LCD_DC p3_0
+#define LCD_E_DIR pd3_2
+#define LCD_RW_DIR pd3_1
+#define LCD_DC_DIR pd3_0
+#define LCD_PORT p3
+#define LCD_PORT_DIR pd3
 
+
 void tpo_us(unsigned short duree);// temporisation en µs
 void tpo_ms(unsigned short duree);// temporisation en ms
 void lcd_init_port(void);// initialisation des broches du µC
@@ -31,35 +32,64 @@
 void lcd_str(unsigned char *str);// envoi d'une chaîne de caractère
 
 
+
+void tpo_us(unsigned short duree)
+{
+	tmod0_ta0mr=0;
+	tmod1_ta0mr=0;
+	mr1_ta0mr=0;       
+	mr2_ta0mr=0;       
+    mr3_ta0mr=0;      
+	tck0_ta0mr=0;     
+	tck1_ta0mr=0;
+	
+	//TA0=;
+	    
+
+}
+
+
+void lcd_init_port(void)
+{
+	LCD_RW=1;
+	LCD_DC=1;
+	LCD_E_DIR=1;
+	LCD_RW_DIR=1;
+	LCD_DC_DIR=1;
+	LCD_PORT=1;
+	LCD_PORT_DIR=1;	
+}
+
+
 void lcd_4b(unsigned char car)
 {
-	pd1=0xFF;
-	p1_2=1;
+	pd3=0xFF;
+	LCD_E=1;
 
 	if(car & 0x80)
-		p1_7=1;
+		p3_7=1;
 	else
-		p1_7=0;
+		p3_7=0;
 	
 	if(car & 0x40)
-		p1_6=1;
+		p3_6=1;
 	else
-		p1_6=0;
+		p3_6=0;
 		
 	if(car & 0x20)
-		p1_5=1;
+		p3_5=1;
 	else
-		p1_5=0;
+		p3_5=0;
 		
 	if(car & 0x10)
-		p1_4=1;
+		p3_4=1;
 	else
-		p1_4=0;
+		p3_4=0;
 	
-	p1_2=0;	
+	LCD_E=0;	
 }
 
-void test_unitaire (void)
+void test_unitaire_4b (void)
 {
 	lcd_4b(0xFF);
 	lcd_4b(0x00);
@@ -68,7 +98,7 @@
 
 void main(void)
 {
-	test_unitaire();	
+	test_unitaire_4b();	
 }
 
 
@@ -76,7 +106,7 @@
 // initialize the LCD display
 void lcd_init(void)
 {
-	LCD_DC;
+	LCD_DC=0;
 //	tpo_ms(15);
 	lcd_4b(0x30);
 //	tpo_ms(5);
