Assembly Data Logging
Published Date: Mon, 08 Feb 2010 20:12:03 -0700
Goals:
AVR family processor. Make recommendation of which chip, based on programming needs and pins needed. Power conservation not a concern.
Code in assembly much preferred.
This is not open source code, non disclosure agreement if you bid/accept.
Contact me if you have questions.
This code is for data logging. Not to complicated. Once completed and verified you may be offered additional contract(s) to add on several more features and modules to the program. Line commenting is a must and should be understandable for the inexperienced programmer.
3 sensors:
Take ADC input and convert to a temp/pressure reading:
Comment all lines having to deal with voltage to numeric output display units so that final calibration can be done afterwards.
Each will be one wire sensor which will be connected thru voltage divider of the existing sensor; the existing sensor is an analog gauge using a thermistor.
Voltage range in the ADC to real world readings needs to be adjustable to true reading.
Display label of sensor and reading to the LCD with one of three led back light color. Each sensor will use its own back light color
Cycle thru each sensor every 1 second or less testing for warning levels.
Update LCD display 1-2 second delay between the readings.
Setup warning levels of the sensors for interrupts. This needs to be adjustable as well for the final PCB build. Comment lines so that the calibration can be re-written in the code where needed
Delay all warning level interrupt based on fourth sensors activity. Display only when fourth sensor is active.
Interrupt for warning levels of temppressure and display the current sensor that is in warning range.
Three color backlight one for each sensor.
Flash back light sensor’s color during warning.
Setoff buzzer during any/all warnings.
Cycle display of each sensor reading to LCD every 5-8 seconds except during warning level interrupt. If more then one warning level then each warning needs to be sent to the LCD every 3-5 seconds.
Use SPI for LCD interface: new haven LCD display model #NHD-0216K3Z-FSRGB-FBW
Time and date calendar such as the NJU6355 with program code to update with current time when programming each unit.
Secondary goals: data storage
External memory 1-2 MB non-volatile
Store change in sensor readings every 30-60 seconds with sensor’s reading, name and timedate tags
Store sensor’s data if in warning level, changes every 3-5 seconds.
Using usb jump drive type of storage, when you connect jump drive to port automatic download to the jump drive of all data.
Name the file being downloaded with serial number of unit and date/time
Erase data once transferred
Display message on LCD of downloading progress and unit’s serial number.
Display download complete.
Data can not be erased by the microcontroller on the flash drive. All data on flash drive must be preserved