There are 6 pins, one pin is connected to DS18B20 to measure the temperature, two pins are connected to the IIC adapter board of pcf8574 to drive LCD1602, and three pins are connected to DS1302 to take the clock.
All right! 128 bytes of on-chip data storage area ram is exhausted. Keil compiles and directly informs:
error l107: address space overflow
Reason:
LCD1602 custom characters are placed in the RAM area
unsigned char chr_nian[]={0x08,0x1F,0x02,0x0F,0x0A,0x1F,0x02,0x00};// Year
unsigned char Chr_yue[]={0x0F,0x09,0x0F,0x09,0x0F,0x09,0x11,0x00};// Month
unsigned char Chr_ri[]={0x1E,0x12,0x12,0x1E,0x12,0x12,0x1E,0x00};// Day
unsigned char # Chr_du[]={0x10,0x06,0x09,0x08,0x08,0x09,0x06,0x00};// Degrees Celsius
consumes too much RAM capacity
Solution: simply add “code” and transfer all to the program storage area. Equivalent to the assembled DB pseudo instruction
unsigned char code Chr_nian[]={0x08,0x1F,0x02,0x0F,0x0A,0x1F,0x02,0x00};// Year
unsigned char code Chr_yue[]={0x0F,0x09,0x0F,0x09,0x0F,0x09,0x11,0x00};// Month
unsigned char code Chr_ri[]={0x1E,0x12,0x12,0x1E,0x12,0x12,0x1E,0x00};// Day
unsigned char code Chr_du[]={0x10,0x06,0x09,0x08,0x08,0x09,0x06,0x00};// Degrees Celsius
Read More:
- How to Solve Error: Unsupported field: HourOfDay
- [Solved] Keil C Error: error C141: syntax error near ‘=‘, expected ‘__asm‘
- Keil’s duplicate definition problem: Error: L6200E: Symbol F6x8 multiply defined
- How to Solve Error: “initializer element is not constant”
- Xilinx Vitis Error Launching Program: Memory write error MMU section translation fault
- [Solved] PCL Compile Error: undefined reference to `pcl::PCLBase<pcl::PointXYZRGBA>:: XXX
- [Solved] QT Warning: Slots named on_foo_bar are error prone
- [Error] invalid operands to binary ^ (have ‘double‘ and ‘float‘)
- How to Solve OpenCV CVUI Error: LINK2019
- [Solved] C++ Error: Undefined symbols for architecture x86_64:
- How to Solve Fopen bus error
- [Solved] C++ Error: terminate called after throwing an instance of ‘char const‘
- [Solved] Rtthread DCM component dcm_cache_save interface Error: mkdir:/data failed
- Sqoop Error: Can‘t parse input data: ‘\N‘ [How to Solve]
- Android 10 open file exception open failed: eacces (permission denied) android:requestLegacyExternalStorage= “true“
- C++ Compile Error: error: invalid conversion from ‘void*‘ to ‘char*‘ [-fpermissive]
- [Solved] ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- keil error #1-D: last line of file ends without a newline
- [Solved] Error while deploying HAP reported by Hongmeng deveco studio
- How to Solve error: command ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\nvcc.exe‘ failed