아두이노 > 0.96" mini Color OLED

TODAY334 TOTAL177,435
사이트 이용안내
Login▼/회원가입
포럼 동영상강좌 회원가입


BASIC4MCU | 아두이노 | 0.96" mini Color OLED

페이지 정보

작성자 키트 작성일2017-09-13 15:38 조회542회 댓글0건

본문

	

 



Wiring

  • lcds___displays_684top_LRG

New Model

If your display has a single row header across the top, it is the newer version. For wiring instructions, skip down to "Wiring Up the Newer Version"
  • lcds___displays_parts

Older Model

If your display has a row of header pins down each side, it is the older model. See "Wiring the OLDER design" below.

Wiring the OLDER design (two rows of pins on either side)

The older breakout does not have a 5V level shifter on board, so its a little more complex to wire up!

The OLED module supports 3 methods of communication: 4 wire SPI, 8-bit parallel in 8080 and 6800 format. Since the display is small and we like to save pins, we'll be using the SPI protocol. Our tutorial, wiring and example code is all for SPI so if you need 8-bit, check the datasheets for details on how to wire up for 8-bit parallel.
lcds___displays_parts
Since the OLED is 3.3V and also uses 3.3V logic, we need to use a logic shifter. We include a DIP logic shifter, the 74LVX245 with the OLED. If you're using a 3.3V logic chip, you can skip the logic shifter. Arduinos are all 5.0V so we'll be demonstrating that.
Don't forget to solder a piece of 0.1" header onto the left side of the OLED so you can plug it into a breadboard. You cannot skip this step, the header MUST be soldered in before plugging it in and wiring it up or it won't work!

Plug in the OLED and the '245 chip. The Chip has the notch closest to the OLED. Click on the image to see a large photo if you need help orienting

Starting from the top pin of the OLED (closest to the Adafruit flower) Connect the following OLED pins:

  • Common ground - black wire
  • 3.3V (red wires from the Arduino)
  • SD CS Pin- don't connect (microSD card, we'll get to this later)
  • OLED CS Pin - purple wire - 74LVC245 pin #17
  • OLED Reset Pin - blue wire - 74LVC245 pin #16
  • OLED D/C Pin - yellow wire - 74LVC245 pin #15
  • OLED SCLK Pin - orange wire - 74LVC245 pin #14
  • OLED DATA Pin - brown - 74LVC245 pin #13
  • SD Detect Pin- not used, don't connect. Later on, if you wish, you can use this pin to detect if a card is inserted, it will be shorted to ground when a card is in the holder
lcds___displays_wiring

Next we'll connect the remaining 74LVC245 pins to the Arduino

  • Pin #1 goes to 3.3V (red wire)
  • Skip
  • Purple wire - goes to Digital #10
  • Blue wire - goes to Digital #9
  • Yellow wire - goes to Digital #8
  • Orange wire - goes to Digital #13
  • Brown wires - goes to Digital #11
  • Skip
  • Skip
  • Connect to common ground

Then connect pin #20 of the 74LVC245 to 3.3V and pin #19 to Ground.

Digital #12 isn't used yet (we'll connect this to the SD card later

Wiring up the newer version (With one row of pins on top)

The updated 5v ready version of this display includes on-board level-shifting. So the 74LVC245 chip is not required and the wiring is much simpler!

The full pin names are marked on the back of the board, but there are abbreviations on the front to help identify pins when it is plugged into the breadboard. The chart below lists the full pin name, the abbreviated name (in parentheses) and the Arduino pin name to connect it to. Wire colors are as shown in the photo.

  • GND (G) - Gnd (Black Wire)
  • VCC (+) - 5v (Red Wire)
  • SDCS (SC) - skip
  • OCS (OC) - Digital #10 (Orange Wire)
  • RST (R) - Digital #9 (Green Wire)
  • D/C (DC) - Digital #8 (Brown Wire)
  • SCK (CK) - Digital #13 (White Wire)
  • MOSI (SI) - Digital #11 (Blue Wire)
  • MISO (SO) - skip
  • CD (CD) - skip
lcds___displays_2013_07_14_IMG_2035

Installing and running Arduino software

Now we can run the test software on the Arduino. We'll need to download the library first and install it

Visit the Adafruit SSD1331 library github repository page and click the Download Zip. Or just click the button below:

Copy the folder inside the zip file to the Libraries folder inside your Arduino Sketchbook folder and re-name it to Adafruit_SSD1131. For more details on how to install Arduino libraries, check out our detailed tutorial!http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use 

You'll also have to install the Adafruit GFX graphics core library at this github repo. Rename it to Adafruit_GFX and install it the same way as the OLED library. 

After you restart, you should be able to selectFile→Examples→Adafruit_SSD1331→test - this is the example sketch that just tests the display by drawing text and shapes. Upload the sketch and you should see the following:

lcds___displays_triangles
If alls working, then you can start looking through the test sketch for demonstrations on how to print text, circles, lines, etc.

For a detailed tutorial on the Adafruit GFX library, including all the functions available please visit the GFX tutorial page
Last updated on 2015-05-04 at 04.27.56 PMPublished on 2012-07-29 at 11.58.38 AM



 

댓글 0

조회수 542

등록된 댓글이 없습니다.

아두이노HOME > 아두이노 > 아두이노 목록

게시물 검색

Privacy Policy
MCU BASIC ⓒ 2017