uart serial lcd module free sample

The Serial LCD Kit includes all the parts you need to add a serial "backpack" to a 16x2 LCD. The kit includes a pre-programmed ATmega328 microprocessor, which reads a serial stream of data and (after a little heavy-lifting) instantly displays it on the LCD. Interfacing the Serial LCD with an Arduino, or other serial-enabled devices, allows you to easily print GPS coordinates, short messages or any other information onto the LCD.

This tutorial will cover everything you need to know to get up and running with the Serial Enabled LCD Kit. We"ll first go over assembly so you can turn that bag-o-parts into something that hopefully resembles any pictures you may have seen of the kit.

Following assembly, we"ll touch on how to actually use the Serial LCD Kit. Specifically, we"ll go over how you"d use the thing with everybody"s favorite development board, Arduino. There"ll be example code galore, and you can even make your own LCD clock! It"s gonna be pretty crazy...

Finally, you"ll need something to send a serial stream of data to the display. An Arduino works great (any variety, this isn"t limited to the Uno) if you want to automate the serial data stream. FTDI breakouts or RS-232 level shifters work if you just want to connect the display to your computer and send data via a terminal program. For what it"s worth, this tutorial will focus on connecting the display to an Arduino.

The goal of the Serial LCD Kit is to make controlling an LCD simple and to make wiring to it even simpler. If you wanted, you could abstain from using the serial backpack and wire an Arduino directly up to the LCD. To that point, there are loads of great examples, and even some Arduino libraries, that make interfacing a microcontroller directly to an LCD very easy. However, because the LCD is driven by a parallel interface, those examples require a tangle of wires and anywhere from 6 to 11 pins of the Arduino to control the thing.

The microcontroller on the Serial LCD Kit takes care of all of that nasty wiring, so you only need one pin to control the LCD. The Serial LCD"s on-board microcontroller parses any incoming commands or characters, and then sends the proper data to the LCD over the multi-wire parallel interface. It"s a magic black box, and you don"t have to care how it does its job, just that it does it. So let"s get it built...

What you"ve got in front of you right now is not yet a Serial LCD Kit. First, we"ve got to turn that bag of parts into a Serial LCD Kit, which will require soldering. If you"ve never soldered before, don"t fret! This is one of the easier soldering projects, every part is through-hole, and well-spaced. If this is your first time though, I"d encourage you to take a trip over to one of our excellent soldering tutorials before picking up the iron.

First, pick out the big, ferrari-red PCB. See how one side has white silkscreen printed onto it? This is the top of the PCB. You"ll stick almost every part in on this side and solder the pins to the opposite side. The only time we"ll stray from that is when soldering the LCD, which is the last step.

Wait...something"s missing...oh, hi LCD! To connect the LCD to the PCB, we"ve included a straight 16-pin header with the kit. You"ll need to solder this header to both the PCB and the LCD. Solder it first to the LCD, stick the shorter pins into the LCD. Make sure the longer legs are extended out from the back of the LCD and solder all 16-pins on the top side of the LCD. Effort to keep the pins as perpendicular to the LCD as possible.

With the header soldered to the LCD,you"ll finally be able to connect the display to the PCB. Remember, we"re sticking this part into the bottom side of the PCB, and soldering to the top. Solder up all 16 pins, and that should be it.

Before you can display anything on the LCD, you"ll have to connect something to it. Only three wires are necessary to use the Serial LCD Kit: RX, GND and VCC. Plug the included 3-wire jumper cable into its mating JST connector that you soldered onto the PCB. This color coded cable has two wires for power, and one for receiving serial data. The red and black wires correspond to +5V and GND, respectively, and the yellow wire is RX.

You"ll need to figure out how you"re going to powerthe LCD Kit. It doesn"t have a regulator on-board, so it"s up to you to supply a clean, regulated 5V power source. If you"re using an Arduino, you could power the Kit off of the 5V and GND pins – connect red to 5V and black to GND. Otherwise, there"s a ton of options out there for power; you could use a USB adapter, a 5V wall-wart, a breadboard power supply. The list just goes on. Just make sure you"re not supplying any more than 5V (a little less may work, but you"ll lose some brightness).

