【求助】怎样PORTD这种命灵控制digitalWrite?-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 3642|回复: 1

【求助】怎样PORTD这种命灵控制digitalWrite?

[复制链接]
发表于 2013-9-20 14:04 | 显示全部楼层 |阅读模式
想控制一个热水器,但用示波器看到的信号频率很高,和arduino 不是一个级别的,看到网上说portd这样的命令效率很高,想试一试,需要设置一个数字口为输出,设置为高电平,在设置为低电平,请问用那种方式怎么写?另外如果arduino 解决不了,我应该用什么方式能实现,成不不要太高。谢谢!
发表于 2013-9-21 00:58 | 显示全部楼层
Port Registers :
http://arduino.cc/en/Reference/PortManipulation

PORTD maps to Arduino digital pins 0 to 7
DDRD - The Port D Data Direction Register - read/write
PORTD - The Port D Data Register - read/write
PIND - The Port D Input Pins Register - read only

PORTB maps to Arduino digital pins 8 to 13 The two high bits (6 & 7) map to the crystal pins and are not usable
DDRB - The Port B Data Direction Register - read/write
PORTB - The Port B Data Register - read/write
PINB - The Port B Input Pins Register - read only

PORTC maps to Arduino analog pins 0 to 5. Pins 6 & 7 are only accessible on the Arduino Mini
DDRC - The Port C Data Direction Register - read/write
PORTC - The Port C Data Register - read/write
PINC - The Port C Input Pins Register - read only
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-12-29 22:32 , Processed in 0.114018 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表