Hello Melanie

I'm trying to figure out how to use your DS1307 clock code, at the melabs site, to display hh:mm:ss on the hp hdsp 211x display. The Rentron site has the hdsp example to scroll a message and I've been successful with ascii characters. The clock display format is very confusing to me. Could you please steer me in the right direction or anyone else. I've been trying to get some result for a while now. Bruce Reynolds code is below:

DEFINE OSC 20 ' 20MHz oscillator
DEFINE LOADER_USED 1' Using boot-loader for initial prototype
TRISA = 0 ' Setup PortA = output for Address Bus
TRISB = 0 ' Setup PortB = output for Data Bus
TRISC = $80 ' RC.7 = input, rest outputs [used for loader]
ADCON1 = 7 ' A/D OFF
A_Bus VAR PortA ' PortA Address Bus
D_Bus VAR PortB ' PortB = Data Bus
W_Pin VAR PortC.0 ' HDSP-2112 write strobe pin #13
A3 VAR PortC.1 ' HDSP-2112 mode select pin #6
RST VAR PortC.2 ' HDSP-2112 reset pin #1
Digit VAR BYTE[8] ' 8-byte digit array
DigPat VAR BYTE ' Digit pattern from lookup table
LP_Cnt VAR BYTE ' Loop counter
LowDig VAR BYTE ' Holds "low" digit # to lookup
LowDig = 0 ' 1st digit = 0
HiDig VAR BYTE ' Holds "high" digit # to lookup
HiDig = 7 ' Last digit = 7
J VAR BYTE ' Array index pointer
J = 0 ' 1st byte in array
S_Speed VAR WORD ' Holds display scroll speed
S_Speed = 300 ' Set display scroll speed here
LOW D_Bus.7 ' Set display for normal operation
EOM CON "~" ' Character used as "End of Message" marker
'* // Initialize display - then set brightness * //'
Init_Display:
' * // Initialize Display Here * //'
HIGH W_Pin : LOW RST : PAUSE 10 : HIGH RST : PAUSE 10

' * // Set Display Brightness Here * //'
' To change display brightness
' D_Bus = | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
' Bright =| 100% | 80% | 53% | 40% | 27% | 20% | 13% |
'
' Set 27% | mode.bit | strobe settings into display |
D_Bus = 4 : LOW A3 : LOW W_Pin : HIGH W_Pin
HIGH A3 ' A3 used only for setting display brightness

'* // Get 8 digits into "Digit Array" for display * //'
GetDig:
FOR LP_Cnt = LowDig TO HiDig
LOOKUP LP_Cnt,[" Hello.! ~"],DigPat
Digit[J] = DigPat ' Load all 8 digits into array
J = J + 1 ' Increment array index pointer
NEXT ' Loop until we have all 8 digits loaded
J=0 ' Re-set array index pointer
LowDig = LowDig + 1 ' Increment to next "low" digit
HiDig = HiDig + 1 ' Increment to next "high" digit

' * // We're using the "~" character in EOM to tag the end of message * //'
IF Digit[7] = EOM THEN ' End-of-message indicator..?
Digit[7] = " " ' Then load a "blamk space" character
LowDig = 0 ' Re-load 0-7 MAX digit count
HiDig = 7 '
ENDIF
'* // Display 8 digits on display then return for more // *'
DisplayDigit:
FOR LP_Cnt = 0 TO 7 ' Scroll right-to-left
A_Bus = LP_Cnt ' Place digit address on address bus
D_Bus = Digit[J] ' Place digit data on data bus
LOW W_Pin : HIGH W_Pin' Strobe data into display
J = J + 1 ' Increment array pointer to next digit
NEXT
J = 0 ' Re-set array index pointer
PAUSE S_Speed ' Set display scroll speed
GOTO GetDig