tft display repurpose manufacturer
I found the TFT screen and Uno on Banggood.com about a month ago and over the weekend I was messing with the pair and found the tftbmp draw code in the demo.. I extended it with the ability to read any bmp file on the SD card.. so all you do is put your bitmaps on the SD and plug it in.. Having to add/edit/recompile/reload the Uno everytime is BS... Here is my code:
The traditional mechanical instrument lacks the ability to satisfy the market with characters of favorable compatibility, easy upgrading, and fashion. Thus the design of a TFT-LCD (thin film transistor-liquid crystal display) based automobile instrument is carried out. With a 7-inch TFT-LCD and the 32-bit microcontroller MB91F599, the instrument could process various information generated by other electronic control units (ECUs) of a vehicle and display valuable driving parameters on the 7-inch TFT-LCD. The function of aided parking is also provided by the instrument. Basic principles to be obeyed in circuits designing under on-board environment are first pointed out. Then the paper analyzes the signals processed in the automobile
instrument and gives an introduction to the sampling circuits and interfaces related to these signals. Following this is the functional categorizing of the circuit modules, such as video buffer circuit, CAN bus interface circuit, and TFT-LCD drive circuit. Additionally, the external EEPROM stores information of the vehicle for history data query, and the external FLASH enables the display of high quality figures. On the whole, the accomplished automobile instrument meets the requirements of automobile instrument markets with its characters of low cost, favorable compatibility, friendly interfaces, and easy upgrading.
As an essential human-machine interface, the automobile instrument provides the drivers with important information of the vehicle. It is supposed to process various information generated by other ECUs and display important driving parameters in time, only in which way can driving safety be secured. However, the traditional mechanical automobile instrument is incompetent to provide all important information of the vehicle. Besides, the traditional instrument meets great challenge with the development of microelectronic technology, advanced materials, and the transformation of drivers’ aesthetics [1, 2]. Moreover, the parking of the vehicle is also a problem puzzling many new drivers. Given this, traditional instruments should be upgraded in terms of driving safety, cost, and fashion.
The digital instrument has functions of vehicle information displaying, chord alarming, rear video aided parking, LED indicating, step-motor based pointing, and data storage. The instrument adopts dedicated microcontroller MB91F599, a 7-inch LCD, and two step-motors to substitute for the traditional instrument. All the information generated by other ECUs can be acquired via not only the sample circuits but also the CAN bus.
The CAN bus interface and the 7-inch TFT-LCD make it more convenient to upgrade the instrument without changing the hardware. If the software needs to be upgraded, we need not bother to take the instrument down and program the MCU. Instead, we can upgrade the instrument via the vehicle’s CAN network without taking the instrument down, which makes the upgrading more convenient. Most of the information from other ECUs can be transmitted via the CAN bus; so, we do not have to change the hardware circuits if some of the ECUs’ signals are changed in different applications. Besides, since most of the driving parameters are displayed on the TFT-LCD, and the graphical user interface can be designed with great flexibility by programming, only the software needs to be revised to meet different requirements of what kind of driving parameters to display and so forth. These characters, together with the reserved interfaces, enhance the instrument’s compatibility in different applications.
On the one hand, there are some automobile instruments which adopt 8-bit MCUs or 16-bit MCUs which have limited peripherals, so it is difficult for them to meet some requirements such as rearview video and high real-time data processing performance. And many extra components are needed if the designer wants to accomplish some functions such as video input. On the other hand, there are some advanced automobile instruments which adopt high performance MCUs (such as i.MX 53, MPC5121e, and MPC5123) and run Linux on them. They even use larger TFT-LCDs (such as the 12.3-inch TFT-LCD with a resolution of 1280 × 480 pixels) to display driving parameters. These automobile instruments show higher performances than the instrument in this paper. However, they are more expensive than this automobile. This instrument is able to provide almost all the functions of the advanced automobile instrument with a lower cost.
Respecting the above mentioned factors, we finally chose the MB91F599 produced by Fujitsu as the microcontroller. The MB91F599 is particularly well-suited for use in automotive instrument clusters using color displays to generate flexible driver interfaces. It integrates a high performance FR81S CPU core which offers the highest CPU performance level in the industry. Besides, it has a graphics display controller with strong sprite functionality, rendering engine, and external video capture capabilities. These greatly reduce the need for extra components and enhance the stability of the system. The rendering engine can operate in combination with the video capture to enable image manipulation. Overlaid graphics such as needles or parking guidelines can be rendered in conjunction with captured video, which helps to accomplish the aided parking. What is more, multiple built-in regulators and a flexible standby mode enable the MB91F599 to operate with low power consumption.
Here, the sync signal is not present, so the clamp level is controlled by the clamp level output pin of the microcontroller, which is called “keyed clamp” [5]. The graphics display controller of the microcontroller let the clamp level output occur in coincidence with the sync pulse; that is, the clamp level output occurs during the sync tip in Figure 6, thus we get the “sync tip clamp” [5].
Since the FLASH size of the microcontroller is only 1 MB which is limited for the storage of pictures displayed on the LCD, external FLASH is needed to store different kinds of meaningful pictures such as the background of the dial. Two S29GL256N chips with a memory capacity of 256 Mb are chosen for picture data storage for their high performance and low power consumption. The application circuits of the chips are provided in their datasheets, so it is unnecessary to go into the details of them here.
The 7-inch TFT-LCD has a resolution of pixels and supports the 24-bit for three RGB colors. The interface of the 60-pin TFT-LCD can be categorized into data interface, control interface, bias voltage interface, and gamma correction interface.
The data interface supports the parallel data transmitting of 18-bit (6 bits per channel) for three RGB colors. Thus, a range of colors can be generated. The control interface consists of a “horizontal synchronization” which indicates the start of every scan line, a “vertical synchronization” which indicates the start of a new field, and a “pixel clock.” This part is controlled by the graphics display controller which is integrated in the MB91F599. We just need to connect the pins of the LCD to those of the microcontroller correspondingly.
Bias voltages are used to drive the liquid crystal molecules in an alternating form. The compact LCD bias IC TPS65150 provides all bias voltages required by the 7-inch TFT-LCD. The detailed circuit is also provided in the datasheet of TPS65150.
The greatest effect of gamma on the representations of colors is a change in overall brightness. Almost every LCD monitor has an intensity to voltage response curve which is not a linear function. So if the LCD receives a message that a certain pixel should have certain intensity, it will actually display a pixel which has intensity not equal to the certain one. Then the brightness of the picture will be affected. Therefore, gamma correction is needed. Several approaches to gamma correction are discussed in [20–22]. For this specific 7-inch LCD, only the producer knows the relationship between the voltage sent to the LCD and the intensity it produces. The signal can be corrected according to the datasheet of the LCD before it gets to the monitor. According to the datasheet, ten gamma correction voltages are needed. These voltages can be got from a resistive subdivision circuit.
The main task for the program is to calculate the driving parameters of the vehicle and display them on the TFT-LCD. The calculation is triggered by the input signals via the sampling circuits or the CAN bus. The main program flow chart of the system is shown in Figure 10.
The design scheme of a TFT-LCD based automobile instrument is carried out form aspects of both the hardware and the main program flow chart. The MB91F599 simplifies the peripheral circuits with its rich on-chip resources and shows high performance in real-time data processing. The automobile instrument is capable of displaying the velocity of the vehicle, the engine speed, the cooling water temperature, the oil pressure, the fuel volume, the air pressure, and other information on the TFT-LCD, which contributes a lot to driving safety and satisfies drivers’ aesthetics. Besides, the rearview video makes the parking and backing easier and safer for the driver. Moreover, the CAN bus interface and TFT-LCD make it easier for the upgrading of the instrument without changing the hardware, thus saving the cost.