Application of ultra-thin display OLED in gyrotheodolite
In terms of connection with the computer, the interface of SSD1303, including data input buffer, data output latch, instruction register and decoder, busy state trigger and timing control circuit, has a high-performance interface control circuit. The computer can access SSD1303 at any time without judging its current state. Unlike the T6963C controller used before, it is not so important for SSD1303 to judge the busy state in operation, because the interface of SSD1303 can receive the computer's access in a timely manner. It is only when the computer transmits a large amount of data to the display memory that conflicts with the transmission of display data from the control unit to the drive unit, that "snowflakes" will appear on the display screen. However, due to the short interval time and the visual inertia of the human eye, the "snowflakes" phenomenon cannot be seen. Sometimes when the busy flag is judged and the display data is transmitted, the busy flag has disappeared. It is precisely because of these that the operation process of computer access to SSD1303 is very simple. But it should be noted that there are several sets of timing circuits in the interface control circuit of SSD1303 to adapt to the requirements of different computer operation timings. The setting terminals of the timing adapter circuit are BS0, BS1, and BS2. In P09703, select different connections for BS1 and BS2 to determine whether to select Intel8080 timing or M6800 timing. In P09702, since there is no selection for BS1 and BS2, it has been set to Intel8080 timing at the factory, so the following program is for Intel8080 timing.
#define AD0_PIN_NUM8 //8-bit data bus
#define DC_PIN_NUM 5 //P0.5 data/command control bit, low level - command operation, high level - data operation
#define WR_PIN_NUM 6 //P0.6 write data/command control bit, write when high level changes to low level
#define RD_PIN_NUM 7 //P0.7 read data/command control bit, low level valid
#define CS_PIN_NUM 16 //P0.16 enable bit, low level valid
void ExBusInit(void)//Initialize P09702OLED display bus
{uint32 temp;
// Set pin connection module: DC_PIN_NUM, WR_PIN_NUM, RD_PIN_NUM, CS_PIN_NUM, AD0_PIN_NUM are GPIO
PINSEL0 &= ~(3 << (2 * DC_PIN_NUM));
PINSEL0 &= ~(3 << (2 * WR_PIN_NUM));
PINSEL0 &= ~(3 << (2 * RD_PIN_NUM));
PINSEL0 &= ~(3 << (2 * (CS_PIN_NUM-16)));
for (temp= AD0_PIN_NUM; temp < 16; temp++){
PINSEL0 &= ~(3 << (2 *temp));
}
// Set the pin direction, all related pins are output
temp = 0xff << AD0_PIN_NUM;
IODIR = IODIR | temp;
IODIR = IODIR | (1 << WR_PIN_NUM) | (1 << RD_PIN_NUM) | (1 << DC_PIN_NUM) | (1 << CS_PIN_NUM);
// Set the pin output value, except for CS_PIN_NUM output is low level, the rest are high level
IOCLR = (1 << CS_PIN_NUM);
IOSET = (1 << DC_PIN_NUM) | (1 << WR_PIN_NUM) | (1 << RD_PIN_NUM);
temp = 0xff << AD0_PIN_NUM;
IOSET = IOSET | temp;
}
uint8 ReadData(void) //Read data from P09702OLED display
{ uint32 temp, temp1;
temp1 = IODIR;
IODIR = temp1 & (~(0xff << AD0_PIN_NUM)); // Set AD0_PIN_NUM as input
IOCLR = 1 << RD_PIN_NUM;
temp = IOPIN;
IOSET = 1 << RD_PIN_NUM;
IODIR = temp1 | (0xff << AD0_PIN_NUM);
temp = temp >> AD0_PIN_NUM;
return (uint8) temp;
}
void WriteCommand(uint8 Data) // Write command code to P09702OLED display
{ IOCLR = 1 << DC_PIN_NUM;
IOSET = Data << AD0_PIN_NUM;
Data = ~Data;
IOCLR = Data << AD0_PIN_NUM;
IOCLR = 1 << WR_PIN_NUM;
IOSET = 1 << WR_PIN_NUM;
IOSET = 1 << DC_PIN_NUM;
}
void WriteData(uint8 Data) //Write parameters and data to P09702OLED display
{ IOSET = Data << AD0_PIN_NUM;
Data = ~Data;
IOCLR = Data << AD0_PIN_NUM;
IOCLR = 1 << WR_PIN_NUM;
IOSET = 1 << WR_PIN_NUM;
}
main(){ int j, i;
ExBusInit(); //Initialize P09702OLED display bus
InitOled();//初始化P09702OLED显示屏,由于SSD1303软件控制指令非常丰富,该函数内容较长,在这里不做描述,详情见P09702应用笔记,这里要说明的是:InitOled()中的comm_out2()函数用WriteCommand()函数替代
for(i=0;i<8;i++)
WriteCommand (0xB0+i);//设置显示位置—行
WriteCommand (0x02); //设置显示位置—列低地址
WriteCommand (0x10); //设置显示位置—列高地址
for(j=0;j<128;j++)
WriteData((0xFF);//屏幕显示,全亮
}
}
上述仅是对P09702基本的应用,有关更多的SSD1303软件控制指令,通过该文介绍的方法,并结合SSD1303的指令集[4],读者能够对P09702应用自如。
参考文献
1 王鑫,周军,周德俭,等. 有机电致发光屏显示模块研究. 液晶与显示,2003;18(2)
2 黄锡珉. 有源矩阵OLED. 液晶与显示,2003;18(3)
3 周立功 等编著 深入浅出ARM7.北京:北京航空航天大学出版社,2005
4 SSD1303 Advance Information 132 x 64 Dot Matrix OLED/PLED Segment/Common Driver with Controller http://www.solomon-systech.com
Previous article:Intelligent sensors and their application in high-speed locomotive condition monitoring
Next article:Application of non-contact sensors in discrete manufacturing
Recommended ReadingLatest update time:2024-11-17 03:42
- Popular Resources
- Popular amplifiers
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Milestone! SmartSens CMOS image sensor chip shipments exceed 100 million units in a single month!
- Taishi Micro released the ultra-high integration automotive touch chip TCAE10
- The first of its kind in the world: a high-spectral real-time imaging device with 100 channels and 1 million pixels independently developed by Chinese scientists
- Melexis Launches Breakthrough Arcminaxis™ Position Sensing Technology and Products for Robotic Joints
- ams and OSRAM held a roundtable forum at the China Development Center: Close to local customer needs, leading the new direction of the intelligent era
- Optimizing Vision System Power Consumption Using Wake-on-Motion
- Infineon Technologies Expands Leading REAL3™ Time-of-Flight Portfolio with New Automotive-Qualified Laser Driver IC
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- A cross-era product, the Red Flag brand - do you have one or two memories that you can recall?
- Simple comparison of Cortex series M0-4
- Application of Aigtek power amplifier in multi-source excitation research of mechanical plate structure damage
- Ultra-low power Bluetooth controlled, cost-effective, dimmable smart lighting solution
- EEWORLD University Hall----Live Reply: TI CapTIvate - Getting Started with MSP430 Capacitive Touch Development
- ADS Application Detailed Explanation - RF Circuit Design and Simulation
- December 26, let’s watch the sun together
- IGBT drive technical data
- Learn circuit simulation Multisim and circuit design Protel technology from scratch
- nRF51822 Part 2