![]() Once rgbPwmLed has been initialized, from the constructor it calls TestRgbPwmLed() method, where the app goes inside an infinite while loop in which enters a For loop, where a local double hue is declared and assigned the result of dividing i/360. In the Initialize method, we initialize an RgbPwmLed object, passing three PWM on Pins D02 (red), D03 (green) and D04 (blue) calling the Device.CreatePwmPort(IPin pin) method. It's even possible that your software could autodetect which displays are being used (I had no luck finding a way to do that, but perhaps your high-voltage-drop parts would provide a way.) This is all explained in detail in this video and the related Github repo.In Visual Studio 2019, create a new Meadow Application project, and in the MeadowApp class, copy the following code: public class MeadowApp : App They would just be opposites for CA and CC parts. But your software would define what GPIO state is "ON" for both the segment lines and the CA/CC lines. You would have to refresh twice as often as the traditional method because each segment is ON only 1/8 of the time versus 1/4 of the time when multiplexing by digit, and this will make the digits appear a bit dimmer. But it appears the absolute maximum rating for GPIO pins for the PIC is 50ma, so if you can use 10ma per segment or less, this may work. The question is whether a PIC can drive 4 segments at once, and that depends on how efficient your displays are. But if you multiplex by segment, each segment driver must supply a maximum of 4 segments at one time, but the CA or CC sources or sinks current for only one segment at a time, and therefore needs no transistor, just a resistor. In traditional multiplexing, each segment driver provides current to only one segment at any one time, but the CA or CC pin must source or sink current for as many as 8 segments including the DP - hence the need for the transistor. The key to making this work is to multiplex by segment instead of by digit. You would set up the 8 segment drivers just as you have them, but the CA or CC pins would be driven by GPIO pins with only a current-limiting resistor. The choice of CA or CC would be set in software. Another possibility is to replace the NPN BJTs with N-MOSFETs and PNP BJTs with P-MOSFETs (gate to base, drain to collector and source to emitter, connections), which have a high impedance gate connection and won't blow up like this, but you need to find parts with the correct pin-out to avoid redoing the board.ĭepending on the segment current needed, it may be possible to provide for both CA and CC parts (but not mixed) without using any transistors. ![]() If you can redesign the board, configure the transistors as emitter followers: NPN to the positive and PNP to the negative, reduce the LED current limiting resistor values slightly (I assume they're on another schematic) and it should work. The solution is to only fit either the PNP or NPN transistors. Connect a PNP and NPN transistor like this and a very high current will flow directly from the PNP transistor's base, through the NPN transistor's base. The base connection is a low impedance diode. If you've fitted both the PNP and NPN transistors, then they will both turn on, short circuiting the power supply and most likely be destroyed as soon as power is connected to the circuit. On a new board (exactly the same but with new BJT configuration to reduce jumpers), I've 2 assembled two of them but only CC screens are working. What is wrong? I've suppose that is something related to voltage drop on BJTs and Forward Voltage, but on my first board (3 in total) all worked perfectly. On test 2, only CC display works, but no light on CA. ![]() In the Test 1, all were fine, I've tested both CA and CC displays without problems, One were brighter than other because a voltage drop on BJT when used with LEDs between emitter and ground. Display models are SC15-11SRWA and SA15-11SRWA. There's a resistor on each port that goes from my Micro (PIC16F15354) on a single segment bus. Is there an optimized or right way to do that? Here's my BJT tests, power supply is a single buck regulator that regulates form 24v to 5v. Particularly is that I'd like to have the possibility to interchange between Common anode screen and Common Cathode. An update rate will show up each value on the powered display. I want to use a classic method with 4 BJT and segments all driven by a Micro. In my application, I should control 4 display composed of 7 segments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |