You will have to learn about assembler instructions to know how the code works but it isn't as difficult as it sounds. The code is poorly written, it has no worthwhile comments and for some reason the register names and bit names have been duplicated. If you run it through an assembler you will also need the file called "p16f84A.inc" which I think is still included with MPLAB. Expect some warning messages but it should still produce a usable HEX file.
Start by looking at the schematic and see how the bits in PORTA and PORTB are used to activate the display. PORTA and PORTB are outputs from the PIC except for bit 0 on PORTB which is an input. You will see that each bit in the ports is connected to something on the schematic. The ones you need to be interested in are:
PORTA bit 0 - (RA0) - when low it activates digit 0
PORTA bit 1 - (RA1) - when low it activates digit 1
PORTA bit 2 - (RA2) - when low it activates digit 2
PORTA bit 3 - (RA3) - when low it activates digit 3
PORTB bit 0 -(RB0) - this is the input that counts the edges of the signal to work out the frequency
PORTB bit 1 - (RB1) - when low it activates segment E on all the digits
PORTB bit 2 - (RB2) - when low it activates segment C on all the digits
PORTB bit 3 - (RB3) - when low it activates segment D on all the digits
PORTB bit 4 - (RB4) - when low it activates segment A on all the digits
PORTB bit 5 - (RB5) - when low it activates segment F on all the digits
PORTB bit 6 - (RB6) - when low it activates segment B on all the digits
PORTB bit 7 - (RB7) - when low it activates segment G on all the digits.
The way it produces the digits is to load the pattern of segments for digit 0 into PORTB then it makes RA0 low so the segments lit up produce the character, then it makes RA0 high again and repeats for digits 1, 2 and 3 before going back to digit zero again. Only one of the digits is active at any time, otherwise the same character would appear on more than one digit. By going round in circles, briefly displaying each digit then turning it off again, and doing it fast enough that your eyes don't notice the flicker, it looks like all four digits are lit up at the same time. We call this 'multiplexing' and it is used very frequently so it is worth understanding.
To make the "Pira' name, if you look close at this fragment of the code:
Code:
CLRF DIGIT2
CLRF DIGIT1
CLRF DIGIT0
BSF DIGIT0,3
DECF DIGIT1
DECF DIGIT2
MOVF DIGIT1,W
MOVWF PORTA
BSF DIGIT0,2
CLRF DIGIT3
BCF DIGIT1,1
BCF DIGIT1,5
INCF DIGIT0
BSF DIGIT3,3
INCF DIGIT3
BCF DIGIT2,7
BCF DIGIT2,1
you will see it sets the bits (BSF) or clears the bits (BCF) in four variables called "DIGIT0", "DIGIT1", "DIGIT2" and "DIGIT3" to make the segment pattern for P, i, r, a then it starts to send those variables to the display using the multiplexing I described above.
So it doesn't use ASCII at all, it directly turns the segments on or off to make the character shapes.
Brian.