- Green versionCheck
- Green versionCheck
- Green versionCheck
STC does not have an ISP function. The previous STC chip would give the address of the user programming area, but later the hardware used a similar shielding method to prohibit user self-programming. If you want to use the ISP function, you must use STC's own programmer.
Although STC no longer has the ISP function, they used IAP instead. STC has a dedicated IAP function chip. In fact, it uses a large EEPROM, which is divided into three areas. The first area is the user program area, and the second area is the IAP program migration area. Area, area three is the new program area.
These three areas store independent and complete programs. When the ISP/IAP function is needed, use the program code function stored in the second area to erase the first area and write the new code in the third area. After reset, the microcontroller returns to area one, which means the code upgrade function is completed.
These three areas of IAP are user-definable. You can check the data sheet of the STC_IAP chip and you will understand it after thinking about it.
1. strcpy: string copy. For example: assuming str1 and str2 are string pointers, strcpy(str1,"asdg") or strcpy(str1, str2) can be used. The usage is to copy the latter to the former. Please note The former cannot be a constant pointer, such as "sdffsd".
2. strcmp: The usage is not as good as the above, but there is no constant limit. Its function is to compare the sizes of two strings. If it is greater, it returns a positive number, if it is less, it returns a negative number. If it is equal, it returns 0.
3. Both are included in the string.h header file
4. In addition, there are more useful functions such as strstr and strcat. Find more string codes and look at them, and then find some questions and write them down and you will understand.
it works
it works
it works