Presentation is loading. Please wait.

Presentation is loading. Please wait.

University Of Central Oklahoma ENGR 3613 Dr. Yuhao Jiang April 23rd, 2012.

Similar presentations


Presentation on theme: "University Of Central Oklahoma ENGR 3613 Dr. Yuhao Jiang April 23rd, 2012."— Presentation transcript:

1 University Of Central Oklahoma ENGR 3613 Dr. Yuhao Jiang April 23rd, 2012

2  Baker, Andrew  Galloway, John

3  Design code for the Dragon12+ development board that will act as a microwave oven controller.  Must accept user input  Must be able to count down from a given time  Must provide graphical feedback  Must have multiple functions

4  We broke the project down into several different steps:  Displaying current time on 7-segment display ▪ Utilizing the on-board Real Time Clock (RTC)  Reading in user input and calculating the appropriate time needed to complete function  Timer functions

5  Freescale Code Warrior IDE software  Dragon12+ USB Development Board  On-board LCD screen  On-board 7-segment displays  On-board Real Time Clock  On-board USB to TTL converter

6  The Dragon12+ board has a built in DS1307 Real Time Clock.  This chip utilizes the I 2 C bus to communicate with the HCS12 microcontroller ▪ The chip can be programmed as well as read on the same bus, but uses 2 different bus addresses for this function  Since we hadn’t covered I 2 C is class, we decided to use a “soft I 2 C” instead, which isn’t as flexible as the hardware I 2 C, but would work for our applications.

7  The firmware was adapted from our senior design project (which heavily uses I 2 C)  This code “acts” as a hardware I 2 C except some functions such as interrupts, clock stretching, and bus collision avoidance aren’t implemented.

8 Images taken from NXP PCA8575 Datasheet

9 Images taken from DS1307 Datasheet

10 The process to get the I2C data is quite simple when it is broken down into different functions. This process is called roughly every second to keep the display updated to +/- 1 second time.

11  The on-board keypad was used for user input. We had previously written a function (for a lab) that could be called that would return what key, if any, was pressed. We had to modify this slightly to prevent the processor from taking multiple readings from a single key press, though this was simple to overcome by putting a hold in the code until all keys were released.

12

13 The function that was built also corrects for the difference in silkscreen printed on the Dragon12+ board vs numbering the keys from zero starting in the upper left hand corner. If a letter key or special function key (* or #) were pressed, a number was returned outside of the range of the keypad numbers, for example 10 would be returned if A was pressed, 11 returned if B was pressed, etc.

14

15  Program successfully performs as a human interface to control a microwave oven.  It can accept multiple inputs (Popcorn, Beef, Chicken, User defined time)  It counts down the time and displays remaining time as required  It shows the current time when not in use

16  Problems encountered:  The first attempt at the I2C firmware was unsuccessful ▪ We had to directly change the registers to change pin states rather than try and automate the process  Most of the code was taken from our previous labs for microprocessors  We were able to do this since we always tried to write the code in the most general case

17 Questions?


Download ppt "University Of Central Oklahoma ENGR 3613 Dr. Yuhao Jiang April 23rd, 2012."

Similar presentations


Ads by Google