Projet

Général

Profil

« Précédent | Suivant » 

Révision 436

Ajouté par albeaufour il y a presque 4 ans

commit moitier de TP

Voir les différences:

branch/beaufour/sp4b2/SP4b2/SessionM32C_E8a_SYSTEM.ini
Renesas Communications=USB interface,0,
[Target]
M32C E8a SYSTEM=Renesas Communications
[USER_DATA]
RESET=fe0000
branch/beaufour/sp4b2/SP4b2/SP4b2.c
/* This file is generated by Renesas Project Generator (Ver.4.18). */
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
/***********************************************************************/
#include "sfr32c87.h"
#define PLCD p1;
#define LCD_DC p3_0;
#define LCD_RW P3_1;
#define LCD_E p3_2;
#define LCD_E p1_2;
void tpo_us(unsigned short duree);// temporisation en ?s
void tpo_ms(unsigned short duree);// temporisation en ms
......
void LCD4b_H(char c)
{
pd1 = 0xFF;
LCD_E = 1;
p1_2 = 1;
p1_7 = ( c & 0b10000000)>>7;
p1_6 = ( c & 0b01000000)>>6;
p1_5 = ( c & 0b00100000)>>5;
p1_4 = ( c & 0b00010000)>>4;
LCD_E = 0;
p1_2 = 0;
}
void LCD4b_L(char c)
{
LCD_E = 1;
p1_2 = 1;
p1_3 = ( c & 0b00001000)>>3;
p1_2 = ( c & 0b00000100)>>2;
p1_1 = ( c & 0b00000010)>>1;
p1_0 = ( c & 0b00000001);
LCD_E = 0;
p1_2 = 1;
}
void LCD8b(char c)
{
LCD4b_H(c);
LCD4b_L(c);
}
/*
// initialize the LCD display
void lcd_init(void)
......
void main(void)
{
LCD4b('a');
LCD8b('a');
}

Formats disponibles : Unified diff