ASU CSE 318 Final Assesment Project - TM4C123G Tiva-C Based microwave system
The system was designed as a finite state machine on drawio then this model was used to code all the functions and states
void PAUSE ():
It basically pauses the timer and maintain the number of seconds so we can resume it anytime.
uint32_t ATI (char I [10]):
It changes an array of char(strings) to an integer.
void STOP ():
It clears the timer and disable the timer.
ENDSEQUENCE():
it flashes the red led 5 times and returns to idle state.
MICROWAVESTART ():
it starts the timer at microwave mode and gives the option to stop or pause the mode, there is a one that works the same way for the grill mode.
GRILLIDLE ():
it gives us the choice to either start or change the timer value and a similar mode exists for the microwave.
WELCOME ():
this function run at start and the microwave idle is set as the default mode with 100 seconds default timer.
Keypad_scanner ():
It uses if loop as the keypad need multiplexing to obtain which button is clicked.
Category | Max Use | Total Use |
---|---|---|
interrupt | 0 | 0 |
Program entry | 96 | 96 |
Uncalled function | 120 | 504 |
7'478 bytes of readonly code memory 634 bytes of readonly data memory 5'745 bytes of readwrite data memory
As we do not utilize the heap, so the stack is equal to the ram
0x1f68 = 8Kb
We made a macro function to use with debugging at breakpoints to use the systick timer current register to obtain the value of the current at the beginning and end of function ans subtract the to get the total number of cycles and the divide it by the clock frequency.
Since it is an estimate and at runtime the current does not change as the clock frequency does not change, so we get the run time current from the
datasheet = 17.6 , and sleep current from datasheet = 11.8 at all peripherals on , so that’s not the most accurate assumption as not all peripherals are on and their usage change through the run time , yet its is the best estimation we can get . If we need the real runtime power, we will probably need to use an oscilloscope probe to get interrupts current as its time is so small, so a multi-meter will not be able to scan it , and since the runtime is so small compared to the sleep time , we can assume that the sleep time is the power consumption of the system.
https://github.com/George-Ayad/Final-Project-CSE318-ASU-CHEP
- Omar Zohdi - 17p8190
- George Guirguis -17p8181
- Abanoub Tarek - 17p8196
- Fady Mina - 17p8187