I have recently changed from red LEDs to blue LEDs and encountered
a strange problem on port A4 on a 16F627A. Port A4 is an open drain output
connected to the LED cathode, the LED anode is connected to 5 vdc via a 1 K resistor. The red LED works as expected but the Blue LED will not turn off
unless I use a 10 K pullup around the blue LED. The blue LED has a larger
forward drop than the red and should have a lower current than the red LED.

Does anybody have any ideas? Am I missing something?

I defined my I/O and disabled the comparators

TRISA = %00001100
TRISB = %00000010
CMCON=%00000111 ' Comparators OFF


IF k = 1 Then
F = $F8
low portb.0 'turn on LED 1
low porta.4 'turn on LED 2
low porta.6 'turn on LED 3
Return
EndIF
IF k = 2 Then
F = $FE
low portb.0 'turn on LED 1
high porta.4 'turn off LED 2
high porta.6 'turn off LED 3
Return