- 打卡等级:初来乍到
- 打卡总天数:4
- 最近打卡:2025-05-01 06:58:22
金牌会员
- 积分
- 1335
|
发表于 2024-9-13 12:29:53
|
显示全部楼层
本帖最后由 jmg 于 2024-9-13 12:57 编辑
What code is inside your T0 interrupt ?
How close is the interrupt to working ? If you have 12MHz SysCLK and the correct /12 prescaler, you should have 50ms ?
I am looking at STC8H series, as that is a more modern choice. Because you need to make small changes anyway, it is best to move to cheapest/newest, at the same time.
You are using mode 01, which should be ok, but there is a better reload mode = 00, that does not need interrupt re loading at all.
STC8H:
Note the reload registers RL_TH0, RL_TL0, need TR0 = 0 to access them, then you set TR0 = 1 after they are loaded.
A quick easy test is to toggle a pin inside the interrupt with simple test code initially.
Note the STC8H has CLKDIV and the STC11F has CLK_DIV that are defined at ISP program time, and the default PORT RESET mode is different.
Addit: If you want the old 8051 pinout, the STC8H will not fit, so the STC11 is better choice. You should define CLK_DIV and RST pin features for STC11
|
|