|
本帖最后由 la45088d1 于 2019-4-22 01:07 编辑
最近在写STC15W401AS的时候顺便了解了一下STC MCU的内核发现平淡无奇。STC只是将机器周期与时钟源振荡周期的比值从1:12提升到了1:1而已。在MSC8051中,机制还是那样,没什么太大改变。35MHz的频率根本不够用。最近做一个实验,想用STCW401AS定频驱动雾化片。为了让Class-E部分有足够输出,所以使用几个IO口完成boost控制器功能。涉及到PID算法非常耗费时间,期望的调整速率是20KHz,但程序基本完成后才发现有点悬。
结果今天无意中看到一款叫做C8051F410的MCU才后悔不已,要是我不随大流只懂得MSC8051就是只用STC就好,毕竟论坛上不少人使用的就是STC的,所以之前选型的时候没多想。为什么我如此后悔呢?且看我到来。
这是C8051F41x系列的Datasheet,可以看到内置高达200KSa/s的12bit ADC,线性度很好。多达24个模拟通道和窗口中断发生器。并且还有12bit电流模式DAC,简直干翻STC有没有?还有3个可配置为16bit的计时器,RTC时钟,16bit CRC硬件单元,SMBus硬件协议。而IO口和Flash,SRAM跟SRTC不相上下,价格更是毫无区别!STC有的,它都有,甚至吊打,它有的STC没有。更重要的是,它还支持在线调试,只要有特定的调试器类似于ARM的J-link:T
The C8051F41x devices include on-chip Silicon Laboratories 2-Wire (C2) debug circuitry that provides non-intrusive, f ull speed, in-circuit debugging of the production part installed in the end application.Silicon Laboratories’ debugging system supports inspection and modification of memory and registers, breakpoints, and single stepping. No additional target RAM, program memory, timers, or communicationschannels are required. All the digital and analog peripherals are functional and work correctly while debugging.All the peripherals (except for the ADC and SMBus) are stalled when the MCU is halted, during singlestepping, or at a breakpoint in order to keep them synchronized.
STC是怎么干的?特定型号的MCU加上下载专有固件才可以用串口调试,非常麻烦。而该MCU内核是MSC8051的变异版本,加入了流水线并将时钟频率提升到50MHz,性能高达50MIPS,估计快到35MHz STC15系列的2倍:
The CIP-51 employs a pipelined architecture that greatly increases its instruction throughput over the standard8051 architecture. In a standard 8051, all instructions except for MUL and DIV take 12 or 24 systemclock cycles to execute, and usually have a maximum system clock of 12-to-24 MHz. By contrast, the CIP-51 core executes 70% of its instructions in one or two system clock cycles, with no instructions taking morethan eight system clock cycles.
STC是不错的改进型8051 MCU但绝对不是最好的,也并不想想象中那么出色,但为什么你们都选择了STC,而不是Silicon Laboratories呢?我觉得在我的方案中,C8051F410应该比STC15W401AS更适合,更好的性能和更丰富的外设,任何人都不会拒绝。如果我早选择了C8051F410,我就不会为了35MHz的时钟频率犯愁,不断的精简代码来防止性能不足的问题。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
打赏
-
查看全部打赏
|