Ds1302/emic
Newzed
Posts: 2,503
I have just completed the incorporation of my EMIC progrm into my DS1302 program.
EMIC now says:
"The time is fifteen twenty-eight"
then one second later she says:
"Today is Sunday the twenty fifth of July"
It is a pretty tricky program in a couple of respects - if you are planning to do something like this and need a bit of help, I'll be happy to oblige.
The hardest part was getting her to say the day of the week.
I did this one all by myself but I have to thank Jon Williams for an education in data handling.
Sid
EMIC now says:
"The time is fifteen twenty-eight"
then one second later she says:
"Today is Sunday the twenty fifth of July"
It is a pretty tricky program in a couple of respects - if you are planning to do something like this and need a bit of help, I'll be happy to oblige.
The hardest part was getting her to say the day of the week.
I did this one all by myself but I have to thank Jon Williams for an education in data handling.
Sid
Comments
mins = $10m (or $42 or something, from DS1302)
IF· mins.lownib = 5 or mins.lownib = 0 THEN
(display mins)
GOTO start
ELSE
DEBUG "no go", cr
GOTO start
ENDIF
Is there a better way to do it?
Sid
Check_Announce:
· IF (mins.LOWNIB = 5) AND (secs = 0) THEN
··· ' announce the time here
· ENDIF
·This should cause the announcement to happen just once.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I've added an ADC/LM34 serin input to the program and now she tells me time, date and temperature.
This is really a cool gadget !
Sid
We have alarms set for certain times of day, and high temperature values. The temperature alarms trigger a routine that cranks up the EMIC volume before announcing the alarm temperature, and the display goes into full-brightness mode to be seen from a greater distance.
Pretty nifty considering the whole setup still leaves plenty of Stamp I/O-pins available for other gadgets.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards,
Bruce
tech@rentron.com
http://www.rentron.com
·· Are you using Burst Mode to read/write to the DS1302?
Just curious...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
GetClk:
· HIGH Rst
· SHIFTOUT Dio,Clkc,LSBFIRST,[noparse][[/noparse]191]
· SHIFTIN Dio,Clkc,LSBPRE,[noparse][[/noparse]secs,mins,hrs]
· SHIFTIN Dio,Clkc,LSBPRE,[noparse][[/noparse]date,month,day,year]
· SHIFTIN Dio,Clkc,LSBPRE,[noparse][[/noparse]CTRL]
· LOW Rst
· RETURN
I use 191 instead of $BF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
check out our 4-digit serial LED
http://hometown.aol.com/newzed/index.html
·
The EMIC uses 4 lines, the LED 3 lines and the 1302 3 lines, leaving 7 lines free.· The Dio line for the 1302 can often be used for other things so actually there are 8 lines free.· My temp info is serined from another module.· And even with the large number of variables required, especially for the 1302, I still have 3 bytes and 1 nibble left in RAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
check out our 4-digit serial LED
http://hometown.aol.com/newzed/index.html
·
if mins = $00 then
serout Tx, T2400, [noparse][[/noparse]say, "The time is ", hex2 hrs, " hundred", eom]
and it worked perfectly.· Thanks for the tip.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
check out our 4-digit serial LED
http://hometown.aol.com/newzed/index.html
·