Travin77,

See this post

http://www.picbasic.co.uk/forum/showthread.php?t=2129

It describes how to make a “RTC” without a RTC chip using a 4.0MHz xtal and TMR0. The approach can easily be modified for other xtal frequencies and TMR1. The first program in the referenced post has some button routines for setting the initial time.

The RX and TX Pins can be connected to the on-board hardware USART (via register settings). To use these two pins in this manner, you can use the HSERIN and HSEROUT commands. If you do not need the capabilities of the USART, you can use any pin that can be made an output (including the pins marked RX and TX) and the DEBUG, SEROUT, or SEROUT2 commands or any pin that can be made an input and the SERIN and SERIN2 commands. See the manual and datasheet for more information on this. Good Luck,

Paul Borgmeier
Salt Lake City, Utah
USA