Projet

Général

Profil

« Précédent | Suivant » 

Révision 475

Ajouté par ahkurklu il y a presque 4 ans

implémentation fonction lcd_4bit

Voir les différences:

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