S
scorrpeio
Guest
Ciao,
Ho scritto un display codeto alcuni dati sul display LCD.
Ma, non ho trovato nulla sul display
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" /><img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" /><img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />Codice:# include <p18f4520.h># pragma config WDT = OFFvoid Delay (void);
void GetLCDCommand (void);
void GetLCDData (void);void main (void)
(
int index;
char a [10];
TRISA = 0x0; / / PORT A configurato in O / modalità P
TRISD = 0x00;
GetLCDCommand ();/ / Configure Display come 2-line, 8-bit, 5x7-punti
PORTD = 0x38;
GetLCDCommand ();/ / per ottenere una visualizzazione cursore lampeggiante
PORTD = 0x0F;
GetLCDCommand ();/ / per visualizzare chiaro
PORTD = 0x01;
GetLCDCommand ();while (1)
(
PORTD = 0xff;
GetLCDData ();
))void Delay (void)
(
float index;
for (index = 0; index <10000; index )
(
/ / non fare nulla
))void GetLCDCommand (void)
(
int index;PORTA = 0b0010;
PORTA = 0b0000;
for (index = 0; index <1000; index )
(
)
)void GetLCDData (void)
(
int index;PORTA = 0b1010;
PORTA = 0b1000;
for (index = 0; index <1000; index )
(
))
Ho scritto un display codeto alcuni dati sul display LCD.
Ma, non ho trovato nulla sul display
<img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" /><img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" /><img src="http://www.edaboard.com/images/smiles/icon_sad.gif" alt="Triste" border="0" />Codice:# include <p18f4520.h># pragma config WDT = OFFvoid Delay (void);
void GetLCDCommand (void);
void GetLCDData (void);void main (void)
(
int index;
char a [10];
TRISA = 0x0; / / PORT A configurato in O / modalità P
TRISD = 0x00;
GetLCDCommand ();/ / Configure Display come 2-line, 8-bit, 5x7-punti
PORTD = 0x38;
GetLCDCommand ();/ / per ottenere una visualizzazione cursore lampeggiante
PORTD = 0x0F;
GetLCDCommand ();/ / per visualizzare chiaro
PORTD = 0x01;
GetLCDCommand ();while (1)
(
PORTD = 0xff;
GetLCDData ();
))void Delay (void)
(
float index;
for (index = 0; index <10000; index )
(
/ / non fare nulla
))void GetLCDCommand (void)
(
int index;PORTA = 0b0010;
PORTA = 0b0000;
for (index = 0; index <1000; index )
(
)
)void GetLCDData (void)
(
int index;PORTA = 0b1010;
PORTA = 0b1000;
for (index = 0; index <1000; index )
(
))