-
一个最简单的多任务并行系统 51例程
前言想了很久,要不要写这篇文章?最后觉得对操作系统感兴趣的人还是很多,写吧.我不一定能造出玉,但我可以抛出砖.包括我在内的很多人都对51使用操作系统呈悲观态度,因为51的片上资源太少.但对于很多要求不高的系统来说,使用操作系统可以使代码变得更直观,易于维护,所以在51上仍有操作系统的生存机会.流行的uCos,Tiny51等,其实都不适合在2051这样的片子上用,占资源较多,唯有自已动手,以不变应万变,才能让51也有操作系统可用.这篇贴子的目的,是教会大家如何现场写一个OS,而不是给大家提供一个OS版本.提供的所有代码,也都是示例代码,所以不要因为它没什么功能就说LAJI之类的话.如果把功能写全了,一来估计你也不想看了,二来也失去灵活性没有价值了.下面的贴一个示例出来,可以清楚的看到,OS本身只有不到10行源代码,编译后的目标代码60字节,任务切换消耗为20个机器周期.相比之下,KEIL内嵌的TINY51目标代码为800字节,切换消耗100~700周期.唯一不足之处是,每个任务要占用掉十几字节的堆栈,所以任务数不能太多,用在128B内存的51里有点难度,但对于52来说问题不大.这套代码在36M主频的STC12C4052上实测,切换任务仅需2uS.
- 2023-05-03 10:15:03下载
- 积分:1
-
LCD_12232 液晶显示程序源代码,用于ARM板的c用语言编写程序代码。...
LCD_12232 液晶显示程序源代码,用于ARM板的c用语言编写程序代码。-LCD_12232 LCD source code for the ARM board c programming language code.
- 2022-11-18 09:50:02下载
- 积分:1
-
基于msp430的温度报警器
代码是在msp430f149开发板的基础上将ds18b20,lcd1602,蜂鸣器和按键结合的系统。本系统已实现了对局部温度的采样测量,可以用于冰箱,柜子等小环境的温度测量,并且在温度过高时会发出警告,而且临界值可以通过按键修改。
- 2023-05-29 16:00:04下载
- 积分:1
-
研华数据采集卡PCI1713,PCI1720,PCL730测试程序
研华数据采集卡PCI1713,PCI1720,PCL730测试程序-Advantech data acquisition card PCI1713, PCI1720, PCL730 testing procedures
- 2023-03-06 01:05:04下载
- 积分:1
-
DE2 练习源码2-4
Part IV
In part II we discussed the conversion of binary numbers into decimal digits. It is sometimes useful to build
circuits that use this method of representing decimal numbers, in which each decimal digit is represented using
four bits. This scheme is known as the binary coded decimal (BCD) representation. As an example, the decimal
value 59 is encoded in BCD form as 0101 1001.
You are to design a circuit that adds two BCD digits. The inputs to the circuit are BCD numbers A and B,
plus a carry-in, cin. The output should be a two-digit BCD sum S1S0. Note that the largest sum that needs to be
handled by this circuit is S
- 2022-03-18 00:20:50下载
- 积分:1
-
51 amp full set of multimedia programs, including schematics and source code.
多媒体51功放全套方案,包括原理图及源程序。-51 amp full set of multimedia programs, including schematics and source code.
- 2022-11-15 12:30:03下载
- 积分:1
-
本程序为avr控制程序,为俄罗斯方块程序,已经在编译器上运行过...
本程序为avr控制程序,为俄罗斯方块程序,已经在编译器上运行过-the procedures for avr control procedures, procedures for the Russian box, the compiler had run off
- 2022-02-14 16:41:27下载
- 积分:1
-
红外线通讯协议,对于想开发红外产品的人,或对红外通讯有兴趣的可值得一看...
红外线通讯协议,对于想开发红外产品的人,或对红外通讯有兴趣的可值得一看-infrared communication protocol, to the development of infrared products, or are interested in infrared communication of an eye-catcher
- 2023-04-07 03:10:03下载
- 积分:1
-
红外线鼠标源代码
infra red mouse source code
- 2023-09-02 01:15:03下载
- 积分:1
-
自己要下东西所以就垅个东西上来啦,哈哈大家的原谅呀!!1
自己要下东西所以就垅个东西上来啦,哈哈大家的原谅呀!!1-So the next thing they have to something on the ridge on the come, the U.S. forgive you ha ha!! 1
- 2022-01-25 23:20:36下载
- 积分:1