Saturday, 16 May 2015

digital logic - 2 logical inputs on the same circuit


Is the below a valid circuit implementation and are there any things to watch out for? It's a simplification of the larger circuit but the crux of it is that I need to sink current into two GPIO input pins. The pins are signified by the 1 and 0.


Also, would a diode on the pins be advisable?


enter image description here


Edit: Here's the non-simplified circuit. The question relates to the 3.3v part of it. In essence, the timer and decade counter sequentially pulse current, 'activating' the transistors one at a time. The keypad is a simple matrix keypad. What I'm wondering if I can do is to put a GPIO pin on the line between the keypad and ground. The intended effect is that, when a button on the keypad is pressed, 2 pins will change state - this signifies the row and column.


Note that some of the resistance and capacitance values are notional at the moment.


enter image description here



Answer



If you connect a uC GPIO pin directly to ground, like you show at point "1" in your first diagram, it will not be much use for anything.



As an input, it will always read 0 because it is tied directly to ground.


As an output, you accomplish nothing if you drive the output low, and the uC could be damaged if you try to drive the output high.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...