After powering the Serial LCD Kit, you should notice the backlight turn on. If the contrast is properly adjusted, you might see the splash screen flash for a second or two. Most likely though, the contrast won"t be set correctly, so you won"t see a splash screen. In that case, you may see anything from 32 white boxes to absolutely nothing. You"ll have to be quick about it, because the splash screen only remains for a couple seconds before going blank, but try turning the trimpot knob until you"ve got a good view of the characters on the LCD.

The "Serial" in the Serial LCD Kit can be a little confusing. What it really means is TTL serial, not to be confused with RS-232 serial. The voltage on the RX line should only go between 0 and +5V. If you"re using a microcontroller (like an Arduino) to talk with the LCD, then you most likely don"t have to worry. Just don"t hook up a PC"s serial port straight to the LCD and expect it to survive.

There"s a lot of components that are capable of sending TTL serial data. The most popular here at SparkFun are USB-to-Serial boards (like the FTDI Basic Breakout), or an Arduino. This tutorial is going to assume you have an Arduino for the next few examples. No Arduino? That"s cool. I get it; you"re not gonna conform to this passing fad. Feel free to read on, and try to port these examples to your platform.

Connect the Arduino to the Serial LCD as follows. If you have a wire stripper, you may want to expose a few millimeters more of wire to allow them to stick really nicely into the Arduino"s headers.

Here"s a simple example sketch, which uses the SoftwareSerial library (which is included with recent versions of Arduino) to instill our Arduino with more than just the one, hardware, serial port. Now we can use the hardware serial port to listen to the serial monitor, and the second serial port can be used to talk to the LCD.

Now, plug in your Arduino and upload the code. Open up the serial monitor, and make sure it"s set to 9600. Type “Hello, world” into the serial monitor and send it over to the Arduino. The LCD should echo your greeting. Take the LCD for a test drive, discover all the characters it can display!

You"ll quickly notice, that the code is severely lacking any sort of clear display command, but don"t think for a second that the Serial LCD Kit doesn"t have a clear display command. It"s got commands up the wazoo! The Serial LCD Kit is set up to accept commands that control the backlight, baud rate, and all sorts of display functionality, like clearing the screen. Have a look at the Kit"s “datasheet”, which lists all of the characters and commands you can send to the display. I wrote that, but I understand if it"s all gobbledygook to you right now.

The commands are divided into three groups: backlight, baud rate, and special commands. Each command requires that you send at least two bytes to the display. For instance to set the backlight, you first have to send the backlight control byte (0x80, or decimal 128) followed by a byte with any value from 0 to 255. Sending a 0 will turn the backlight completely off, 255 will turn it all the way on, 127 will set it to about 50%, and so on. The backlight setting is stored in the Serial LCD Kit"s memory and will be restored when the LCD is turned off and on.

What we really care about right now, though, is clearing the display, which requires a special command. To issue a special command to the LCD, you first have to send 0xFE (or decimal 254) which tells the display to go into special command mode, and wait for a data byte. The clear display command is 0x01 (or decimal 1), that command should be sent immediately after sending the special command byte. So to clear the display we need to send two bytes: 254 (0xFE) followed by 1 (0x01). Check out the datasheet link for all of the special commands. You can do all sorts of fun stuff: scroll the display, turn it on/off and control the cursor.

Our next piece of example code, Serial_LCD_Kit_Clock, delves into sending special commands to the LCD with an Arduino. There are individual functions that clear the display (clearDisplay()), set the backlight (setBacklight(byte brightness)), and set the cursor (setLCDCursor(byte cursor_position)), feel free to copy these and add them to any code you"d like.

Now then, that should be enough to get you on your way to using the Serial LCD Kit with a serial interface. If you"re happy with that, and don"t want your mind blown, I suggest you stop reading here.

