Gast
#517629
hi
hab folgendes Programm:
#asm
.equ __lcd_port=0x15
#endasm
#include <mega8535.h>
#include <lcd.h>
typedef unsigned char byte;
/* table for the user defined character
arrow that points to the top right corner */
flash byte char0[8]={
0b0000000,
0b0001111,
0b0000011,
0b0000101,
0b0001001,
0b0010000,
0b0100000,
0b1000000};
void define_char(byte flash *pc,byte char_code)
{
byte i,a;
a=(char_code<<3) | 0x40;
for (i=0; i<8; i++) lcd_write_byte(a++,*pc++);
}
void main(void)
{
DDRA = 0x00;
lcd_init(16);
define_char(char0,0);
lcd_gotoxy(0,0);
lcd_putsf("Enter Message");
lcd_gotoxy(1,1);
if (PINA.7)
{
lcd_putsf("7");
}
if (PINA.6)
{
lcd_putsf("6");
}
if (PINA.5)
{
lcd_putsf("5");
}
if (PINA.4)
{
lcd_putsf("4");
}
if (PINA.3)
{
lcd_putsf("3");
}
if (PINA.2)
{
lcd_putsf("2");
}
if (PINA.1)
{
lcd_putsf("1");
}
if (PINA.0)
{
lcd_putsf("0");
}
while (1);
}
leider klappt das nicht er sollte doch in der 2. Zeile auf dem 2 Platz
den Buchstaben anzeigen von der Taste die gedrückt wird aber es tut sich
eifnach nix es kommt nur Enter Message aber Tasten kann ich drücken wie
ich will es tut sich nix wer weiß rat?
mfg
Chris