Projet

Général

Profil

« Précédent | Suivant » 

Révision 475

Ajouté par ahkurklu il y a environ 4 ans

implémentation fonction lcd_4bit

Voir les différences:

branch/KURKLU/sp4b2/Sp4b2/SessionM32C_E8a_SYSTEM.ini
Renesas Communications=USB interface,0,
[Target]
M32C E8a SYSTEM=Renesas Communications
[USER_DATA]
RESET=fe0000
branch/KURKLU/sp4b2/Sp4b2/Sp4b2.c
/* This file is generated by Renesas Project Generator (Ver.4.18). */
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
/***********************************************************************/
#include"sfr32c87.h"
void lcd_4b(unsigned char car);
void main(void){
pd1 = 0xff;
lcd_4b(0xA0);
}
void main(void)
{
void lcd_4b(unsigned char car){
p1_2 = 1;
if(car & 0x10){
p1_4 = 1;
}
else{
p1_4 = 0;
}
if(car & 0x20){
p1_5 = 1;
}
else{
p1_5 = 0;
}
if(car & 0x40){
p1_6 = 1;
}
else{
p1_6 = 0;
}
if(car & 0x80){
p1_7 = 1;
}
else{
p1_7 = 0;
}
p1_2 = 0;
}

Formats disponibles : Unified diff