Oh, you"ve taken the red pill? Well then you get to learn the Serial LCD Kit"s very deep, dark secret. It may not look anything like one, but the LCD Kit is actually Arduino-compatible. It has an ATmega328, just like the Arduino, and that ATmega328 has a serial bootloader, just like an Arduino. It can be programmed via a USB-to-Serial board. This means you can hook up all sorts of sensors, blinkies and other I/O to the Kit itself, while continuing to use the LCD to display any info you"d like. The 6-pin serial programming port on the right hand side of the PCB can be connected to an FTDI Basic Breakout.

With the FTDI board connected, and Arduino open, simply select the corresponding COM port in the Tools>Serial Port menu, and select Arduino Duemilanove or Nano w/ ATmega328 under the Tools>Boards menu. Though it probably won"t look like it"s doing anything, try uploading Blink, change the LED pin to 9 to at least see the backlight of the LCD flick on and off. Remember, you can download the Serial LCD Kit firmware here. If you ever want to turn it back into a Serial LCD, upload it to the LCD like you would any sketch.

If you want to be really adventurous, and get the most out of the Serial LCD Kit, I"d recommend first taking a trip over to where the Serial LCD Kit"s source code is hosted and getting a good idea how the code works. That firmware is written as an Arduino sketch, and uses a great little Arduino library named LiquidCrystal to control the LCD. The LiquidCrystal library makes controlling the LCD with an Arduino super-simple.

You should also get a good feeling for the kit"s schematic. There are a few Arduino pins that can only be used with the LCD (4-9), but pins 10-13, and all of the analog pins can be used with any device you"d normally connect to an Arduino. The available pins are all broken out on the bottom of the PCB.

Remember, this part is all very extracurricular. Don"t feel at all required to use your Serial LCD Kit as an Arduino. I just wanted to let you know what"s possible with this kit.

Serial LCD Clock Example Sketch - Displays a digital clock on the Serial LCD. This is a good example of how to use special commands, like clear, with the display.

Now I"ll leave you and your Serial LCD Kit in peace. I hope you"ve learned a good amount about the display. I also hope you"re left with questions and ideas about what you"re going to do with it next. If you"ve still got questions about the display, or comments about the tutorial, please drop them in the comments box below or email us.

uart serial lcd module free sample

Unlike other "Serial Display" which just convert serial input to parallel, Digole"s Serial displays and adapters embedded a powerful MCU to process the commands received. Display characters and control back light as you want, all commands are simple, high level and easy to remember!

In order to use a Text LCD display, you need connect at least 4 data pins and 2 control pins from your circuit to display, and you also need to spend some time to write code to drive it, in some case, you may need couple of days to deal with it, and it will give you a nightmare when changing to other display.

This control module (adapter) will help you to solve this issue, it can work with most 1602/1604/2002/2004/4002 LCD that config with KS0066U/F / HD44780 and other compatible chips seamlessly, so you can use your display with this module in couple of minutes!(Please ask if you not sure whether or not your LCD is compatible with the adapter)

CLear screen and set the display position to first Column and first Row (x=0.y=0), for graphic LCD, it also set the font to default and turn off the cursor.

Display Config on/off, the factory default set is on, so, when the module is powered up, it will display current communication mode on LCD, after you design finished, you can turn it off

Set UART Baud, B are ASCII characters, the available values are: “300”, “1200”, “2400”,”4800”, “9600”, “14400”, “19200”, “28800”, “38400”, “57600”,”115200”

uart serial lcd module free sample

7 fonts and graphic engine embedded, touch screen and flash chip drivers embedded(if touch screen or 2 to 16MB flash chip installed), custom fonts can be downloaded to the module"s flash.

High level commands set (61 commands total) are easy to remember and understand, eg.: send 5 bytes: "CCabc" will draw a ratio=c pixels circle at coordinate (a,b) on the screen; 5 bytes "DNALL" will put the module to sleep mode(<0.1mA), and more...

uart serial lcd module free sample

