Model Railroad Fast Clock
I would like to create a model railroad FAST CLOCK for use on my layout using the·SX Chip and a serial LCD, LCD APP MOD·or 7 Seq LED display.
The purpose of the fast clock is to speed up real time for running model train operating sesions.· For example, If the operating session will last 2 hours, we would want the clock to show a full 24 day in only 2 hours.· The software must allow for setting the session time frame with a start and a pause feature (for derailments or breaks).
I have used the BS2 with the RTC chip and know how to display the real clock screens but wasn't sure if this would be needed for this project.· I guess it would be good to have the real clock and the FAST Clock displayed on the same screen together or toggled.
I have the LCD APP MOD display with the four buttons - I could use this for the clock display and use the buttons as the inputs for setting the real time, start, pause, and scale modes.
I could increment the scale modes in even hours·or 30 minute increments to keep things simple.
Do you think I should use a software routine to take the real time and modify it for the FAST CLOCK or use some form of a·software timming sequence·using a count or other routine?
Any help or ideas are greatly appreciated.
Roy
PS - Any ideas on how to backlight the LCD APP MOD?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Roy Carlson
904-536-7405
roy-kathycarlson@msn.com
The purpose of the fast clock is to speed up real time for running model train operating sesions.· For example, If the operating session will last 2 hours, we would want the clock to show a full 24 day in only 2 hours.· The software must allow for setting the session time frame with a start and a pause feature (for derailments or breaks).
I have used the BS2 with the RTC chip and know how to display the real clock screens but wasn't sure if this would be needed for this project.· I guess it would be good to have the real clock and the FAST Clock displayed on the same screen together or toggled.
I have the LCD APP MOD display with the four buttons - I could use this for the clock display and use the buttons as the inputs for setting the real time, start, pause, and scale modes.
I could increment the scale modes in even hours·or 30 minute increments to keep things simple.
Do you think I should use a software routine to take the real time and modify it for the FAST CLOCK or use some form of a·software timming sequence·using a count or other routine?
Any help or ideas are greatly appreciated.
Roy
PS - Any ideas on how to backlight the LCD APP MOD?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Roy Carlson
904-536-7405
roy-kathycarlson@msn.com
Comments
·· The interface should be simple enough for kids to figure out, this will give you the greatest efficiency of fun.
··· Program it for modbus if an interface to a computer is needed.
Or, again an RTC outputs a 1Hz pulse, you could use that to trigger a counter that increments the "software" clock 12 units (24 hours = 2 hours is same as 12 hours = 1 hour).
Or if "precise" time is not needed, just keep a couple of counters (day, hour, minute second) and display them. Update them (i.e. add 12 units every seconds). Add a button in there that will stop the clock (Ah to power to STOP TIME, people will think you are a wizard!). Jon Williams wait_ms() routine with parameters like wait_ms(4,250) will give you a one second delay. With parameters like 1,83 will give you APPROXIMATELY your fast clock (1000/12)
BTW a cool RTC board is available here for only $7 USD (if you were to compare this to designing your own board, getting the battery and holder and all of the components together, you would see this is a real bargain)
http://www.futurlec.com/Mini_PCF8583.shtml
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
http://www.futurlec.com/Mini_DS1307.shtml
Here is a DS1302 (not DS1307) project I did using an SX-28 and·LCD:
http://forums.parallax.com/showthread.php?p=643780
Post Edited (T&E Engineer) : 10/22/2007 12:31:09 PM GMT
There cheapest shipping rate is·low ($4) but you will wait a couple of weeks as (at least for me) items ship from Thailand. I have tried their next higher shipping rate (big jump in cost)($16) - but it got here in only a 2-3 days.
[font=arial,helvetica,verdana color=#c41010 size=3]USA, Canada, UK, European Union(EU) and Australia[/font]
[size=+1]Standard Post [*]For orders up to US$29, Delivery Charge - US$4.00. [*]For orders US$30 to US$49, Delivery Charge - US$6.00 [*]For order US$50 to US$99, Delivery Charge - US$9.00 [*]For order US$100 and above, Delivery Charge - US$14.00
[size=+1]Express Post[/size] [*]For orders up to US$99, Delivery Charge - US$16.00. [*]For order US$100 and above, Delivery Charge - US$33.00
[size=+1]Courier[/size] [*]For orders up to US$99, Delivery Charge - US$33.00. [*]For orders US$100 and above, Delivery Charge - US$66.00 [/size]
If you made an interrupt that triggered every 1 millisecond, you could use a word counter and be able to scale the seconds from that.
If you made the counter start at 1000 you would get real time. If you started the counter at 100 you could get 10x real time (6 seconds to the minute). Starting the counter at 83 would give 12x real time. You would 24 hours in only 2 hours.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My goal is to live forever...Or die trying.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.hittconsulting.com
·
I'd just build it on one of the $10 SX48 protoboards that Parallax sells. You could also add checks for special "times" within your program and let it control relays, etc which can control events on your layout. The SX48 has lots of I/O and you should have pins and code space to spare.
If you like building circuits on a regular solderless breadboard first I do have a version of the SX48 in a nice 40-pin DIP form factor with a serial port and regulator onboard.
Good luck with your project!
Robert
Post Edited (RobotWorkshop) : 10/24/2007 3:51:14 PM GMT
I like your ideas and will try them over the weekend. I have the SX28 board but not the SX48.
I did like the idea of using the RTC chip to display the real time and could either use a LCD or 7 Seg display with a toggle to display real time or the fast clock time.
I could use a simple toggle button to switch the scale to compress a 24 day into 2, 3, 4, 6 or real time.
I think the application would warrant a button to start the day at 8 AM for the operating session.
I think I could use the MAX chip to display time to 7 segments which would keep things to a minimum.
Roy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·