Thank you for all your helpful replies. The 2 chips at the top of the photo are indeed 4511s, mislabelled as the PIC, due to my copy/ paste excesses!
And of course I referred to bits in PortB as pins.
However, With your advice I have created some code that turns on each LED with the appropriate number and leaves it on.
From the decoding supplied by sagor1, I believe I can create the code I need, albeit in C rather than assembler. Part of my problem is the number of tracks that went underneath the LEDs. Eventually, afer removing all the chips I used a multimeter to trace them. I've updated the PIC pinout accordingly and also the images of the front and back of the PCB.
The process would be:
On power on, illuminate the colon to indicate power.
Set interrupts on
Set a timer interrupt of say 4 seconds (the PC software will send a time msg every 2 seconds.
If the timer runs out, assume no PC and turn off any values displayed on the LEDs
Accept an interrupt from the USART and read the data, storing it locally.
Disable interrupts to allow RB0 to used as output.
Call function to display time on LEDs
Enable interrupts and start timer wait again.
The code I have to drive the LEDs is as below. i is an unsigned int set to 5678. I have set large delays so I could observe the sequence, which occasionally became rather messy while I worked it out.
Thanks again to all of you helpful people.
colon=1; // turn on colon (RC0)
//***Splitting "i" into four digits***//
a=i%10;//4th digit is saved here
b=i/10;
c=b%10;//3rd digit is saved here
d=b/10;
e=d%10; //2nd digit is saved here
f=d/10;
g=f%10; //1st digit is saved here
h=f/10;
//***End of splitting***//
//***send digit to 4511 in turn - g then e then c then a****//
PORTB=0XF0; // turn on ULN2004 power to all 4 LEDs, clear digit bits
__delay_ms(90);
thebits = (char)g;
PORTB=PORTB | thebits; // turn on led 1
RD7=0;RD7=1;
__delay_ms(90);
PORTB=PORTB ^ thebits; // turn off digit bits
__delay_ms(90);
thebits = (char)e;
PORTB=PORTB | thebits; // turn on led 2
RD6=0;RD6=1;
__delay_ms(90);
PORTB=PORTB ^ thebits; // turn off digit bits
__delay_ms(90);
thebits = (char)c;
PORTB=PORTB | thebits; // turn on led 3
RD5=0;RD5=1;
__delay_ms(90);
PORTB=PORTB ^ thebits; // turn off digit bits
__delay_ms(90);
thebits = (char)a;
PORTB=PORTB | thebits; // turn on led 4
RC1=0;RC1=1;
__delay_ms(90);
PORTB=PORTB ^ thebits; // turn off digit bits