RS232 is a serial communication interface standard issued by the American Electronics Industry Association in 1962. RS is the abbreviation of "Recommend Standard" in English, and 232 is the identification number. The standard specifies the physical interface and logic level of serial communication. The output level is called the RS232 level.

uart serial lcd module free sample

EastRising UART display is an LCD screen that uses UART serial port for communication. The user sends instructions to the serial LCD screen through the single-chip microcomputer, and the serial port screen will automatically complete all operations of drawing on the LCD. Due to the simple operation, even people who do not know any programming can easily develop the human-computer interaction interface they want.

1. The hardware part includes processor, LCD screen, resistive touch screen or capacitive touch screen, FLASH storage, RS232 or 485 serial port chip, audio and video decoding chip, SD card slot, etc. Some models include WIFI, 4G, Bluetooth, voice recognition , face recognition, fingerprint recognition and other modules,

2. The operating software is generally divided into two parts, namely system software running on the UART display and interface development software UI Editor running on PC Windows operating system" ,UI EMULATOR for program debugging software.

The user first uses the UI Editor to make the "Project BIN file", and then downloads the compiled "Project BIN file" to the FLASH of the serial port display through the UART port or USB port or SD card of the UART display.

EastRising UART displays are widely used in industrial automation, electric power, telecommunications, environmental protection, medical care, finance, petroleum, chemical industry, transportation, energy, geology, metallurgy, public inquiry and monitoring, smart home appliances, transportation rails, data centers, charging piles, electric power Dozens of industries and fields such as medical care, national defense security, and shared equipment.

After starting the software, you can use the UART serial port to update the MCU (MCU_Code.bin) or update the SPI Flash data (UartTFT_Flash.bin).Totorial

uart serial lcd module free sample

LCD Display Modules└ LEDs, LCDs & Display Modules└ Electronic Components & Semiconductors└ Electrical Equipment & Supplies└ Business & IndustrialAll CategoriesAntiquesArtBabyBooks & MagazinesBusiness & IndustrialCameras & PhotoCell Phones & AccessoriesClothing, Shoes & AccessoriesCoins & Paper MoneyCollectiblesComputers/Tablets & NetworkingConsumer ElectronicsCraftsDolls & BearsMovies & TVEntertainment MemorabiliaGift Cards & CouponsHealth & BeautyHome & GardenJewelry & WatchesMusicMusical Instruments & GearPet SuppliesPottery & GlassReal EstateSpecialty ServicesSporting GoodsSports Mem, Cards & Fan ShopStampsTickets & ExperiencesToys & HobbiesTravelVideo Games & ConsolesEverything Else

uart serial lcd module free sample

The 4.3inch e-Paper UART Module adopts a serial port, with a resolution of 800 × 600, built-in Chinese and English fonts, and low power consumption. If you don"t want to learn the complex details of the bottom of the e-paper screen and don"t pay attention to the specific display algorithms of graphics, text and pictures, then this product is born for you. Just one serial port can realize all functions, free you from complicated details and release your creativity.

It is easy to use, only one serial port is needed to complete the display, including drawing geometric figures and displaying text and pictures. Built-in font library supports 32, 48, 64 dot matrix GBK Chinese font library; 32, 48, 64 dot matrix English font library has built-in 128MB NandFlash. The font library and picture data can be stored in the external TF card, or imported into the internal NandFlash 4-level grayscale display, with a resolution of up to 800 × 600. The serial port baud rate can be customized. After the system is powered on, the default is 115200. 5V, the logic level is compatible with low power consumption, the current is less than 5mA after the system sleeps. With the host computer software, the display can be completed directly by using the computer.

If the e-Paper module is powered by 3.3V from a certain serial module, the refresh of e-Paper may cause instability of the serial module due to high current. In this case, please try 5V power supply from the serial module, or try another serial module.

We have designed the software for E-Paper to work with PC. With this software, users can easily operate different basic displays on the E-Paper via a PC. In additional, a USB-to-serial module should be applied to build up the communication between the e-Paper and the PC. In here, we will take the serial module CP2102 USB UART Board(mini) as an example to illustrate the application. For more detailed information about this serial module, please refer to Appendix.

