صفحه 1 از 6 123 ... آخرینآخرین
نمایش نتایج: از 1 به 10 از 53
Like Tree15 لایک

موضوع: نمایشگر nokia 5110 84mm x 84mm + برد کمکی

  1. #1
    Junior Member
    تاریخ عضویت
    Jul 2013
    نوشته ها
    13

    نمایشگر nokia 5110 84mm x 84mm + برد کمکی

    یک نمایشگر (LCD) کوچک، اما فوق العاده!
    کارایی بالا، قیمت مناسب و سازگاری کامل با برد آردوینو، باعث شده است نمایشگر نوکیا 5110 به سرعت به یک نمایشگر معروف و پرکاربرد در بسیاری از پروژه ها تبدیل گردد. این نمایشگر که در ابتدا ویژه گوشی های تلفن همراه تولید شده است، با قرار گرفتن بر روی برد کمکی، به شما این امکان را می دهد تا به سادگی در پروژه خود از آن استفاده نمایید.
    این نمایشگر از کنترلر PCD8544 استفاده می نماید که در نمایشگرهای Nokia 3310 نیز استفاده شده است. PCD8544 یک کنترلر کم مصرف می باشد که برای بکارگیری نمایشگرهای دارای 48 ردیف و 48 ستون طراحی گردیده است.
    ارتباط PCD8544 با میکروکنترلرها، از طریق یک رابط سریال باس انجام می پذیرد و برخلاف نمایشگرهای ماتریسی موجود در بازار ایران، برای اتصال نمایشگر به برد آردوینو، تعداد کمتری از پین ها (حداکثر 5 پین) اشغال می گردد، همچنین بک لایت نمایشگر باعث می شود استفاده از آن در محیط های کم نور و یا شب به راحتی امکان پذیر باشد.

    توجه: در نمایشگر های قرمز رنگ پین light باید به زمین GND وصل شود تا بک لایت ال سی دی روشن بشه ، اگر در کدنویسی قصد روشن کردنش رو دارید مقدار پین دیجیتال رو به LIGHT متصل کنید و مقدارش رو LOW قرار بدید

    شماتیک مدار:
    برای دیدن سایز بزرگ روی عکس کلیک کنید

