using exisiting c code and circuit add on components and program for new components. i have a atmel mega168 that i am using to take analog to digital readings from three sensors. i need to add on memory, real time clock, serial number on processor chip, and code needed to save data with time, date, serial number, and sensor data. also i need to add a time/date stamp and hourmeter for a fourth sensor high/low (engine on/off state)? input.
when the sd/mmc card is inserted into the port the processor needs to automatically start a down load of all data in memory, naming the file with the current serial number of the processor plus a four digit date at the end of the serial number string. the data to be saved will be general sensor readings every 1 minute with out of range reading being saved every 3 seconds, once the readings are back in range then the data will be stored every minute.? the circuit needs to have a reusable type memory storage that is recording in a loop. if the memory is over filled then the new data replaces the oldest data. the memory is what is downloaded to the external sd/mmc card upon insertion. the data is not deleted upon download. the memory storage loop will work for getting new data to the card upon sequential downloads.
## Deliverables
if you think a better processor chip would be advised then i will listen to suggestions. also try to think inside the atmel family that can be tested in my enviroment, which means DIP chips. no smd/smt chip. for the added needs on the extra components a 40 pin DIP such as the mega8515 would be a better idea. my current circuit is using all but two pins of a atmega168.
i will add a battery circuit to the real time clock, and nothing else will have battery back up. the processor does not need to be active if the power is off.? also present options for a bootloader so that i can use a sd/mmc card to update software/time. i intend to use the 6 pin isp for any programming but a seperate bootloader option i would like to discuss for future firmware.