Check the Device Manager, and configure the corresponding serial port. Click the button Open, and then the button Shake hands. The E-Paper module will return the message "OK", if the communication is built up.

Click the button Load font. Then, the state indicator on the e-Paper will flicker 3 times, indicating the importation starts. When finished, the state indicator will flicker 3 times again and the e-Paper module will return the message "OK", indicating that the importation of font library is completed successfully.

Click the button Load image. Then, the state indicator on the e-Paper will flicker 3 times, indicating the importation starts. When finished, the state indicator will flicker 3 times again and the e-Paper module will return the message "OK", indicating that the importation of image(s) is completed successfully.

Here, we take Arduino UNO development board as an example to illustrate the application. Connect the development board to the e-Paper with a serial cable as shown in the follow table. For more information about this development board, please refer to the Appendix.

Here, we take NUCLEO-F103RBdevelopment board as an example to illustrate the application. Connect the development board to the e-Paper with a serial cable as shown in the follow table. For more information about this development board, please refer to the Appendix.

Here, we take Open103Z development board as an example to illustrate the application. Connect the development board to the e-Paper with a serial cable as shown in the follow table. For more information about this development board, please refer to the Appendix.

The data of the module is transmitted in the Network byte sequence, which means higher byte is sent at first, then lower byte following. For example, a parameter, 0x1234, is transmitted in two parts: 0x12 is sent at first, and then 0x34 following.

After powered up, the default Baud rate is 115200. This command is used to set the Baud rate. You may need to wait 100ms for the module to return the result after sending this command, since the host may take a period of time to change its Baud rate.

50 49 43 37 2E 42 4D 50 are the ASCII codes of “PIC7.BMP”. After this command executed, any data from UART will be saved into the SD card and saved as PIC7.BMP. If the transmission stops more than 1s, this function will stop too. After the file sent, file size and Xor check will be returned and you should compare them to check if the file was sent properly. Last, if the file was sent properly, you should send the character ‘y’ to confirm.

If the file is an image (.JPG or .BMP), you should set the storage area to SD card (A5 00 0A 07 01 CC 33 C3 3C A9), and then use the display image command to display it. UART input stream command is not affected by the storage area settings.Files are only going to be saved into the Micro SD card.

2. Please use independent power supply, do not use serial port module to supply power. Because the current required to refresh the screen is large, when using the serial port module for power supply, it may cause serial port problems or SD card problems. In this case, using the SD card will report an error: Error: 1, Error: 3, or Error: 4.

uart serial lcd module free sample

In internal modems, the modem designer will frequently emulate the 8250A/16450 with the modem microprocessor, and the emulated UART will frequently have a hidden buffer consisting of several hundred bytes.

However, most operating systems will still report that the UART is only a 8250A or 16450, and may not make effective use of the extra buffering present in the emulated UART unless special drivers are used.

Some modem makers are driven by market forces to abandon a design that has hundreds of bytes of buffer and instead use a 16550A UART so that the product will compare favorably in market comparisons even though the effective performance may be lowered by this action.

For example, about half of the differences reported in the two modems listed above that have internal UARTs were caused by the clone UARTs not supporting five- and six-bit character modes.

The real 16550, 16450, and 8250 UARTs all support these modes and COMTEST checks the functionality of these modes so over fifty differences are reported.

If you run COMTEST on a 16550 that is in a modem or a modem is attached to the serial port, you need to first issue a ATE0&W command to the modem so that the modem will not echo any of the test characters.

uart serial lcd module free sample

Smart TFT LCD display embeds LCD driver, controller and MCU, sets engineer free from tedious UI & touch screen programming. Using Smart TFT LCD module, our customers greatly reduce product"s time-to-market and BOM cost.

uart serial lcd module free sample

port is open in another application, MATLAB cannot access it. After you access the serial port in MATLAB, you can open the same port in other applications, and MATLAB continues to use it along with any other application that has it open