نام: nokia 5110.jpg
مشاهده: 1539
حجم: 47.4 کیلو بایت

    مثال آردوینو:
    کد:
    /*
     # Be Name Khoda!
     # Example code for the NOKIA 5110 LCD
     # Company    : AftabRayaneh
     # Website    : http://shop.aftabrayaneh.com
     # Editor     : Saleh Khademi
     # Date       : 28.08.2013
     # Version    : 1.0
    
     # Connect your LCD to the following Arduino pins:
    
     # pin 7 - Serial clock out (SCLK)
     # pin 6 - Serial data out (DIN)
     # pin 5 - Data/Command select (D/C)
     # pin 4 - LCD chip select (CS)
     # pin 3 - LCD reset (RST)
    */
    
    #include <LCD_GFX.h>
    #include <NOKIA5110.h>
    
    NOKIA5110 display = NOKIA5110(7, 6, 5, 4, 3);
    
    #define NUMFLAKES 10
    #define XPOS 0
    #define YPOS 1
    #define DELTAY 2
    
    
    #define LOGO16_GLCD_HEIGHT 16
    #define LOGO16_GLCD_WIDTH  16
    
    static unsigned char PROGMEM logo16_glcd_bmp[] =
    { B00000000, B11000000,
      B00000001, B11000000,
      B00000001, B11000000,
      B00000011, B11100000,
      B11110011, B11100000,
      B11111110, B11111000,
      B01111110, B11111111,
      B00110011, B10011111,
      B00011111, B11111100,
      B00001101, B01110000,
      B00011011, B10100000,
      B00111111, B11100000,
      B00111111, B11110000,
      B01111100, B11110000,
      B01110000, B01110000,
      B00000000, B00110000 };
    
    void setup()   {
      Serial.begin(9600);
    
      display.begin();
      // init done
    
      // you can change the contrast around to adapt the display
      // for the best viewing!
      display.setContrast(45);
    
      display.display(); // show splashscreen
      delay(2000);
      display.clearDisplay();   // clears the screen and buffer
      
      display.println("Aftab Rayaneh");   //Write a Text
      display.setTextSize(2);
      display.display();
      delay(2000);
      display.clearDisplay();
      
      // draw a single pixel
      display.drawPixel(10, 10, BLACK);
      display.display();
      delay(2000);
      display.clearDisplay();
    
       
      // draw many lines
      testdrawline();
      display.display();
      delay(2000);
      display.clearDisplay();
    
      // draw rectangles
      testdrawrect();
      display.display();
      delay(2000);
      display.clearDisplay();
    
      // draw multiple rectangles
      testfillrect();
      display.display();
      delay(2000);
      display.clearDisplay();
    
      // draw mulitple circles
      testdrawcircle();
      display.display();
      delay(2000);
      display.clearDisplay();
    
      // draw a circle, 10 pixel radius
      display.fillCircle(display.width()/2, display.height()/2, 10, BLACK);
      display.display();
      delay(2000);
      display.clearDisplay();
    
      testdrawroundrect();
      delay(2000);
      display.clearDisplay();
    
      testfillroundrect();
      delay(2000);
      display.clearDisplay();
    
      testdrawtriangle();
      delay(2000);
      display.clearDisplay();
       
      testfilltriangle();
      delay(2000);
      display.clearDisplay();
    
      // draw the first ~12 characters in the font
      testdrawchar();
      display.display();
      delay(2000);
      display.clearDisplay();
    
      // text display tests
      display.setTextSize(1);
      display.setTextColor(BLACK);
      display.setCursor(0,0);
      display.println("Hello, world!");
      display.setTextColor(WHITE, BLACK); // 'inverted' text
      display.println(3.141592);
      display.setTextSize(2);
      display.setTextColor(BLACK);
      display.print("0x"); display.println(0xDEADBEEF, HEX);
      display.display();
      delay(2000);
    
      // miniature bitmap display
      display.clearDisplay();
      display.drawBitmap(30, 16,  logo16_glcd_bmp, 16, 16, 1);
      display.display();
    
      // invert the display
      display.invertDisplay(true);
      delay(1000); 
      display.invertDisplay(false);
      delay(1000); 
    
      // draw a bitmap icon and 'animate' movement
      testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH);
    }
    
    
    void loop() {
      
    }
    
    
    void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) {
      uint8_t icons[NUMFLAKES][3];
      srandom(666);     // whatever seed
     
      // initialize
      for (uint8_t f=0; f< NUMFLAKES; f++) {
        icons[f][XPOS] = random() % display.width();
        icons[f][YPOS] = 0;
        icons[f][DELTAY] = random() % 5 + 1;
        
        Serial.print("x: ");
        Serial.print(icons[f][XPOS], DEC);
        Serial.print(" y: ");
        Serial.print(icons[f][YPOS], DEC);
        Serial.print(" dy: ");
        Serial.println(icons[f][DELTAY], DEC);
      }
    
      while (1) {
        // draw each icon
        for (uint8_t f=0; f< NUMFLAKES; f++) {
          display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, BLACK);
        }
        display.display();
        delay(200);
        
        // then erase it + move it
        for (uint8_t f=0; f< NUMFLAKES; f++) {
          display.drawBitmap(icons[f][XPOS], icons[f][YPOS],  logo16_glcd_bmp, w, h, WHITE);
          // move it
          icons[f][YPOS] += icons[f][DELTAY];
          // if its gone, reinit
          if (icons[f][YPOS] > display.height()) {
        icons[f][XPOS] = random() % display.width();
        icons[f][YPOS] = 0;
        icons[f][DELTAY] = random() % 5 + 1;
          }
        }
       }
    }
    
    
    void testdrawchar(void) {
      display.setTextSize(1);
      display.setTextColor(BLACK);
      display.setCursor(0,0);
    
      for (uint8_t i=0; i < 168; i++) {
        if (i == '\n') continue;
        display.write(i);
        //if ((i > 0) && (i % 14 == 0))
          //display.println();
      }    
      display.display();
    }
    
    void testdrawcircle(void) {
      for (int16_t i=0; i<display.height(); i+=2) {
        display.drawCircle(display.width()/2, display.height()/2, i, BLACK);
        display.display();
      }
    }
    
    void testfillrect(void) {
      uint8_t color = 1;
      for (int16_t i=0; i<display.height()/2; i+=3) {
        // alternate colors
        display.fillRect(i, i, display.width()-i*2, display.height()-i*2, color%2);
        display.display();
        color++;
      }
    }
    
    void testdrawtriangle(void) {
      for (int16_t i=0; i<min(display.width(),display.height())/2; i+=5) {
        display.drawTriangle(display.width()/2, display.height()/2-i,
                         display.width()/2-i, display.height()/2+i,
                         display.width()/2+i, display.height()/2+i, BLACK);
        display.display();
      }
    }
    
    void testfilltriangle(void) {
      uint8_t color = BLACK;
      for (int16_t i=min(display.width(),display.height())/2; i>0; i-=5) {
        display.fillTriangle(display.width()/2, display.height()/2-i,
                         display.width()/2-i, display.height()/2+i,
                         display.width()/2+i, display.height()/2+i, color);
        if (color == WHITE) color = BLACK;
        else color = WHITE;
        display.display();
      }
    }
    
    void testdrawroundrect(void) {
      for (int16_t i=0; i<display.height()/2-2; i+=2) {
        display.drawRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, BLACK);
        display.display();
      }
    }
    
    void testfillroundrect(void) {
      uint8_t color = BLACK;
      for (int16_t i=0; i<display.height()/2-2; i+=2) {
        display.fillRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, color);
        if (color == WHITE) color = BLACK;
        else color = WHITE;
        display.display();
      }
    }
       
    void testdrawrect(void) {
      for (int16_t i=0; i<display.height()/2; i+=2) {
        display.drawRect(i, i, display.width()-2*i, display.height()-2*i, BLACK);
        display.display();
      }
    }
    
    void testdrawline() {  
      for (int16_t i=0; i<display.width(); i+=4) {
        display.drawLine(0, 0, i, display.height()-1, BLACK);
        display.display();
      }
      for (int16_t i=0; i<display.height(); i+=4) {
        display.drawLine(0, 0, display.width()-1, i, BLACK);
        display.display();
      }
      delay(250);
      
      display.clearDisplay();
      for (int16_t i=0; i<display.width(); i+=4) {
        display.drawLine(0, display.height()-1, i, 0, BLACK);
        display.display();
      }
      for (int8_t i=display.height()-1; i>=0; i-=4) {
        display.drawLine(0, display.height()-1, display.width()-1, i, BLACK);
        display.display();
      }
      delay(250);
      
      display.clearDisplay();
      for (int16_t i=display.width()-1; i>=0; i-=4) {
        display.drawLine(display.width()-1, display.height()-1, i, 0, BLACK);
        display.display();
      }
      for (int16_t i=display.height()-1; i>=0; i-=4) {
        display.drawLine(display.width()-1, display.height()-1, 0, i, BLACK);
        display.display();
      }
      delay(250);
    
      display.clearDisplay();
      for (int16_t i=0; i<display.height(); i+=4) {
        display.drawLine(display.width()-1, 0, 0, i, BLACK);
        display.display();
      }
      for (int16_t i=0; i<display.width(); i+=4) {
        display.drawLine(display.width()-1, 0, i, display.height()-1, BLACK); 
        display.display();
      }
      delay(250);
    }
    یکی از قابلیت های کاربردی این نمایشگر، امکان نمایش لوگوی دلخواه شماست که با مراجعه به این لینک و پیروی از دستورات آن، می توانید تصویر موردنظر را به کد باینری تبدیل کنید.
    جهت سفارش این کالا، به این بخش در فروشگاه آفتاب رایانه مراجعه نمایید.
    فایل های پیوست شده فایل های پیوست شده
    ویرایش توسط e.rasekh : 09-11-2013 در ساعت 06:09 AM

  2. #2
    Junior Member
    تاریخ عضویت
    Aug 2013
    نوشته ها
    7
    سلام
    توجه کنید که ابین lcd پین vcc 3.3 ولت میباشد
    اگر با ولتاژ بالا کار بکنید میسوزه

  3. #3
    Junior Member
    تاریخ عضویت
    Jul 2013
    نوشته ها
    13
    سلام
    متشکریم از شما دوست عزیز بابت همکاری تون.
    منتها ما از این نمایشگر با ولتاژ 5ولت استفاده می کنیم. یحتمل نمایشگری که مد نظر شماست، ماژول دیگری ست.
    ویرایش توسط e.rasekh : 09-11-2013 در ساعت 05:54 AM

  4. #4
    Junior Member
    تاریخ عضویت
    Aug 2013
    نوشته ها
    7
    نه دوست عزیز من دقیقا همین ماژول را امتحان کردم و بعد از دو روز اسفاده سوخت

    شما فکر میکنید اگر از ولتاژ بالا نسوخته پس از چیه

  5. #5
    مدیر اصلی
    تاریخ عضویت
    Aug 2012
    محل سکونت
    ایران
    نوشته ها
    440
    سلام
    http://www.skpang.co.uk/catalog/imag...ET_LCD5110.pdf
    اگر به فایل راهنما نگاهی بندازید متوجه میشین که ولتاژ کاری این ماژول 2.7 تا 5 ولت هست، 5 ولت حداکثر ولتاژی هست که این نمایشگر می تونه تحمل کنه پس اگر منبع تغذیه شما خروجی 3.3 ولت داره ، بهتره از 3.3 ولت استفاده کنید.
    سوختن نمایشگر شما هم ممکنه به همین علت بوده ، بلاخره زمانی که از حدااکثر ولتاژ استفاده می کنید همیشه این احتمال وجود داره که یک نوسان ولتاژ باعث ایجاد مشکل بشه ، مگر اینکه منبع تغذیه شما مطمئن باشه.

  6. #6
    Junior Member
    تاریخ عضویت
    Sep 2013
    نوشته ها
    4
    با سلام و سپاس...
    هنگام آپلود کد در خط NOKIA5110 display = NOKIA5110(7, 6, 5, 4, 3);
    خطای NOKIA5110 Dose Not name a type دارد و همینطور ارور های زیر را، کجای کارم اشتباه است

    sketch_sep25a:24: error: 'NOKIA5110' does not name a type
    sketch_sep25a.ino: In function 'void setup()':
    sketch_sep25a:56: error: 'display' was not declared in this scope
    sketch_sep25a:74: error: 'BLACK' was not declared in this scope
    sketch_sep25a:137: error: 'WHITE' was not declared in this scope
    sketch_sep25a.ino: In function 'void testdrawbitmap(const uint8_t*, uint8_t, uint8_t)':
    sketch_sep25a:172: error: 'display' was not declared in this scope
    sketch_sep25a:187: error: 'display' was not declared in this scope
    sketch_sep25a:187: error: 'BLACK' was not declared in this scope
    sketch_sep25a:189: error: 'display' was not declared in this scope
    sketch_sep25a:194: error: 'WHITE' was not declared in this scope
    sketch_sep25a.ino: In function 'void testdrawchar()':
    sketch_sep25a:209: error: 'display' was not declared in this scope
    sketch_sep25a:210: error: 'BLACK' was not declared in this scope
    sketch_sep25a.ino: In function 'void testdrawcircle()':
    sketch_sep25a:223: error: 'display' was not declared in this scope
    sketch_sep25a:224: error: 'BLACK' was not declared in this scope
    sketch_sep25a.ino: In function 'void testfillrect()':
    sketch_sep25a:231: error: 'display' was not declared in this scope
    sketch_sep25a.ino: In function 'void testdrawtriangle()':
    sketch_sep25a:240: error: 'display' was not declared in this scope
    sketch_sep25a:243: error: 'BLACK' was not declared in this scope
    sketch_sep25a.ino: In function 'void testfilltriangle()':
    sketch_sep25a:249: error: 'BLACK' was not declared in this scope
    sketch_sep25a:250: error: 'display' was not declared in this scope
    sketch_sep25a:254: error: 'WHITE' was not declared in this scope
    sketch_sep25a.ino: In function 'void testdrawroundrect()':
    sketch_sep25a:261: error: 'display' was not declared in this scope
    sketch_sep25a:262: error: 'BLACK' was not declared in this scope
    sketch_sep25a.ino: In function 'void testfillroundrect()':
    sketch_sep25a:268: error: 'BLACK' was not declared in this scope
    sketch_sep25a:269: error: 'display' was not declared in this scope
    sketch_sep25a:271: error: 'WHITE' was not declared in this scope
    sketch_sep25a.ino: In function 'void testdrawrect()':
    sketch_sep25a:278: error: 'display' was not declared in this scope
    sketch_sep25a:279: error: 'BLACK' was not declared in this scope
    sketch_sep25a.ino: In function 'void testdrawline()':
    sketch_sep25a:285: error: 'display' was not declared in this scope
    sketch_sep25a:286: error: 'BLACK' was not declared in this scope
    sketch_sep25a:289: error: 'display' was not declared in this scope
    sketch_sep25a:290: error: 'BLACK' was not declared in this scope
    sketch_sep25a:295: error: 'display' was not declared in this scope
    sketch_sep25a:297: error: 'BLACK' was not declared in this scope
    sketch_sep25a:301: error: 'BLACK' was not declared in this scope
    sketch_sep25a:308: error: 'BLACK' was not declared in this scope
    sketch_sep25a:312: error: 'BLACK' was not declared in this scope
    sketch_sep25a:319: error: 'BLACK' was not declared in this scope
    sketch_sep25a:323: error: 'BLACK' was not declared in this scope

    آردوینو مگا 2560 و LCD از فروشگاه آفتاب رایانه تهیه کرده ام.
    ویرایش توسط SiamakHadadi : 09-25-2013 در ساعت 03:39 PM

  7. #7
    مدیر اصلی
    تاریخ عضویت
    Aug 2012
    محل سکونت
    ایران
    نوشته ها
    440
    سلام
    این مشکل مربوط به Library هست ، احتمالا Library رو به توابع کتابخانه ای آردوینو اضاف نکردید.
    در ضمن بعضی از پین های مگا با برد Uno فرق می کنه
    این کد برای برد آردوینو Uno هست ، برای استفاده از مگا باید چندتا تغییر کوچیک بدید

  8. #8
    Junior Member
    تاریخ عضویت
    Nov 2013
    نوشته ها
    24
    دوست عزیز احتمالا نمایشگر شما نسوخته چون ۳ .۳ ولت فقط مربوط به بک لایت نمایشگر میشه که پیشنهادمیکنم . شما میزان کنتراست ال سی دی رو تغییر بدید. اگر هیچی روی صفحه دیده نمیشه کنتراست رو زیاد کنید اگر صفحه سیاه یا آبی و .. هست کنتراست رو کم کنید . ال سی دی شما هم ۳.۳ وهم ۵ ولت رو میتونه تحمل کنه فقط ،میزان کنتراست.(vop) رو باید باازمایش بدست بیارید ضمن اینکه کدهای بهتری هم برای این ال سی دی هست با فونت های اندازه های مختلف و امکانات بیشتر

    LCD5110_Basic - Electronics - Henning Karlsen
    LCD5110_Graph - Electronics - Henning Karlsen
    لایک کردن

  9. #9
    Junior Member
    تاریخ عضویت
    Oct 2013
    نوشته ها
    3
    سلام من این lcd رو راه اندازی کردم ولی کنتراستش باید تغییر کنه . پیام روی صفحه نمایش نشون میده ولی کل صفحه سیاه رنگه و نمیشه نوشته رو از روبرو دید . چطور میشه تغییرش داد ؟

  10. #10
    مدیر اصلی
    تاریخ عضویت
    Aug 2012
    محل سکونت
    ایران
    نوشته ها
    440
    سلام
    کد:
      // you can change the contrast around to adapt the display   
    // for the best viewing!  
    display.setContrast(45);

صفحه 1 از 6 123 ... آخرینآخرین

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •  

SEO by vBSEO