Luberth Dijkman wrote: > there is a bread slicing/packing machine > a PLC has 5 outputs connected to a display on the other side off machine > in case of an error (door open, safety switch etcetera) the PLC ouputs a binary > value > the display connects a message to this valeu so the operator nows whats wrong > > the display is more broken then that its working and repair is expensive > > so i thougt i use a pic 16f84 with 4bit LCD connected to portb and connect the > 5 outputs from plc to porta (optocouplers) > there are 30 error messages and i think the pic16f84 can handle this > most machinery and PLC's i have seen and also this machine use 24VDC > so i wanted to use the 24VDC and power the pic/lcd(16x2) with it via L7805 The PIC and LCD only draw 50mA or less, even with LCD backlight so a 7805 should work with a small heatsink since you want reliability. You could put a 12v 3W zener in series with the 7805, so the zener drops the input voltage to 12v and the 7805 runs nice and cool (no heatsink). Put a 47uF cap across the zener too. Alternatively if you want to fiddle with a couple of transistors you can use my Black regulator which will be quite efficient for 24v -> 5v use and won't need the 7805 regulator. See; http://www.romanblack.com/smps.htm -Roman -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu