The output concists of two transistors in a push-pull configuration. When the pin is in output mode (controlled by the TRIS register) one or the other of these two transistors will be on. One "connects" the pin to Vdd (+5V) and the other "connects" the pin to Vss (ground).If the Signal pins needed to be set High to control them, I would just connect them to the PIC outputs on my main board. How can I make it so that I can control this external LED board from the PIC on my main board? ie. How do I tie the signal pins to ground?
In order to switch PortB.0 low you can do:Or the "manual" but prefered wayCode:Low PortB.0 ' Switch lowThat's it really. Now, there are two things to remember:Code:TRISB.0 'Make PortB.0 an output PortB.0 = 0 'Switch low
1) The pins always come up in input mode meaning you have to switch them to ouputs. This is done thru the TRIS register as shown above but HIGH and LOW handles that for you if you prefer.
2) Some PICs have analog inputs for the ADC and comparators etc on various pins. If the pins you're trying to use has functions like this they will have to be disabled. Withput knowing which PIC and which pins you're trying to use it's impossible to advise further.




Bookmarks