PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : مشکل در استفاده از کتابخانه LCD4bit



web_developer
08-10-2009, 18:11
سلام
من سعی کردم با کتابخانه lcd4bit که در اینجا (You can see links before reply) قرار گرفته یه lcd کاراکتری 16×2 رو راه اندازی کنم. اما موقع کامپایل در Winavr خطاهای زیر رو میده:

main.c:23:24: warning: avrlibdefs.h: No such file or directory
main.c:24:25: warning: avrlibtypes.h: No such file or directory
In file included from main.c:25:
lcd4bit.h:80: warning: parameter names (without types) in function declaration
main.c: In function 'main':
main.c:31: error: 'u32' undeclared (first use in this function)
main.c:31: error: (Each undeclared identifier is reported only once
main.c:31: error: for each function it appears in.)
main.c:31: error: expected ';' before 'format'
main.c:32: error: expected ';' before 'data'
main.c:35: error: 'data' undeclared (first use in this function)
main.c:35: error: 'format' undeclared (first use in this function)
main.c:35: warning: left-hand operand of comma expression has no effect
main.c:38: warning: left-hand operand of comma expression has no effect
make.exe: *** [main.o] Error 1
چطور این مشکل رو رفع کنم؟ من از WinAVR-20090313 استفاده میکنم.

kavir
08-10-2009, 18:13
سلام
avrlibtypes.h خوب این کتابخانه ندارید
از همون سورس ها یکی هست به اسم فول سورس اون کتابخانه پیدا کنیدو در include و جایی که winavr نصب کردید کپی کنید

web_developer
08-10-2009, 18:26
سلام
avrlibtypes.h خوب این کتابخانه ندارید
از همون سورس ها یکی هست به اسم فول سورس اون کتابخانه پیدا کنیدو در include و جایی که winavr نصب کردید کپی کنید
ممنون
دقیقا همین کار رو کردم. اگر چه سورس کامپایل شد اما یه سری Warning‌هم داد:


main.c:35: warning: assignment makes integer from pointer without a cast
main.c:35: warning: assignment makes integer from pointer without a cast
main.c:38: warning: assignment makes integer from pointer without a cast
main.c:38: warning: assignment makes integer from pointer without a cast

lcd4bit.c:216: warning: initialization from incompatible pointer type
lcd4bit.c:218: warning: passing argument 2 of 'fprintf' makes pointer from integer without a cast

من دقیقا از همون مثال سورسی که دریافت کردم استفاده کردم و هیچ جاشو تغییر ندادم!
روی lcd یه سری کاراکترهای نامفهوم نمایش میده.
از پیکربندی lcd مطمنم چون با بیسکام جواب میگیرم...

kavir
08-10-2009, 18:50
خوب نمونه مثال مثال ما هم با پروتئوس هت خوب دقت کنید ممکنه یک نکته ریز از قلم انداخته باشید

gate_crasher
26-08-2011, 23:00
سلام من کتابخونه lcd4bit رو ندارم از کجا می تونم بگیرمش؟

kavir
26-08-2011, 23:16
You can see links before reply