Projet

Général

Profil

« Précédent | Suivant » 

Révision 476

Ajouté par malameynar il y a presque 4 ans

fonction 4 bits

Voir les différences:

SP4b1.c
/***********************************************************************/
#include "sfr32c87.h"
char touche;
/*char touche;
char t;
void main(){
pd10=0x0f;
......
}
}
}
*/
/*
void init_keyboard(void);
void tpo_50ms(void);
......
ta0s = 0;
}
*/
lcd_4b(char c){
p12=1;
if(c&0x80){
p1_7=1;
}
else{
p1_7=0;
}
if(c&0x40){
p1_6=1;
}
else{
p1_6=0;
}
if(c&0x20){
p1_5=1;
}
else{
p1_5=0;
}
if(c&0x10){
p1_4=1;
}
else{
p1_4=0;
}
p12=0;
}
lcd_8b(
void main(){
pd1=0xFF;
while(1){
lcd_4b(0xF0);
}
}

Formats disponibles : Unified diff