Ai
8 Star 29 Fork 9

空想实验室技术(深圳)有限公司/nulllab_arduino

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SysClock.ino 822 Bytes
一键复制 编辑 原始数据 按行查看 历史
nulljun 提交于 2021-07-03 14:04 +08:00 . Add sysclock and adc demo
// demo for system clock switch
// using function "sysClock(mode)" to switch
// system clock between internal or external oscillator
// e.g:
// INT_OSC_32K 0
// INT_OSC_32M 1
// EXT_OSC_32M 2
// EXT_OSC_24M 3
// EXT_OSC_16M 4
// EXT_OSC_12M 5
// EXT_OSC_8M 6
// EXT_OSC_4M 7
// EXT_OSC_2M 8
// EXT_OSC_1M 9
// EXT_OSC_400K 10
// EXT_OSC_32K 11
// sysClock(INT_OSC_32M) for internal 32M oscillator
// sysClock(EXT_OSC_16M) for external 16M crystal
void setup() {
// put your setup code here, to run once:
sysClock(INT_OSC_32M); // Set internal 32M oscillator
sysClockPrescale(SYSCLK_DIV_2); // set clock prescale 0 2 4 8 16 32 64 128
sysClockOutput(1); // sysclock out put to D8
pinMode(13, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalToggle(13);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nulllab/nulllab_arduino.git
git@gitee.com:nulllab/nulllab_arduino.git
nulllab
nulllab_arduino
nulllab_arduino
master

搜索帮助