Non-Bus TypeThe display procedure of the 1602 LCD of 51:
#include<reg52.h><intrins.h> uchar unsigned char uint unsigned int===P1^=P1^=P1^ delay((x=z;x>;x--(y=;y>;y--===========(num=;num<;num+++); (num=;num<;num+++++==(
The schematic diagram of the Board was drawn by myself at that time, and it was not found by visual testing. T. But you can see something through the program ~
This was a previous program. At that time, it was used for infrared ranging. the test data was displayed after the adswitch, And I deleted all the AD parts.
Obviously, non-bus-type 1602 programs are controlled completely according to the high and low levels in the 1602 Data Manual and write a lot of code.
Bus Type1602 display program:
#include <AT89X51.H><absacc.h> LCD_COM XBYTE[0XD000] LCD_Data XBYTE[0xD001](i=;i<=;i++(j=;j<=;j++===============(
In the twinkling of an eye, the program is indeed much less. If you want to write data, you can add data in front of while (1.
LCD_Data=;
First, the schematic of the Board:
LCD _COM XBYTE [0XD000] LCD _Data XBYTE [0xD001]
These two sentences are now.
For the rest, you can directly look at the main () function, which is also written based on 1602 of the data, but it is provided directly. It is not written based on the high and low levels to determine the delay time, which saves a lot of trouble.
Although it is just a brief description, but according to the bus type to design the circuit diagram, to write the program, really good. Of course, there is also a line of CAN bus, IIC, SPI, and dala, haha. Let's talk about the bus. Three bus is short for ADC, which always reminds me of the ADC chip. A is the address bus, D is the data bus, and C is the control bus, it controls the off-chip ROM, RAM, and I/O. This semester, I learned the single-chip microcomputer course. I have never been on the microcomputer principle before. The teacher has finished the course in a few lessons. It is really wonderful. At that time, I also said that it would be easy to develop ARM chips later if I understood the bus type. Alas, I still have a long way to go.
Reprinted please indicate the source: http://www.cnblogs.com/yydcdut/p/3480811.html