Hi,
It sounds as if the two boards are missing a common ground.
The ground of the display board must be connected to ground of the PIC so that they share the same reference.
/Henrik.
Hi,
It sounds as if the two boards are missing a common ground.
The ground of the display board must be connected to ground of the PIC so that they share the same reference.
/Henrik.
Thanks for the reply.
The 2 boards do share a common ground. The LED module has 4 pins: +12, GND, Signal 1 and Signal 2. I share the +12 and GND between both boards (+5 is generated through a voltage regulator on each board).
The specs for the LED board say that you must tie Signal 1 or Signal 2 to ground to control it. So if I connect Signal 1 to GND, it will start flashing one way, and Signal 2 to GND will flash another way. If I do both it flashes a 3rd way, and no pins to GND it will just stay off.
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?
Since your led board works with 12 volts, i would suggest to use an optotransistor as TLP504 to accomplish your goal.
Just Connect the two emitters to ground and the two collectors to signal1 & signal2. The diode side will be controlled via your pic using e 330 ohms resistors on both diodes. Turn on the pic pin where you connected the diode and the corresponding NPN optotransistor will ground your control signal input. Mind you totaly isolated from the 12 volts.
Cheers
Al.
All progress began with an idea
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.
I managed to get it working, it turns out the specs on the board were not very clear. I could connect the output pins of my PIC directly to the signal and set them low. I thought that maybe I would have to do something tricky, but was dead simple.
Thanks for the help guys.
In the old days a TTL low was not very low, it only had to be below 800mv.
So an older device (say 74LS04) would give a low of one junction above ground, around 600mv.
These days most devices (like PICs or 74HCT04) are CMOS, so a low is no longer one bipolar junction voltage above ground, but an impedance above ground.
The difference is that now the output behaves more like a resistor to ground (an FET), and the value of the low is a function of the current it's sinking, which means it's typically very, very low. Or, if you prefer to round these numbers down: ground.
Ok, I understand now. Thanks kenif!
Bookmarks