TAP-28 Daughter Board (DS1307 RTC)

rtc_db_300x200

This is my first daughter board for the low cost TAP-28 Development Boardmade by Jon Chandler. It's future purpose is to be used in my own variant of the Servo Clock (also made by Jon!).

Why use the TAP-28 if I had to physically make my own board anyway? Because the TAP-28 has 90% of the gear required to get any small project online and running.

I only need a single TAP-28 and I can build extremely small daughter boards to expand the capability for specific purposes. The end result for me is saving $$. Cheers Jon for the TAP-28 boards!!

 

Schematic

TAP-28_RTC_DB_Circuit_copy

Note: Some pins are hidden from view, being Vdd and Vss of the DS1307 - rest assured they are indeed connected to their respective netlists.
Also - it is assumed you are using the I2C pullup resistors on the TAP-28 board.

 

The circuit is really quite simple - just the necessities. A jumper should be connected between the BATT connectors if an external backup power source is not in use, as stated in the DS1307 datasheet.

It should also be noted that this board is mounted on the bottom of the TAP-28 Daughter Board headers. Why? Well the hardware SCL and SDA pins are located down that end, and I wanted to keep the board footprint as-small-as-possible.

 

Operation

Most would probably be familiar with the operation of the DS1307 RTC - its an I2C chip that gives time/date information and has some handy features:

  • Leap year compensation until 2100
  • Backup power source
  • Low power mode (less than 500nA)
  • EEPROM storage
  • Pretty cheap
The DS1307 requires an external oscillator (32.768Khz), be sure to mount it as close as possible to the IC for better long term accuracy.

 

Swordfish Code

The program assumes your using both a 10Mhz oscillator and an 18F2620 on the TAP-28 board. Simply change the defines if you've got a different setup.

RFID Program
Device = 18F2620
Clock = 40
Config OSC = HSPLL
 
// define CR and LF constants
Const CR = 13, LF = 10
 
// import modules...
Include "USART.bas"
Include "DS1307.bas" 
Include "convert.bas"
 
// initilaise USART...
USART.SetBaudrate(br38400)
 
// if the DS1307 device has not been enabled, we need to give
// it some default values - here we set for 7 o'clock 
// on the 1st Jan 2010...
If Not Enabled Then
 Time.Hour = 7
 Time.Minute = 0
 Time.Second = 0
 Date.Day = 1
 Date.Month = 1
 Date.Year = 10
 DS1307.Write(Time,Date)
EndIf
 
// keep sending the time and date...
While true
 DS1307.Read(Time, Date)
 USART.Write(DecToStr(Time.Hour, 2),":",DecToStr(Time.Minute,2),":",DecToStr(Time.Second,2),CR,LF)
 USART.Write(DecToStr(Date.Day,2),"/",DecToStr(Date.Month,2),"/",DecToStr(Date.Year,2),CR,LF)
 DelayMS(1000) 
Wend

 

Construction

I wanted to add a quick tip on construction regarding the daughter board connectors - I have used male headers on the TAP-28 Board, and female headers on the Daughter Board. Why? The female headers are (in my opinion) easier to solder on the underside of the single layer PCB (as shown in the top image).

You can make sharp bends to each of the female connector legs so that each sit both flat on the solder pad and goes into the drilled hole. Also, sit both female connectors in the same orientation so that the parallel distance between them is maintained at almost exactly 1.5" [edited by JKC] (if you oppose the connector direction then the connectors will either be slightly to close, or too far apart and won't fit to the TAP-28... easily).

The end result is a connector that is both stable while soldering, and has some flexibility to line up & mate with the male connectors.

 

The Results

Overall I am please with the design - its small and gets the job done. Here's a picture of the daughter board attached to the TAP-28:

TAP-28_DB

Top view of the TAP-28 DB (DS1307 RTC). PICKit 2 is attached to the USART header.

 

Here's a video capture of the PICKit 2 UART Tool interfacing with the design:

mt_nothumb:TAP-28_DB_DS1307_RTC_SIM

 

Modifications

I have made a couple of edits to the final design of the board - all of which are updated on the attached Gerber files. These include:

  • External power header location.
  • Track widths increased to 25 mils.
  • GND power plane added.

 

Download the Swordfish program and Gerber files here: TAP-28 DB (DS1307 RTC)

Download the Swordfish DS1307 library here: Swordfish Library - DS1307

Forum Activity

Member Access