2009-10-27
LCD裏面にある端子を押しつけることにより基板の端子と導通させる方式なので基板パターン面に実装する必要がある。

キャリーボード付きのLCD

基板の自作も可能だがかなり根性が必要
内部のバッファーを全部ゼロで埋めないとゴミが表示されます

バッファーに残ったゴミ

LCD裏面の端子
表示領域

表示領域はかなり横長です

バックライトを点灯させて、白黒反転表示させた状態
0001 '-------------------------------------------------------------------------------
0002 ' SPI initializes
0003 '-------------------------------------------------------------------------------
0004 sub procedure Spi_initialize()
0005 SSPSTAT.SMP = 0 ' Input data sampled at middle of data output time
0006 SSPSTAT.CKE = 0 ' Transmit occurs on transition from Idle to active clock state
0007 SSPCON1.SSPEN = 1 ' Enables serial port and configures SCK, SDO, SDI and SS as serial port pins
0008 SSPCON1.CKP = 1 ' Idle state for clock is a high level
0009 SSPCON1.SSPM3 = 0 ' SPI Clock FSOC/4
0010 SSPCON1.SSPM2 = 0 ' SPI Clock FSOC/4
0011 SSPCON1.SSPM1 = 0 ' SPI Clock FSOC/4
0012 SSPCON1.SSPM0 = 0 ' SPI Clock FSOC/4
0013 end sub
0014
0015 '-------------------------------------------------------------------------------
0016 ' SPI write
0017 '-------------------------------------------------------------------------------
0018 sub procedure Spi_write_data(dim data as byte )
0019 SSPBUF = data
0020
0021 while PIR1.SSPIF = 0
0022 wend
0023
0024 PIR1.SSPIF = 0
0025 end sub
PIC接続の場合、SPIの仕様はPIC16F87Xのデータシートを参照すると良い。PIC18シリーズも仕様は同じ

PIC16F87Xシリーズの日本語データシート