hello,

I have one small problem with routine for PIC 16F84A. Program must drive 7 segment LED display with comm. cathode. On output B port are PNP transistors via 4k7 for each segment.
problem is following:
RS232 values are ok and display lighted only 0. What is wrong here?

porta.3 is serial input and value for B5 are 0-10. Var from LOOKUP are value for LED segment

here is rotine:

DEFINE OSC 16
INCLUDE "MODEDEFS.BAS"

dp var portb.0
c var portb.1
d var portb.2
e var portb.3
g var portb.4
f var portb.5
a var portb.6
b var portb.7
SDA VAR PORTA.3 'pin2
b0 var byte
b1 var byte
b2 var byte
b3 var byte
b4 var byte
b5 var byte

trisa=%11111111
trisb = %00000000

clear
START:

serin sda,0,b2,b3,b4,b5
lookup2 B5,[238,130,220,214,178,118,126,194,254,246,108],B1
PORTB=B1
GOTO START

end

Similar routine i have write for a LCD display. Instead LOOKUP command is LCDOUT $fe,$80, #b5 and working ok.

Thanks
Sam