Index: branch/aseck/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.ini
===================================================================
--- branch/aseck/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.ini	(revision 593)
+++ branch/aseck/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.ini	(revision 594)
@@ -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/aseck/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf
===================================================================
--- branch/aseck/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf	(revision 593)
+++ branch/aseck/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.hsf	(revision 594)
@@ -45,7 +45,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" "00000000000000F0" 
 "{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" 
@@ -52,13 +52,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" "0000000000FE02DF" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "0000000000FFFD00" 
+"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000000700" 
+"{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" "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" 
@@ -75,10 +75,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" 
@@ -675,7 +675,7 @@
 "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 0 "0.50" 180 1600 -279 350 200 18 0 "32817|32826|32819|32820|32821" "0.0" 
 "{WK_00000001_OUTPUT}" "WINDOW" 59422 0 1 "0.50" 180 534 287 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 534 287 350 200 18 0 "" "0.0" 
+"{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 232 534 287 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" 
@@ -699,7 +699,6 @@
 [WINDOW_POSITION_STATE_DATA_VD4]
 [WINDOW_Z_ORDER]
 "D:\tp_sp4_seck\sp4b2\SP4b2\SP4b2.c" 
-"D:\tp_sp4_seck\sp4b2\SP4b2\ncrt0.a30" 
 [TARGET_NAME]
 "M32C E8a SYSTEM" "" 0 
 [STATUSBAR_STATEINFO_VD1]
Index: branch/aseck/sp4b2/SP4b2/SP4b2.c
===================================================================
--- branch/aseck/sp4b2/SP4b2/SP4b2.c	(revision 593)
+++ branch/aseck/sp4b2/SP4b2/SP4b2.c	(revision 594)
@@ -9,64 +9,178 @@
 /*  NOTE:THIS IS A TYPICAL EXAMPLE.                                    */
 /***********************************************************************/
 
+#define LCD_E
+#define LCD_RW
+#define LCD_DC
+#define LCD_E_DIR
+#define LCD_RW_DIR
+
 #include "sfr32c87.h"
 
-#define RS p1_0
-#define RW p1_1
-#define E p1_2
-#define BF p0_7
+void tpo_us(unsigned short duree);
+void tpo_ms(unsigned short duree);
+void lcd_init_port(void); 
+void lcd_4b(unsigned char car); 
+void lcd_8b(unsigned char car);
+void lcd_car(unsigned char car); 
+void lcd_com(unsigned char com);
+void lcd_unit(void);
+void lcd_str(unsigned char *str);
 
-void tempo(void)
-{
-	int i;
-	for (i=0 ; i<1000 ;i++)
-		asm("nop");
+
+void lcd_4b(unsigned char car)  
+{   
+    p1_2=1;
+    
+    if (car & 0x80)
+    p1_7=1;
+    else p1_7=0;
+    
+    if (car & 0x40)
+    p1_6=1;
+    else p1_6=0;
+    
+    if (car & 0x20)
+    p1_5=1;
+    else p1_5=0;
+    
+    if (car & 0x10)
+    p1_4=1;
+    else p1_4=0;
+    
+    p1_2=0;
+	
 }
 
-void init_ports_aff(void)
+
+void lcd_8b(unsigned char car)
 {
-	pd0 = 0xff;
-	p0 = 0x00;
-	pd1= 0xff;
-	p1=0x00;
+    lcd_4b(car);
+    lcd_4b(car<<4);
 }
 
 
 
-void busy(void)
+void lcd_com(unsigned char c)
 {
-	pd0=0x00;//entrée
-	RS=0;
-	RW=1;
-	E=1;
-	while(BF!=0);
-	E=0;
-	pd0=0xff;//sortie
+    p1_0=0;
+    lcd_8b(c);   
 }
 
-void affiche_caractere(unsigned char caractere)
+
+void lcd_car(unsigned char car)
 {
+    p1_0=1;
+    lcd_8b(car);
+}
+    
+
+
+void lcd_4b(unsigned char car)  
+{   
+    p3_2=1;
+    
+    if (car & 0x80)
+    p3_7=1;
+    else p1_7=0;
+    
+    if (car & 0x40)
+    p3_6=1;
+    else p1_6=0;
+    
+    if (car & 0x20)
+    p3_5=1;
+    else p1_5=0;
+    
+    if (car & 0x10)
+    p3_4=1;
+    else p1_4=0;
+    
+    p3_2=0;
 	
-	RS=1;
-	RW=0;
-	p0=caractere;
-	E=1;
-	tempo();
-	E=0;
-	tempo();
-	busy();
 }
 
-void affiche_commande(unsigned char commande)
+
+void lcd_8b(unsigned char car)
 {
+    lcd_4b(car);
+    lcd_4b(car<<4);
+}
 
-	RS=0;
-	RW=0;
-	p0=commande;
-	E=1;
-	tempo();
-	E=0;
-	tempo();
-	busy();
+
+
+void lcd_com(unsigned char c)
+{
+    p3_0=0;
+    lcd_8b(c);   
 }
 
+
+void lcd_car(unsigned char car)
+{
+    p3_0=1;
+    lcd_8b(car);
+}
+    
+void lcd_str(unsigned char *str){
+	int i=0;
+	while(str[i]='\0')
+	str([i]!='\0';
+	{
+		lcd_car(str[i]);
+		
+		i++;
+	}
+}
+
+
+void tpo_ms(unsigned short duree){
+	tcspr = 0x8A;
+	ta0mr = 0x82;
+	ta0 = duree*1000;
+	ta0s = 1;
+	ta0os = 1;
+	ta0ic = 0x00;
+	while(ir_ta0ic != 1);
+	ta0s = 0;
+}
+
+void tpo_us(unsigned short duree){
+	tcspr = 0x8A;
+	ta0mr = 0x82;
+	ta0 = duree;
+	ta0s = 1;
+	ta0os = 1;
+	ta0ic = 0x00;
+	while(ir_ta0ic != 1);
+	ta0s = 0;
+}
+
+void lcd_init(void){
+	p3_0=0;
+	tpo_ms(15);
+	lcd_4b(0x30);
+	tpo_ms(5);
+	lcd_4b(0x30);
+	tpo_us(100);
+	lcd_4b(0x30);
+	tpo_us(100);
+	lcd_4b(0x20);
+	lcd_com(0x28);
+	lcd_com(0x06);
+	lcd_com(0x0E);
+	lcd_com(0x01);
+	tpo_ms(5);
+}
+
+
+void main(void)
+{
+    unsigned char c[]="Bonjour";
+    pd3=0xff;
+    lcd_4b(c);
+    lcd_8b(c);
+	lcd_init();
+	lcd_str(c);
+	
+}
\ No newline at end of file
