• Please review our updated Terms and Rules here

DS1216E source code

dittman

Veteran Member
Joined
Jul 31, 2017
Messages
696
Location
Plano, TX
Does anyone have any source code implementing a DS1216E in CP/M 2.2 or CP/M Plus? I have one and Matthew Reed's XTRS32 emulator also emulates one so I thought I'd add support in my CP/M Plus. Before I starting writing software to support it I thought I'd check to see if anyone has any source code I can use as a starting point.
 
Mike, I think Alphasite was looking for Z80 source--I've got x86 source, but that's set to handle int 1A BIOS serivice.

The Maxim doc has pseudo code as well as 8051 code, which might also be helpful. In any case, it isn't difficult.
 
I linked him to source code; it will be helpful with the application notes even if it is a different architecture.
 
Thanks, I'll look through the application notes and the source. I was mainly concerned about any pitfalls around the serial reading and writing.
 
Okay, looking at the pseudo code in the application note what I need to do to read the clock is:

1) Map in the ROM
2) Read from the base ROM address 65 times (ROM base is 0000H)
3) Write the eight bytes of the trigger one bit at a time to the base ROM address
4) Read the eight bytes of the stored time one bit at a time from the base ROM address
5) Map out the ROM

To do a write change step 4 to a write.
 
Tis amazing what you can find if you dig deep enough.:D
CLK4/TXT is attached below.
I had to make some changes to kill the Y2K bug and to get it running on the Model II but this is Duane Saylor's original unaltered code.
Should give you a few ideas and a pic of how it looks running on the Model II.

View attachment CLK4.TXT

ModelII_Gazzawatch.jpg
 
Back
Top