Microcontroller Pin → Resistor (270 Ω) → SN51DP Pin 1 (Anode) SN51DP Pin 2 (Cathode) → GND
Finding an exact SN51DP replacement can be difficult. If you are repairing a board and cannot source the original, consider these (check pinout compatibility first): sn51dp datasheet