Jack: Thank you so much. I filled out the form for samples of the Dallas Semi DS1302. I'll look into external EEPROMS... I am hoping to have the light test done by the end of December. Hopefully Dallas will send the chips. >I'm assuming you don't want to store a burst of > hundreds of samples/second No I don't need 100 of samples a second.. just one or two. Write me separate from the list and I can send an email about the project. What are you working on that is similar in nature? - Lewischicken --- Jack Smith wrote: > "I am intersted in the ability to time stamp an > analog > "signal, save that time to memory (WRITE) and then > at a > "later time... when a switch is pushed take > everything > "in memory (READ) and replay it in order of a > specific > "time sequence. > > "I have the MBasic manual...but it is not helpful. > Or I > "am not understanding it > > "... I can start simple: > "Every time I push button[A] its time and date are > "stored as a variable in the EEPROM. Then when I > flip a > "switch that information is recreated by turning a > "light on and then off in the exact same timed > sequence > "it was recorded. (on when pushed, off when not) > > I've implemented something quite similar in MBASIC. > The easiest way to get > time of day information is with an external real > time clock chip. > > Take a look at the MBASIC User's Guide, page 178-181 > covering ShiftIn, and > the Dallas Semi DS1302 real time clock. (Note that > there is an error in the > manual, as the sample code misses setting the > Day-of-the-Week, thereby > putting the Year into the DOW. You have to add an > extra data element. It's > shown in the DS1302 data sheet.) > > The idea is to use the DS1302 real time clock to get > the time/date (1 second > resolution) and then you can store the date/time to > EEPROM, along with the > ADC reading. > > You will find, however, that the build-in EEPROM is > not going to give you > very many data points if you store SS:MM:HH DD:MM:YY > + 10-bit ADC, you will > find that it consumes 8 bytes unless you compress > the data. You may also > need external EEPROM. If you look at Pages 184-184 > of the MBASIC User's > Guide, you will find some sample code demonstrating > how to write to an > external EEPROM chip. > > In short, what you are asking about is quite > accomplishable in MBASIC, but > it requires you to use a couple extra inexpensive > chips. > > (I'm assuming you don't want to store a burst of > hundreds of samples/second > and time each one to microsecond accuracy. That's > also possible, with mixed > MBASIC and assembler but is going to require a lot > more effort.) > > How soon do you need your project? I'm working on > some documentation that > might help you, but it's unlikely to be in useful > form until Spring 2004. > > Jack Smith > > -- > http://www.piclist.com hint: The list server can > filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.