Presentation is loading. Please wait.

Presentation is loading. Please wait.

GVSU Pinewood Derby EGR 450 Greg Cooke Bob Humphrey.

Similar presentations


Presentation on theme: "GVSU Pinewood Derby EGR 450 Greg Cooke Bob Humphrey."— Presentation transcript:

1 GVSU Pinewood Derby EGR 450 Greg Cooke Bob Humphrey

2 Goals Modify pinewood derby track for addition of new components. Modify pinewood derby track for addition of new components. Create timing system for 4-lane pinewood derby to display time from start to finish for each car, using Motorola 68HC11. Create timing system for 4-lane pinewood derby to display time from start to finish for each car, using Motorola 68HC11. Write software in assembly language for control of 68HC11 and implementation of timing system. Write software in assembly language for control of 68HC11 and implementation of timing system.

3 Track Modification Contact added on start lever completes circuit when race started, setting a bit on the 68HC11. Contact added on start lever completes circuit when race started, setting a bit on the 68HC11. Plexiglass arms added at finish line with metal contacts under track to complete a circuit. Plexiglass arms added at finish line with metal contacts under track to complete a circuit. Cars knock arms over, break contact, clearing a bit on the 68HC11. Cars knock arms over, break contact, clearing a bit on the 68HC11.

4 And Theyre Off! When start lever completes circuit, software detects and branches to a race subroutine. When start lever completes circuit, software detects and branches to a race subroutine. Inside race subroutine, the current value of 68HC11s free-running timer is stored in memory for later calculations. Inside race subroutine, the current value of 68HC11s free-running timer is stored in memory for later calculations. Race subroutine then repeatedly checks bits to see when cars finish, until all cars have finished. Race subroutine then repeatedly checks bits to see when cars finish, until all cars have finished.

5 The Race The 68HC11s free-running timer has a range of 524.3ms. The timer will overflow several times during the race. The 68HC11s free-running timer has a range of 524.3ms. The timer will overflow several times during the race. Accumulator B is used as an overflow counter. Accumulator B is used as an overflow counter.

6 Cars knock arms over, breaking a circuit, clearing a bit in memory. Cars knock arms over, breaking a circuit, clearing a bit in memory. As each car finishes, software detects the bit change and stores the current timer value and current overflow count in memory locations designated for each cars data. As each car finishes, software detects the bit change and stores the current timer value and current overflow count in memory locations designated for each cars data. Finish Line

7 Post-Race Calculation The start timer value will be the same for each car. That value is subtracted from the timer range and stored. The start timer value will be the same for each car. That value is subtracted from the timer range and stored. For each car, the timer range is multiplied by the overflow count and stored. For each car, the timer range is multiplied by the overflow count and stored. Also for each car, the start timer value is added to the overflow time and the finish time, giving a total time. Also for each car, the start timer value is added to the overflow time and the finish time, giving a total time. The total time is then stored in memory. The total time is then stored in memory.

8 And the Winner Is… The times for each lane are displayed down to the hundredth of a second in Hyperterminal. The times for each lane are displayed down to the hundredth of a second in Hyperterminal. Times are always displayed from lane 1 to lane 4. Times are always displayed from lane 1 to lane 4. The results remain on the screen until a start button is pressed, indicating that a new race is ready to begin. The results remain on the screen until a start button is pressed, indicating that a new race is ready to begin.


Download ppt "GVSU Pinewood Derby EGR 450 Greg Cooke Bob Humphrey."

Similar presentations


Ads by Google