Ask Other Engineering Expert

Assignment : 2014 - 2015

Introduction

Microcontrollers are extensively used in household and industrial appliances. Drink dispensing machines are a typical application where a microcontroller interacts with the customer and prepares a drink according to the order placed. Other additional functions such as automatic price updates and a telephone link with the supplier etc can also be implemented to enhance the operation of these machines. A simplified drink-dispensing machine can be simulated in the laboratory. The PIC16F877A provided on the E-Block development system in the Embedded Systems laboratory is interfaced to a LCD via its PORTB and to 8 pushbutton switches and LEDs via its PORTD. These switches provide a means of entering data into the PIC and the LCD can be used as output device for displaying appropriate messages.

Aims

To develop a ‘C' program to simulate a drink-dispensing machine and to evaluate its operation using the development system boards in Embedded Systems laboratory. The inputs to the drink-dispensing machine are simulated by 5 pushbutton switches on PORTD. The LCD is used to display text messages and to provide visual indication of the process.

Objectives

1- To write a structured and annotated ‘C' program using the MikroC cross compiler.
2- To provide evidence of the development of each stage of the program. This will consist of producing a report and a logbook.
3- To demonstrate a functional (fully or partially) program to your tutor at a scheduled laboratory session.

Tasks

1- Display a menu of the type of drinks available on the LCD.
2- Use switches connected to RD0 and RD1 to move up and down the menu.
3- Use the switch connected to RD2 to make a selection.
4- Insert coins by means of RD0 - RD4.
5- Use LED connected to RD7 is simulate the number of coins returned.
6- Display suitable messages to inform the customer as the drink is made.

Evidence

1- Logbook containing your laboratory exercises and a formal report.
2- Demonstration of the project.
3- A disc containing your code files saved as embed1.* and an electronic copy of your formal report.

Operation

A simplified block diagram of the proposed drink-dispensing machine is shown below.

191_Drink-dispensing machine.png

Your program should:

1- Display the following choices on the LCD
- Cold drinks
- Hot drinks

2- If the Cold drink is selected then a second menu should provide the following choices.
- Orange juice
- Fizzy drink
- Water

To show the Water option, the display has to scroll down as RD0 is pressed.

3- If the Hot drink is selected then a second menu should provide the following choices.
- Tea
- Coffee
- Chocolate
- Soup

4- In all the cases, RD0 and RD1 are used to move the cursor up/down to highlight one of the choices. Where necessary the menu must scroll up/down to reveal other options.
RD2 is used to select the highlighted choice.

5- Once a drink has been selected, a message asking the customer to insert coins should be displayed. Coins are inserted by pressing RD0-RD4 so that the total value is equal to or exceeds the price of the drink. If no money or an insufficient amount is inserted then the machine should return to its original mode (first screen) after 5 seconds. All inserted coins should be returned by turning RD7 LED on for 5 seconds.

6- Any excess money (change) should be returned by displaying what change has been given. The LED connected to RD7 should flash once for each 5 pence coin returned. (e.g. flash 4 times for 20 pence).

7- A final message of "Drink dispensed" should be displayed for 3 seconds before returning to the first screen.

The following prices should be used to test your program.

Drink

Price

Orange juice

50 P

Fizzy drink

50 P

Water

75 P

Tea

80 P

Coffee

90 P

Chocolate

65 P

Soup

70 P

 

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M91583327
  • Price:- $180

Guranteed 48 Hours Delivery, In Price:- $180

Have any Question?


Related Questions in Other Engineering

Register design a cpu register is simply a row of

Register design A CPU register is simply a row of flip-flops (i.e. SR, JK, T, etc) put side by side in an array to make the size of register required. For example, an 8 bit register has 8 flip-flops side by side for stor ...

A detailed review of spatial modulation and simulation

A Detailed Review of Spatial Modulation and Simulation Learning Outcomes a. Learn how to model mobile communication channels d. Discern knowledge development and directions on the recent advances in 4G to the research pr ...

Mine safety amp environmental engineering assignment -part

Mine Safety & Environmental Engineering Assignment - Part 1 - Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the fo ...

Projectflow processing of liquor in a mineral refining

Project Flow Processing of Liquor in a Mineral Refining Plant The aim of this project is to design a flow processing system of liquor (slurry) in a mineral (aluminum) refining plant. Aluminum is manufactured in two phase ...

Learning outcomes evaluate multiuser communication and

Learning Outcomes Evaluate multiuser communication and resource sharing techniques; Apply the techniques of, and report on, digital communication applications using Matlab and hardware devices. Assignment Description The ...

Operations engineering assignment -please select only one

Operations Engineering Assignment - Please select only one of the following case studies for your assignment: CASE A. Tesla Motors Tesla is an innovative manufacturer that designs, assemble and sells fully electric vehic ...

Select a risk problem from the list below and prepare a

Select a risk problem from the list below and prepare a risk management plan in accordance with AS/NZS ISO 31000:2009. Please ensure that: - Establish the context clearly, in accordance with the Standard; - Define your s ...

Engineering materials term paper assignment -conduct a

ENGINEERING MATERIALS TERM PAPER ASSIGNMENT - Conduct a thorough literature search and write a 15-20 page technical review paper on the evolution of the engineering materials used in the manufacturing of any one of the f ...

Task 1using the lab kit design a circuit for the processor

Task 1: Using the lab kit, design a circuit for the processor to control the output of a connected 7-segment LED display device. You will be provided with a standard common anode 7-segment display of the type FND-507 (or ...

Control theory - lab reportsfor experiments 1 to 4 you must

Control Theory - Lab Reports For experiments 1 to 4 you must undertake the following: a) At the start of each section (including the pre-lab activities) there are a number learning outcomes. That is, what students should ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As