Способен ли микроконтроллер Arduino обнаруживать собственные контакты, которые связаны друг с другом?

882
1312EN

У меня есть матрица, и я хочу подключить ее напрямую к Arduino без использования IC.

Я хочу, чтобы всякий раз, когда я подключал два контакта в микроконтроллере Arduino, например: pin1 и pin2, микроконтроллер автоматически обнаруживал, что pin1 и pin2 были подключены. Все контакты были входными. Может ли Arduino сделать это?

0

1 ответ на вопрос

1
Julian Knight

You can connect two pins on an Arduino. But it isn't clear what you trying to do or why.

Since both pins are input, you can detect any changes on the pins in software - the only way to detect that anything is connected to a pin of course is for an electrical signal to change on that pin. When it does, you will detect that in software and take actions accordingly.

You can also connect an output pin to an input pin. Not much use of course unless you have some other circuitry that does something interesting between the two pins.

UPDATE: The thing to remember is that these cheap microcontrollers have minimal protection from overvoltage and high current. But as long as you do not exceed the specifications of the chipset (which will be one of the Atmel chips, the Uno uses the ATmega328 for example), you will be fine. The Atmel chips are reasonably robust and will happily work between 1.8 and 5.5v (not sure what max. current the pins support though). So just make sure your circuits are within parameters.

Спасибо @Julian Knight за этот комментарий. Мне просто нужно знать, возможно ли это, потому что я боюсь, что это может разрушить микроконтроллер 1312EN 9 лет назад 0
Хорошо, Джулиан Найт. Большое спасибо за это обновление. Я просто должен быть очень осторожным в своих схемах и убедиться, что он не превышает спецификации чипсета. 1312EN 9 лет назад 0
Не беспокойтесь, Arduino довольно снисходительны - в отличие от Raspberry Pi. Julian Knight 9 лет назад 0