1)C taboo absolute positioning. It is often seen as a beginner's request to use _at_, which is a fallacy, treating C as an ASM. The positioning of variables in C is a matter for the compiler. As soon as a beginner defines the scope of variables and variables, the compiler assigns a fixed address to this variable. How to get the address of this variable? Use pointers. For example, unsigned char data x; after the x address is & x, as long as you look at this parameter, you can know the specific address in the program. So when you first see people who want to use absolute positioning, the first impression is: This is probably a beginner.
3) Using C's main program structure: #include void main(void) { while(1); } This is a minimally successful C program, including the header file and the program body. Glossary of the header file: Reference to an external resource file. This file contains hardware information and descriptions of available functions and variables provided by external modules. Reg52.h can be opened in text mode. Under careful study, there will be some experience in writing programs.
4) This constitutes a C project in C, commonly used projects to manage. Projects are generally divided into two large blocks: C file blocks and header file blocks. We often write different functions in different C files, manage them according to the project, and finally connect all the files so that we can get HEX files or BIN files that can be burned. Of these C files, there are only one C file that includes the main() function, and 3). Use header files to connect different Cs to each other. A C file basically corresponds to an H header file. This H file contains the variables and functions that can be provided to the outside world in this C file. There is no issue file that is listed in the H file. Internal functions and variables, external C cannot be used. Example: aC: unsigned char i; unsigned char mWork; void Test1(void) { mWork++; } void Test2(void) { i++; } ah file: extern unsigned char i; extern void Test1(void); This main program Mc Medium: #include/*C compiler internal H file, use <>*/ #i nclude "ah" /* custom H file, generally "" * / void main (void) { Test1 () ; /* Use functions in the ac module file */ while(1){ i++; /* use a variable in the ac module file */ } }
5) The 51 family cores are all based on the 8031, many of which are expanded on this core, and some put the program memory on the inside: 89c(S)51.., and some add RAM:89c(S)52.. Some have added some dedicated hardware 80C552... and some have changed the clock timing W77E58.... The AT89X series of ATMEL Corporation, P87 (89)x of PHILIPS, w77 (78)x series of Taiwan WINBOND, and C8051Fx series of Cygnal are now commonly used on the market.
6) 51 C microcontroller structure description here does not speak 51 specific structure, but to guide beginners to quickly understand the physical structure of the 51 microcontroller. The address names of registers and IOs and other hardware devices can be found in the corresponding C header file. 51 is reg51.h, 52 is reg52.h, and so on. For example, winbond 78E58 is w78e58.h These H files are described in: srf, which defines an 8-bit device. Srf16, defines a 16-bit device. Sbit, defines a bit of equipment. After these statements are defined, these hardware devices can be used as assembly in C, which is a special place for SCM applications than standard C. Other differences are rare.
7) The difference between data, idata, xdata, and pdata in the 51 series data: Fixed refers to 128 RAMs in front of 0x00-0x7f, which can be directly read and written by acc, and the fastest is the code generated. Idata: Fixed 256 RAMs in front of 0x00-0xff, where the first 128 and the data of 128 are exactly the same, just because the access method is different. Idata is accessed using pointers like C. The statements in the assembly are: mox ACC, @Rx. (Not important to add: iData does pointer-based access in c is very good) xdata: External expansion RAM, generally refers to the external 0x0000-0xffff space, with DPTR access. Pdata: The lower 256 bytes of the external expansion RAM, the address reads and writes on A0-A7, reads and writes with movx ACC, @Rx. This is rather special, and C51 seems to have this BUG, ​​it is recommended to use less. But there are also his advantages. The specific usage is an intermediate one. I will not mention it here.
8) The function of startup.a51 is the same as compilation. The initialization of variables and arrays defined in C is performed in startup.a51. If you define global variables with values, such as unsigned char data xxx=100;, That startup.a51 will have the relevant assignment. If there is no =100, startup.a51 will clear it. (startup.a51 == initialization of variable). After these initializations are completed, the SP pointer is also set. For non-variable areas, such as the stack area, there will be no assignment or zeroing action. Some people like to change startup.a51, in order to meet some of their own hobbies, this is unnecessary, it may be wrong. For example, if you want to save some variables when power-off protection, it is a stupid way to change startup.a51 to achieve. Actually, as long as you use the characteristics of non-variable areas, define a pointer variable to point to the lower part of the stack: 0xff. Why do you want to change? You can say this: You don't need to change startup.a51 at any time, if you understand its characteristics.
Provide you with the supply of pulse oximeter finger. to help you safely get back to your daily routine.
With more than 15+ yrs rich MFG experience, you can definitely trust in and cooperate with.
Our strict quality control protocol thoroughly vets every aspect of production, storage, and shipments all the way way to our end customers.
Our products include pulse Oximeter Finger, Forehead Thermometer, Automatic foam soap dispenser, etc.
Pulse Oximeter Manufacturers, oxygen saturation, oximetry
TOPNOTCH INTERNATIONAL GROUP LIMITED , https://www.micbluetooth.com