Project 1 - A Clock for the Shack
Connection details missing!


Problem:
Constuction details for the display are given in Chapter 6 and the clock itself is described in Chapter 7. However, there are no details on how to connect the two units together.

Solution:
The connections for the digit drivers are connected to the resistors which come from the 74LS138. However, in order to simplify the board layout, the inputs to the 74LS138 are not in the order that is given on the datasheet for this chip. Therefore:
  • pin 15 drives digit 1 (the tens of hours digit on the left of the display)
  • pin 14 drives digit 5 (the letter "U")
  • pin 13 drives digit 3 (the tens of minutes)
  • pin 12 drives digit 7 (the letter "C" on the right of the display)
  • pin 11 drives digit 2 (the hours)
  • pin 10 drives digit 6 (the letter "T")
  • pin 9 drives digit 4 (the minutes)
The resistors that are connected to pins 6 to 13 of the PIC drive the display segments as follows:
  • pin 13 drives the Decimal Point (Dot)
  • pin 12 drives segment D
  • pin 11 drives segment C
  • pin 10 drives segment E
  • pin 9 drives segment B
  • pin 8 drives segment A
  • pin 7 drives segment F
  • pin 6 drives segment G
Other Projects:
This change does not affect the other projects.

Alternatives:
If you have already built the project and connected it using the diagram from Chapters 5 and 6, DON'T WORRY.
Simply change the routine called "TABLE" to the one given below:

ADDWF PCL, F
RETLW 0x09 ;Zero
RETLW 0xED ;One
RETLW 0x43 ;Two
RETLW 0xC1 ;Three
RETLW 0xA5 ;Four
RETLW 0x91 ;Five
RETLW 0x31 ;Six
RETLW 0xCD ;Seven
RETLW 0x01 ;Eight
RETLW 0x85 ;Nine
RETLW 0x0F ;Letter "U"
RETLW 0x2C ;Letter "T"
RETLW 0x2E ;Letter "C"
RETLW 0xFF ;13
RETLW 0xFF ;14
RETLW 0xFF ;15
RETLW 0xFF ;16

Although this does not affect the display digit signals, the segment signals become:
  • pin 13 drives segment E
  • pin 12 drives segment F
  • pin 11 drives segment A
  • pin 10 drives segment B
  • pin 9 drives segment G
  • pin 8 drives segment D
  • pin 7 drives segment C
  • pin 6 drives the Decimal Point (Dot)
Please note that this is an ALTERNATIVE to the solution given above. It is given in case you have already built the project and have used your initiative to wire it using the information for other projects. If you are starting the project, please follow the solution given towards the top of this page.
See also:
Lighting of Decimal Point.


Further information:
I hope that this page helps you with your projects but if you have found any other problems or if you have any further questions please contact me though the email address of gares-AT-g4aym-DOT-org-DOT-uk.

Sorry about the email address but it seems to be the only way to avoid the spammers



Click here to return to the PIC Basics Main Page

Click here for the Index of Errors and Ommissions