├── .gitignore ├── README.md ├── 工程模版(库函数+SmallRTOS) ├── FAQ.TXT ├── KEILC51 │ ├── OS_CPU_A.ASM │ └── OS_CPU_C.C ├── LICENSE.TXT ├── LIST.TXT ├── Lib │ ├── inc │ │ ├── STC15Fxxxx.H │ │ ├── STC15xx_ADC.h │ │ ├── STC15xx_EEPROM.h │ │ ├── STC15xx_Exti.h │ │ ├── STC15xx_GPIO.h │ │ ├── STC15xx_PCA.h │ │ ├── STC15xx_USART1.h │ │ ├── STC15xx_config.h │ │ ├── STC15xx_delay.h │ │ ├── STC15xx_oft_uart.h │ │ └── STC15xx_timer.h │ └── src │ │ ├── STC15xx_ADC.c │ │ ├── STC15xx_EEPROM.c │ │ ├── STC15xx_Exti.c │ │ ├── STC15xx_GPIO.c │ │ ├── STC15xx_PCA.c │ │ ├── STC15xx_Soft_UART.c │ │ ├── STC15xx_USART1.C │ │ ├── STC15xx_delay.c │ │ └── STC15xx_timer.c ├── MANUAL.TXT ├── MyDriver │ ├── GPIO.c │ ├── GPIO.h │ ├── UART.c │ ├── UART.h │ ├── led.c │ └── led.h ├── OS │ ├── OS.H │ ├── OS_CORE.C │ ├── OS_Q.C │ ├── OS_Q.H │ ├── OS_SEM.C │ └── OS_SEM.H ├── README.TXT ├── USER │ ├── CONFIG.H │ ├── OS_CFG.H │ ├── OS_CPU.H │ ├── main.c │ ├── stc15xx_it.c │ ├── stc15xx_it.h │ └── test.uvproj └── h │ ├── CONFIG.H │ ├── OS_CFG.H │ └── OS_CPU.H └── 工程模版(库函数+UART) ├── Lib ├── inc │ ├── STC15Fxxxx.H │ ├── STC15xx_ADC.h │ ├── STC15xx_EEPROM.h │ ├── STC15xx_Exti.h │ ├── STC15xx_GPIO.h │ ├── STC15xx_PCA.h │ ├── STC15xx_USART1.h │ ├── STC15xx_config.h │ ├── STC15xx_delay.h │ ├── STC15xx_oft_uart.h │ └── STC15xx_timer.h └── src │ ├── STC15xx_ADC.c │ ├── STC15xx_EEPROM.c │ ├── STC15xx_Exti.c │ ├── STC15xx_GPIO.c │ ├── STC15xx_PCA.c │ ├── STC15xx_Soft_UART.c │ ├── STC15xx_USART1.C │ ├── STC15xx_delay.c │ └── STC15xx_timer.c ├── MyDriver ├── GPIO.c ├── GPIO.h ├── UART.c ├── UART.h ├── led.c └── led.h ├── README.txt └── USER ├── main.c ├── stc15xx_it.c ├── stc15xx_it.h └── test.uvproj /.gitignore: -------------------------------------------------------------------------------- 1 | *.uvgui.* 2 | *.uvopt 3 | *.uvproj 4 | *.bak 5 | .vscode/ 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # STC15_LIB 2 | 3 | 用于STC15系列单片机,用STM32库的形式组织,让官方库易于使用。 4 | -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/FAQ.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/FAQ.TXT -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/KEILC51/OS_CPU_A.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/KEILC51/OS_CPU_A.ASM -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/KEILC51/OS_CPU_C.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/KEILC51/OS_CPU_C.C -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/LICENSE.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/LICENSE.TXT -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/LIST.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/LIST.TXT -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15Fxxxx.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15Fxxxx.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_ADC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_ADC.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_EEPROM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_EEPROM.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_Exti.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_Exti.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_GPIO.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_GPIO.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_PCA.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_PCA.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_USART1.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_USART1.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_config.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_delay.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __STC15xx_DELAY_H 3 | #define __STC15xx_DELAY_H 4 | 5 | #include "STC15xx_config.h" 6 | 7 | void delay_ms(unsigned int ms); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_oft_uart.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __STC15xx_SOFT_UART_H 3 | #define __STC15xx_SOFT_UART_H 4 | 5 | #include "STC15xx_config.h" 6 | 7 | void TxSend(u8 dat); 8 | void PrintString(unsigned char code *puts); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_timer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/inc/STC15xx_timer.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_ADC.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_ADC.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_EEPROM.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_EEPROM.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_Exti.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_Exti.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_GPIO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_GPIO.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_PCA.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_PCA.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_Soft_UART.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_Soft_UART.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_USART1.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_USART1.C -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_delay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_delay.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_timer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/Lib/src/STC15xx_timer.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/MANUAL.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/MANUAL.TXT -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/MyDriver/GPIO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/MyDriver/GPIO.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/MyDriver/GPIO.h: -------------------------------------------------------------------------------- 1 | #ifndef __GPIO_H 2 | #define __GPIO_H 3 | 4 | extern void GPIO_config(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/MyDriver/UART.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/MyDriver/UART.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/MyDriver/UART.h: -------------------------------------------------------------------------------- 1 | #ifndef __UART_H 2 | #define __UART_H 3 | 4 | void UART1_config(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/MyDriver/led.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/MyDriver/led.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/MyDriver/led.h: -------------------------------------------------------------------------------- 1 | #ifndef __LED_H__ 2 | #define __LED_H__ 3 | 4 | sbit led0=P0^0; 5 | sbit led1=P0^1; 6 | sbit led2=P0^2; 7 | sbit led3=P0^3; 8 | sbit led4=P0^4; 9 | sbit led5=P0^5; 10 | sbit led6=P0^6; 11 | sbit led7=P0^7; 12 | 13 | #define led_on(x) ledx=0 14 | #define led_off(x) ledx=1 15 | #endif -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/OS/OS.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/OS/OS.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/OS/OS_CORE.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/OS/OS_CORE.C -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/OS/OS_Q.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/OS/OS_Q.C -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/OS/OS_Q.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/OS/OS_Q.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/OS/OS_SEM.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/OS/OS_SEM.C -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/OS/OS_SEM.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/OS/OS_SEM.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/README.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/README.TXT -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/USER/CONFIG.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/USER/CONFIG.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/USER/OS_CFG.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/USER/OS_CFG.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/USER/OS_CPU.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/USER/OS_CPU.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/USER/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "STC15xx_config.h" 3 | #include "config.h" 4 | #include "UART.h" 5 | #include "GPIO.h" 6 | #include "led.h" 7 | 8 | void main(void) 9 | { 10 | TMOD = (TMOD & 0XF0) | 0X01; 11 | TL0 = 0x0; 12 | TH0 = 0x0; 13 | TR0 = 1; 14 | ET0 = 1; 15 | GPIO_config(); 16 | UART1_config(); 17 | EA = 1; 18 | printf("Hello World\n"); 19 | OSStart(); 20 | } 21 | 22 | void TaskA(void) 23 | { 24 | while (1) 25 | { 26 | led0=~led0; 27 | OSWait(K_TMO,5); 28 | printf("TaskA\n"); 29 | } 30 | } 31 | 32 | void TaskB(void) 33 | { 34 | while (1) 35 | { 36 | led1=~led1; 37 | OSWait(K_TMO,10); 38 | printf("TaskB\n"); 39 | } 40 | } 41 | 42 | void TaskC(void) 43 | { 44 | while (1) 45 | { 46 | led2=~led2; 47 | OSWait(K_TMO,15); 48 | printf("TaskC\n"); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/USER/stc15xx_it.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/USER/stc15xx_it.c -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/USER/stc15xx_it.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/USER/stc15xx_it.h -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/USER/test.uvproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.1 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | 9 | 10 | Target 1 11 | 0x0 12 | MCS-51 13 | 14 | 15 | 8052AH 16 | Intel 17 | IRAM(0-0xFF) IROM(0-0x1FFF) CLOCK(12000000) 18 | 19 | "LIB\STARTUP.A51" ("Standard 8051 Startup Code") 20 | 21 | 2998 22 | REG52.H 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 0 34 | 0 35 | 36 | 37 | 38 | 39 | 40 | 41 | 0 42 | 0 43 | 0 44 | 0 45 | 1 46 | 47 | .\list\ 48 | test 49 | 1 50 | 0 51 | 1 52 | 1 53 | 1 54 | .\list\ 55 | 0 56 | 0 57 | 0 58 | 59 | 0 60 | 0 61 | 62 | 63 | 0 64 | 0 65 | 0 66 | 0 67 | 68 | 69 | 0 70 | 0 71 | 72 | 73 | 0 74 | 0 75 | 76 | 77 | 0 78 | 0 79 | 80 | 81 | 0 82 | 0 83 | 84 | 0 85 | 86 | 87 | 88 | 0 89 | 0 90 | 0 91 | 0 92 | 0 93 | 1 94 | 0 95 | 0 96 | 0 97 | 0 98 | 3 99 | 100 | 101 | 1 102 | 65535 103 | 104 | 105 | S8051.DLL 106 | 107 | DP51.DLL 108 | -p52 109 | S8051.DLL 110 | 111 | TP51.DLL 112 | -p52 113 | 114 | 115 | 116 | 0 117 | 0 118 | 0 119 | 0 120 | 16 121 | 122 | 123 | 1 124 | 1 125 | 1 126 | 1 127 | 1 128 | 1 129 | 1 130 | 1 131 | 0 132 | 133 | 134 | 0 135 | 0 136 | 0 137 | 0 138 | 0 139 | 0 140 | 0 141 | 0 142 | 1 143 | 1 144 | 1 145 | 146 | 0 147 | 0 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 1 167 | 0 168 | 0 169 | 0 170 | 0 171 | -1 172 | 173 | 0 174 | 175 | 176 | 177 | 178 | 179 | 180 | 0 181 | 182 | 183 | 184 | 2 185 | 0 186 | 2 187 | 0 188 | 0 189 | 0 190 | 0 191 | 0 192 | 0 193 | 1 194 | 0 195 | 1 196 | 0 197 | 0 198 | 0 199 | 0 200 | 0 201 | 0 202 | 0 203 | 0 204 | 0 205 | 0 206 | 0 207 | 0 208 | 0 209 | 0 210 | 0 211 | 0 212 | 0 213 | 0 214 | 0 215 | 0 216 | 0 217 | 0 218 | 0 219 | 0 220 | 0 221 | 0 222 | 0 223 | 0 224 | 0 225 | 226 | 227 | 0 228 | 0x0 229 | 0xffff 230 | 231 | 232 | 0 233 | 0x0 234 | 0x0 235 | 236 | 237 | 0 238 | 0x0 239 | 0x0 240 | 241 | 242 | 0 243 | 0x0 244 | 0x0 245 | 246 | 247 | 0 248 | 0x0 249 | 0x0 250 | 251 | 252 | 0 253 | 0x0 254 | 0x0 255 | 256 | 257 | 0 258 | 0x0 259 | 0x0 260 | 261 | 262 | 0 263 | 0x0 264 | 0x0 265 | 266 | 267 | 1 268 | 0x0 269 | 0x2000 270 | 271 | 272 | 0 273 | 0x0 274 | 0x100 275 | 276 | 277 | 0 278 | 0x0 279 | 0x0 280 | 281 | 282 | 0 283 | 0x0 284 | 0x0 285 | 286 | 287 | 0 288 | 0x0 289 | 0x0 290 | 291 | 292 | 293 | 294 | 0 295 | 0 296 | 1 297 | 0 298 | 1 299 | 3 300 | 7 301 | 2 302 | 1 303 | 1 304 | 0 305 | 0 306 | 307 | 308 | 309 | 310 | ..\MyDriver;..\Lib\inc;..\Lib\src 311 | 312 | 313 | 314 | 0 315 | 1 316 | 0 317 | 0 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 0 327 | 0 328 | 1 329 | 0 330 | 2 331 | 1 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | os 361 | 362 | 363 | Os_core.c 364 | 1 365 | ..\os\Os_core.c 366 | 367 | 368 | Os_q.c 369 | 1 370 | ..\OS\Os_q.c 371 | 372 | 373 | Os_sem.c 374 | 1 375 | ..\OS\Os_sem.c 376 | 377 | 378 | 379 | 380 | user 381 | 382 | 383 | main.c 384 | 1 385 | .\main.c 386 | 387 | 388 | stc15xx_it.c 389 | 1 390 | .\stc15xx_it.c 391 | 392 | 393 | 394 | 395 | Target CPU 396 | 397 | 398 | Os_cpu_c.c 399 | 1 400 | ..\keilc51\Os_cpu_c.c 401 | 402 | 403 | Os_cpu_a.asm 404 | 2 405 | ..\keilc51\Os_cpu_a.asm 406 | 407 | 408 | 409 | 410 | Lib 411 | 412 | 413 | STC15xx_GPIO.c 414 | 1 415 | ..\Lib\src\STC15xx_GPIO.c 416 | 417 | 418 | STC15xx_USART1.C 419 | 1 420 | ..\Lib\src\STC15xx_USART1.C 421 | 422 | 423 | 424 | 425 | MyDriver 426 | 427 | 428 | UART.c 429 | 1 430 | ..\MyDriver\UART.c 431 | 432 | 433 | GPIO.c 434 | 1 435 | ..\MyDriver\GPIO.c 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 |
444 | -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/h/CONFIG.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/h/CONFIG.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/h/OS_CFG.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/h/OS_CFG.H -------------------------------------------------------------------------------- /工程模版(库函数+SmallRTOS)/h/OS_CPU.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+SmallRTOS)/h/OS_CPU.H -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15Fxxxx.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15Fxxxx.H -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_ADC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_ADC.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_EEPROM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_EEPROM.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_Exti.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_Exti.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_GPIO.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_GPIO.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_PCA.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_PCA.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_USART1.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_USART1.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_config.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_delay.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __STC15xx_DELAY_H 3 | #define __STC15xx_DELAY_H 4 | 5 | #include "STC15xx_config.h" 6 | 7 | void delay_ms(unsigned int ms); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_oft_uart.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __STC15xx_SOFT_UART_H 3 | #define __STC15xx_SOFT_UART_H 4 | 5 | #include "STC15xx_config.h" 6 | 7 | void TxSend(u8 dat); 8 | void PrintString(unsigned char code *puts); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/inc/STC15xx_timer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/inc/STC15xx_timer.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_ADC.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_ADC.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_EEPROM.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_EEPROM.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_Exti.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_Exti.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_GPIO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_GPIO.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_PCA.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_PCA.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_Soft_UART.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_Soft_UART.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_USART1.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_USART1.C -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_delay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_delay.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/Lib/src/STC15xx_timer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/Lib/src/STC15xx_timer.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/MyDriver/GPIO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/MyDriver/GPIO.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/MyDriver/GPIO.h: -------------------------------------------------------------------------------- 1 | #ifndef __GPIO_H 2 | #define __GPIO_H 3 | 4 | extern void GPIO_config(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /工程模版(库函数+UART)/MyDriver/UART.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/MyDriver/UART.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/MyDriver/UART.h: -------------------------------------------------------------------------------- 1 | #ifndef __UART_H 2 | #define __UART_H 3 | 4 | void UART1_config(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /工程模版(库函数+UART)/MyDriver/led.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/MyDriver/led.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/MyDriver/led.h: -------------------------------------------------------------------------------- 1 | #ifndef __LED_H__ 2 | #define __LED_H__ 3 | 4 | sbit led0=P0^0; 5 | sbit led1=P0^1; 6 | sbit led2=P0^2; 7 | sbit led3=P0^3; 8 | sbit led4=P0^4; 9 | sbit led5=P0^5; 10 | sbit led6=P0^6; 11 | sbit led7=P0^7; 12 | 13 | #define led_on(x) ledx=0 14 | #define led_off(x) ledx=1 15 | #endif -------------------------------------------------------------------------------- /工程模版(库函数+UART)/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/README.txt -------------------------------------------------------------------------------- /工程模版(库函数+UART)/USER/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "STC15xx_config.h" 3 | #include "UART.h" 4 | #include "GPIO.h" 5 | 6 | sbit led=P3^0; 7 | 8 | void main() 9 | { 10 | int x = 123; 11 | 12 | GPIO_config(); 13 | UART1_config(); 14 | EA = 1; 15 | 16 | printf("test....\n"); 17 | for(;;) 18 | { 19 | printf("x = %d\n", x); 20 | led=~led; 21 | delay_ms(500); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /工程模版(库函数+UART)/USER/stc15xx_it.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/USER/stc15xx_it.c -------------------------------------------------------------------------------- /工程模版(库函数+UART)/USER/stc15xx_it.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shuai132/STC15_LIB/624abaab6879f10da65d8f83cbe41dfec25533b0/工程模版(库函数+UART)/USER/stc15xx_it.h -------------------------------------------------------------------------------- /工程模版(库函数+UART)/USER/test.uvproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.1 5 | 6 |
### uVision Project, (C) Keil Software
7 | 8 | 9 | 10 | Target 1 11 | 0x0 12 | MCS-51 13 | 14 | 15 | 8052AH 16 | Intel 17 | IRAM(0-0xFF) IROM(0-0x1FFF) CLOCK(12000000) 18 | 19 | "LIB\STARTUP.A51" ("Standard 8051 Startup Code") 20 | 21 | 2998 22 | REG52.H 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 0 34 | 0 35 | d:\Keil_v5\C51\BIN\ 36 | 37 | 38 | 39 | 40 | 41 | 0 42 | 0 43 | 0 44 | 0 45 | 1 46 | 47 | ..\Output\ 48 | STC15 49 | 1 50 | 0 51 | 1 52 | 1 53 | 1 54 | ..\Output\ 55 | 0 56 | 0 57 | 0 58 | 59 | 0 60 | 0 61 | 62 | 63 | 0 64 | 0 65 | 0 66 | 0 67 | 68 | 69 | 0 70 | 0 71 | 72 | 73 | 0 74 | 0 75 | 76 | 77 | 0 78 | 0 79 | 80 | 81 | 0 82 | 0 83 | 84 | 0 85 | 86 | 87 | 88 | 0 89 | 0 90 | 0 91 | 0 92 | 0 93 | 1 94 | 0 95 | 0 96 | 0 97 | 0 98 | 3 99 | 100 | 101 | 0 102 | 65535 103 | 104 | 105 | S8051.DLL 106 | 107 | DP51.DLL 108 | -p52 109 | S8051.DLL 110 | 111 | TP51.DLL 112 | -p52 113 | 114 | 115 | 116 | 0 117 | 0 118 | 0 119 | 0 120 | 16 121 | 122 | 123 | 1 124 | 1 125 | 1 126 | 1 127 | 1 128 | 1 129 | 1 130 | 1 131 | 0 132 | 133 | 134 | 0 135 | 1 136 | 0 137 | 1 138 | 0 139 | 1 140 | 0 141 | 1 142 | 1 143 | 1 144 | 1 145 | 146 | 0 147 | -1 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 0 167 | 0 168 | 0 169 | 0 170 | 0 171 | 0 172 | 173 | 0 174 | 175 | "" () 176 | 177 | 178 | 179 | 180 | 0 181 | 182 | 183 | 184 | 0 185 | 0 186 | 2 187 | 0 188 | 0 189 | 0 190 | 0 191 | 0 192 | 0 193 | 1 194 | 0 195 | 1 196 | 0 197 | 0 198 | 0 199 | 0 200 | 0 201 | 0 202 | 0 203 | 0 204 | 0 205 | 0 206 | 0 207 | 0 208 | 0 209 | 0 210 | 0 211 | 0 212 | 0 213 | 0 214 | 0 215 | 0 216 | 0 217 | 0 218 | 0 219 | 0 220 | 0 221 | 0 222 | 0 223 | 0 224 | 0 225 | 226 | 227 | 0 228 | 0x0 229 | 0xffff 230 | 231 | 232 | 0 233 | 0x0 234 | 0x0 235 | 236 | 237 | 0 238 | 0x0 239 | 0x0 240 | 241 | 242 | 0 243 | 0x0 244 | 0x0 245 | 246 | 247 | 0 248 | 0x0 249 | 0x0 250 | 251 | 252 | 0 253 | 0x0 254 | 0x0 255 | 256 | 257 | 0 258 | 0x0 259 | 0x0 260 | 261 | 262 | 0 263 | 0x0 264 | 0x0 265 | 266 | 267 | 1 268 | 0x0 269 | 0x2000 270 | 271 | 272 | 0 273 | 0x0 274 | 0x100 275 | 276 | 277 | 0 278 | 0x0 279 | 0x0 280 | 281 | 282 | 0 283 | 0x0 284 | 0x0 285 | 286 | 287 | 0 288 | 0x0 289 | 0x0 290 | 291 | 292 | 293 | 294 | 0 295 | 0 296 | 1 297 | 0 298 | 1 299 | 3 300 | 8 301 | 2 302 | 1 303 | 1 304 | 0 305 | 0 306 | 307 | 308 | 309 | 310 | ..\Lib\inc;..\Lib\src;..\USER;..\MyDriver 311 | 312 | 313 | 314 | 0 315 | 1 316 | 0 317 | 0 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 0 327 | 0 328 | 1 329 | 0 330 | 2 331 | 1 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | Lib 361 | 362 | 363 | STC15xx_delay.c 364 | 1 365 | ..\Lib\src\STC15xx_delay.c 366 | 367 | 368 | STC15xx_GPIO.c 369 | 1 370 | ..\Lib\src\STC15xx_GPIO.c 371 | 372 | 373 | STC15xx_USART1.C 374 | 1 375 | ..\Lib\src\STC15xx_USART1.C 376 | 377 | 378 | 379 | 380 | USER 381 | 382 | 383 | main.c 384 | 1 385 | .\main.c 386 | 387 | 388 | stc15xx_it.c 389 | 1 390 | .\stc15xx_it.c 391 | 392 | 393 | 394 | 395 | MyDriver 396 | 397 | 398 | UART.c 399 | 1 400 | ..\MyDriver\UART.c 401 | 402 | 403 | GPIO.c 404 | 1 405 | ..\MyDriver\GPIO.c 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 |
414 | --------------------------------------------------------------------------------