uart serial lcd module free sample

The following section will use [UART_REGISTER_NAME].[UART_FIELD_BIT] to refer to UART register fields/bits. For more information on a specific option bit, see ESP32 Technical Reference Manual > UART Controller (UART) > Register Summary [PDF]. Use the register name to navigate to the register description and then find the field/bit.

UART_RS485_CONF_REG.UART_RS485RXBY_TX_EN: if this bit is set, the transmitter will still be sending data if the receiver is busy (remove collisions automatically by hardware).

The ESP32’s RS485 UART hardware can detect signal collisions during transmission of a datagram and generate the interrupt UART_RS485_CLASH_INT if this interrupt is enabled. The term collision means that a transmitted datagram is not equal to the one received on the other end. Data collisions are usually associated with the presence of other active devices on the bus or might occur due to bus errors.

The collision detection feature allows handling collisions when their interrupts are activated and triggered. The interrupts UART_RS485_FRM_ERR_INT and UART_RS485_PARITY_ERR_INT can be used with the collision detection feature to control frame errors and parity bit errors accordingly in RS485 mode. This functionality is supported in the UART driver and can be used by selecting the UART_MODE_RS485_APP_CTRL mode (see the function uart_set_mode()).

The collision detection feature can work with circuit A and circuit C (see Section Interface Connection Options). In the case of using circuit A or B, the RTS pin connected to the DE pin of the bus driver should be controlled by the user application. Use the function uart_get_collision_flag() to check if the collision detection flag has been raised.

The ESP32 UART controllers themselves do not support half-duplex communication as they cannot provide automatic control of the RTS pin connected to the RE/DE input of RS485 bus driver. However, half-duplex communication can be achieved via software control of the RTS pin by the UART driver. This can be enabled by selecting the UART_MODE_RS485_HALF_DUPLEX mode when calling uart_set_mode().

Once the host starts writing data to the Tx FIFO buffer, the UART driver automatically asserts the RTS pin (logic 1); once the last bit of the data has been transmitted, the driver de-asserts the RTS pin (logic 0). To use this mode, the software would have to disable the hardware flow control function. This mode works with all the used circuits shown below.

This circuit is preferable because it allows for collision detection and is quite simple at the same time. The receiver in the line driver is constantly enabled, which allows the UART to monitor the RS485 bus. Echo suppression is performed by the UART peripheral when the bit UART_RS485_CONF_REG.UART_RS485TX_RX_EN is enabled.

This circuit does not allow for collision detection. It suppresses the null bytes that the hardware receives when the bit UART_RS485_CONF_REG.UART_RS485TX_RX_EN is set. The bit UART_RS485_CONF_REG.UART_RS485RXBY_TX_EN is not applicable in this case.

This galvanically isolated circuit does not require RTS pin control by a software application or driver because it controls the transceiver direction automatically. However, it requires suppressing null bytes during transmission by setting UART_RS485_CONF_REG.UART_RS485RXBY_TX_EN to 1 and UART_RS485_CONF_REG.UART_RS485TX_RX_EN to 0. This setup can work in any RS485 UART mode or even in UART_MODE_UART.

uart serial lcd module free sample

In this post, I am throwing some light into introducing LCD Serial Interface Board ,familiarising you with its major AT commands used to communicate with this board. Along with this, the steps to interface this board with a micro-controller or Serial to USB converter will be depicted as well.

LCD Serial Interface Board concatenates a 16x2 LCD screen controlled easily by AT (Attention) commands. It is operated through simple SERIAL communication in ASCII format and can easily be interfaced with a microcontroller imparted with UART pins. The module is already incorporated with an Atmega 8 micro-controller ,which could memorize the data written previously, even after a power shut down.

Pressing this button resets the micro-controller in the LCD Serial Interface board , so that the code uploaded on it starts running from the beginning. Hence, board starts displaying from the welcome note (if it is enabled) by default.

