با سلان خدمت دوستان عزیز!!!
خوبید؟؟
من خدمو کشتم ولی نتونستم این ماژول رو با arm را بندازم!!!!
اینم برناممه:
#include <AT91SAM7S64.h>
#include "lib_AT91SAM7S64.h"
#include "delay.h"
#define PORTRAIT
#define TFTLCD_DATAPORT_A
#define TFTLCD_DATAPORT_OFFSET 0
#define TFTLCD_CONTROLPORT_A
#define TFTLCD_RST 16
#define TFTLCD_RS 25
#define TFTLCD_CS 26
#define TFTLCD_WR 23
#define TFTLCD_RD 24
#include "tftlcd_functions.c"
#include "images.h"
#include "usart.h"
#include "touch.h"
#include <stdio.h>
char lcd_buffer[20];
int main (void){
int b;
tftlcd_init();
usart1_init(2,9600);
tftlcd_gotoxy(7,12);
tftlcd_draw_rectangle(0,0,319,320,1,WHITE);
tftlcd_putsf("...:::HELLO:::...",RED,WHI TE,0);
while(1)
{
tftlcd_gotoxy(3,15);
tftlcd_putsf("usart1:",PURPLE,WHITE,1);
tftlcd_gotoxy(3,16);
tftlcd_puts(lcd_buffer,color,BLACK,0);
b=getkey();
sprintf(lcd_buffer,"b=%x ",b);
delay_ms(500);
}
}
ولی روی lcd چرت و پرت می نویسه!!! مثلا وقتی یه کارت میگیرم جلوش اولش میگه: 36 بد پاک میشه میکه 34!!!! ولی یه کارت دیگه میگیرم جلوش اولش میگه 32 بد پاک میشه میکه 33!!!!!
من فک کردم مشکل از متغیر هامه ولی از اونا هم نبود!!!!
کمکککک!!!! :mrgreen: :cry: :cry2: :angry:
خوبید؟؟
من خدمو کشتم ولی نتونستم این ماژول رو با arm را بندازم!!!!
اینم برناممه:
#include <AT91SAM7S64.h>
#include "lib_AT91SAM7S64.h"
#include "delay.h"
#define PORTRAIT
#define TFTLCD_DATAPORT_A
#define TFTLCD_DATAPORT_OFFSET 0
#define TFTLCD_CONTROLPORT_A
#define TFTLCD_RST 16
#define TFTLCD_RS 25
#define TFTLCD_CS 26
#define TFTLCD_WR 23
#define TFTLCD_RD 24
#include "tftlcd_functions.c"
#include "images.h"
#include "usart.h"
#include "touch.h"
#include <stdio.h>
char lcd_buffer[20];
int main (void){
int b;
tftlcd_init();
usart1_init(2,9600);
tftlcd_gotoxy(7,12);
tftlcd_draw_rectangle(0,0,319,320,1,WHITE);
tftlcd_putsf("...:::HELLO:::...",RED,WHI TE,0);
while(1)
{
tftlcd_gotoxy(3,15);
tftlcd_putsf("usart1:",PURPLE,WHITE,1);
tftlcd_gotoxy(3,16);
tftlcd_puts(lcd_buffer,color,BLACK,0);
b=getkey();
sprintf(lcd_buffer,"b=%x ",b);
delay_ms(500);
}
}
ولی روی lcd چرت و پرت می نویسه!!! مثلا وقتی یه کارت میگیرم جلوش اولش میگه: 36 بد پاک میشه میکه 34!!!! ولی یه کارت دیگه میگیرم جلوش اولش میگه 32 بد پاک میشه میکه 33!!!!!
من فک کردم مشکل از متغیر هامه ولی از اونا هم نبود!!!!
کمکککک!!!! :mrgreen: :cry: :cry2: :angry:
دیدگاه