This is the schematic I concocted. The microcontroller works with it's internal oscillator at 4 MHz to save 2 extra pins. Reset pin (MCLR) is also used as input for one of the buttons. All segments are connected to PORTB and COMs are connected to PORTA. RTC chip is also connected to PORTA.
The schematic is extremely simple and I assembled it on a breadbord for a quick test:
It worked as expected. The refresh rate of the digits is about 53Hz and there is no visible flickering. Because of the multiplexing the digits are dimmer and to compensate this the current through segments must be higher. I tested it with different values for current limiting resistors R1-R7 and below 220 Ohm the microcontroller starts to misbehave - some of the digits start to flicker. 220 Ohm and above seems OK. The two dots in the middle are connected to the SQW pin of the DS1307. This pin is configured as 1 Hz square wave output. It is an open drain output, so in order to work it has to have pull-up resistor. I searched and didn't find anywhere information about current capability of this pin. I tested with 330 and 470 Ohm and it didn't burn :) To be on the safe side I left the 470 Ohm one - it's a little dimmer than the rest of the segments, but still well visible.
There are two buttons for adjusting the time - one for the hours and one for the minutes.
There is one unused pin left - RB7, which can be used for additional functionality. For example a buzzer can be connected and an alarm function can be added to the software.
The software is written and compiled with MikroC Pro and uses its build in software I2C library for communicating with RTC chip. If someone wishes to use MPLAB software for compiling the code he should write his own I2C functionality from scratch.
Here is a short video demonstrating how it works:
Software code and HEX file: DigitalClock
If you use PICkit 3 standalone software to upload HEX code to the microcontroller, then in the "Tools" menu check the option "Use VPP First Program Entry".
Update: June 30, 2020
This clock (with improved schematic) is available for purchase at tindie.com