In this part of the post, I am going to provide you insights on the pin connections regarding LCD Serial Interface board with serial to USB converter or a micro-controller.

STEP 3:Connect GND of LCD serial board with ground of micro-controller/CP2102. For the sake of depiction, Figure 3 has been presented with pin connections between LCD serial interface board and CP2102(You can definitely replace CP2102 with a micro-controller, in case you want, since the pin connections with LCD serial interface board is essentially the same).

STEP 4:Open serial terminal console to type in AT commands or send data serially to LCD serial interface board using micro-controller programs with a baud rate of 9600.

/*sample code for printing a data using Elementz LCD Interface Board written by Elementz Engineers Guild Pvt Ltd (No copyright restrictions).The code is written in AVR studio and the crystal frequqency is 8 Mhz.*/

uart serial lcd module free sample

The parallel interface typically controls the LCD via 8 data pins and 3 control lines. The control lines used are Enable (E), Register Select (RS), and Read/Write (R/W). RS tells the LCD module if the information being sent is an Instruction or Data. The Enable tells the LCD module that the data or instruction in the register is ready to be interpreted by the LCD Module. Some controllers may have more than one Enable Control Line. The Read/Write tells the module whether to write data or read data from the register.

Serial LCD controllers typically have one Serial Data Line that writes data and cannot read. Normally, a Register Select Line(Sometimes designated A0) is used to tell the controller whether the incoming data is display information or a controller command

SPI, or Serial Peripheral Interface bus, is a synchronous (data is synchronized to the clock) serial data link standard that operates in full duplex mode, which means that devices that can communicate with one another simultaneously. To do this, two data lines are required. With this standard, devices communicate in a master/slave mode, where the master device (host processor) initiates the data and the clock. The LCD module is the (or one of the) peripheral slave device(s) attached to the data bus. Multiple peripherals (display modules and other devices) are addressed on the same serial data bus. However, the LCD module will only listen to the data it sees when the Chip Select line is active (usually low). If the Chip Select line is inactive (usually High), the LCD module listens to the data on the bus, but ignores it. The SDO line is not active when this state occurs. The SPI bus is comprised of four logic signals, two control lines and two data lines and is commonly referred to as SPI (4 wire).

Occasionally, SDI (serial data in) may be called out as MOSI (Master Out Slave In) from Motorola"s original name for these lines and MISO (Master In Slave Out) for SDO. The chip select line may be alternatively labeled SS (Slave-Select), or STE (Slave Transmit Enable). SPI is sometimes referred to as National Semiconductor"s trademark Microwire, which is essentially a predecessor of SPI, which only supports half duplex.

With CS (Chip-Select) the corresponding peripheral device is selected by the LCD Controller. This pin is mostly active-low. In the unselected state the SDO lines are hi-impedance and therefore inactive. The clock line SCL is brought to the device whether it is selected or not. The clock serves as synchronization of the data communication.

The chip select signal CS is optional for a single device system, because you could tie the CS input at the LCD Module low, if the other lines are dedicated to SPI use. This is sometimes called a 3 Wire SPI Interface.

SPI Data transmissions usually involve two shift registers. Most display module applications normally use 8-bit words. However, different size words, such as 12 bit, are also used. By convention, the most significant bit is shifted out of one shift register while the least significant bit is shifted in. The word is then written into memory if the CS (chip-select) is low (active). If not, the data is ignored.

Since the SPI interface protocol is a de facto standard, many variations of the standard protocol are used. For instance, chip manufacturers may use some of the parallel data lines when configuring the IC driver chip for serial communication. chip manufacturers may use some of the parallel data lines when configuring the IC driver chip for serial communication.

I2C uses only two bi-directional lines, Serial Data Line (SDA) and Serial Clock (SCL), which are both typically pulled up with resistors. Typical voltages used are +5 V or +3.3 V. One of the strengths of the I2C interface is that a micro can control multiple devices with just the two I/O pins and software. Because of the I2C design, it is only half-duplex. The interface generally transmits 8-bit words, sending the most significant bit first.