void curve(unsigned char xlable,unsigned char ylable,bit dot)
{
unsigned char H[1]={0};//Read RAM register
unsigned char L[1]={0};
unsigned char xbuf;
w_com(0x01);
w_com(0x34);
w_com(0x36); //Function setting: send 8 bits of data at a time, extended instruction set
xlable=xlable+xoffset; //find the relative zero point
ylable=ylable+yoffset;
if(xlable<0)xlable=-1;//out of boundary processingif(
ylable<0)ylable=0;
if(ylable>64)ylable=65;
xbuf=xlable%16;
xlable=xlable/16;
if(ylable>32)//upper half screen
{
ylable=64-ylable;//switch upper and lower screensxbuf
=15-xbuf;//x coordinate returnw_com
(0x80|ylable); //input vertical addressw_com
(0x80|xlable); //input horizontal addressread_RAM
();//shieldif
(xbuf>7)
{
if(dot==0)
H[0]=read_RAM()&(~(1<
[0]=read_RAM()|1<
}
else
{
H[0]=read_RAM();//Insert dots, dots that need to be inserted
if(dot==0)
L[0]=read_RAM()&(~(1<
L[0]=read_RAM()|1<
w_com(0x80|ylable); //Input vertical address
w_com(0x80|xlable); //Input horizontal address
w_byte(H[0]);
w_byte(L[0]);
}
else //Lower half screen
{
ylable=32-ylable;
xbuf=15-xbuf;//x coordinate returns to position
w_com(0x80|ylable); //Input vertical address
w_com(0x88|xlable); //Input horizontal address
read_RAM();//Shield
if(xbuf>7)
{
if(dot==0)
H[0]=read_RAM()&(~(1<
H[0]=read_RAM()|1<
}
else
{
H[0]=read_RAM();//Insert dot, the dot that needs to be marked
if(dot==0)
L[0]=read_RAM()&(~(1<
L[0]=read_RAM()|1<
w_com(0x80|ylable); //Input vertical address
w_com(0x88|xlable); //Input horizontal address
w_byte(H[0]);
w_byte(L[0]);
}
}
//Clear screen
void BMP_clear( void )
{
unsigned char i,j;unsigned char L[1]={0};
w_com(0x34); //8Bit extended instruction set, even if it is 36H, you have to write it twice
w_com(0x36); //Drawing ON, in the basic instruction set, 36H cannot turn on drawing
for(i=0;i<32;i++) //12864 is actually 256x32
{
w_com(0x80|i); //Row position
w_com(0x80); //Column position
for(j=0;j<32;j++) //256/8=32 byte
w_byte(L[0]);
}
}
Previous article:Stepper Motor Program
Next article:The microcontroller sends data to the PC
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- EEWORLD University ---- Getting Started Video of Gizwits Gokit3
- Read the information and fill out the questionnaire to win prizes: Keysight Technologies' automotive Ethernet test solution and IXIA automotive Ethernet technology white paper
- DSP generates hex file and bin file method
- [RT-Thread Reading Notes] Threads and Critical Protection
- Independent buttons control the addition and subtraction of the digital tube. Then reduce it to 0 and press it again. The first light tube will turn on.
- Basic features of TI's C54xDSP
- The simulation of multiplication floating point IP in quartus, has anyone used it?
- LED downlight replacement dimmable power supply
- There are some problems with the PFC circuit power-on process. Please consult
- LM358 audio amplifier circuit (loudspeaker)