Hello all,
Almost reaching the end of the hardware and basic software development for the alarm system I am still building. My question is in relation to the control panel, namely the 22 LEDs for visual indication. There are 16 zone LEDs, 1 power LED, 1 Fire LED, 1 Fault LED, 1 Disablement LED, 1 Processor Fault LED and 1 Test LED.
Currently, I use a Picaxe 40X2 to control these LEDs which is a huge waste for such a powerful MCU. I've recently stumbled across shift registers and am wondering if they would fit into my system to drive these LEDs and take up less pins than the 22 currently being used.
When I switch the control panel on, the Power LED illuminates constantly, the other 5 (fault fire, disablement, test and processor fault) are only illuminated when an event on the system triggers them. When the panel communicates with the devices and encounters a fire condition, the panel looks up the activated devices address on the loop and will then retrieve the device label, zone label and zone number to display on the screen- the corresponding zone LED will then illuminate to indicate the fire condition from a further distance.
I know I'd need 3 shift registers (74HC595), taking 9 pins I assume (3 lots of clock, data and latch). Here are my questions:
1) Can I really power all 22 LEDs from just 5v? Or do I still need transistors?
2) With the 16 zone LEDs (focusing on the first chip controlling zone 1-8), if the zone 3 LED is currently illuminated, how could I illuminate the zone 7 LED on the same shift register? I wouldn't want to switch off the zone 3 LED. I'd say I would have to write the current command (%00100000) to a variable and then use setbit to change the value to %00100010. Is this correct? This would also apply to the other 6 generic indicators to switch them on individually.
3) Can I connect all three clock pins together and then all 3 latch pins? Meaning that I'd have 3 data lines, one clock and one latch on the picaxe.
Would love a little bit of clarification so I can buy some.
Almost reaching the end of the hardware and basic software development for the alarm system I am still building. My question is in relation to the control panel, namely the 22 LEDs for visual indication. There are 16 zone LEDs, 1 power LED, 1 Fire LED, 1 Fault LED, 1 Disablement LED, 1 Processor Fault LED and 1 Test LED.
Currently, I use a Picaxe 40X2 to control these LEDs which is a huge waste for such a powerful MCU. I've recently stumbled across shift registers and am wondering if they would fit into my system to drive these LEDs and take up less pins than the 22 currently being used.
When I switch the control panel on, the Power LED illuminates constantly, the other 5 (fault fire, disablement, test and processor fault) are only illuminated when an event on the system triggers them. When the panel communicates with the devices and encounters a fire condition, the panel looks up the activated devices address on the loop and will then retrieve the device label, zone label and zone number to display on the screen- the corresponding zone LED will then illuminate to indicate the fire condition from a further distance.
I know I'd need 3 shift registers (74HC595), taking 9 pins I assume (3 lots of clock, data and latch). Here are my questions:
1) Can I really power all 22 LEDs from just 5v? Or do I still need transistors?
2) With the 16 zone LEDs (focusing on the first chip controlling zone 1-8), if the zone 3 LED is currently illuminated, how could I illuminate the zone 7 LED on the same shift register? I wouldn't want to switch off the zone 3 LED. I'd say I would have to write the current command (%00100000) to a variable and then use setbit to change the value to %00100010. Is this correct? This would also apply to the other 6 generic indicators to switch them on individually.
3) Can I connect all three clock pins together and then all 3 latch pins? Meaning that I'd have 3 data lines, one clock and one latch on the picaxe.
Would love a little bit of clarification so I can buy some.