Beruflich Dokumente
Kultur Dokumente
KAAVIYA
17BEC1006
EMBEDDED SYSTEMS DESIGN
DIGITAL ASSIGNMENT 1
A. REQUIREMENTS
B. SPECIFICATION
C. ARCHITECTURE
HARDWARE:
SOFTWARE:
I. After receiving the data from the serial port, the data is
printed.
II. Printing the data
III. Monitor the keypad and display the changes
simultaneously.
D. COMPONENETS
HARDWARE COMPONENTS:
I. Rollers to aid the intake of the paper. (including
conveyor)
II. Similarly, rollers to aid the flow of the printed paper.
III. Main Power Supply -> Internal circuitry to reduce the
voltage.
IV. Ink Cartridge storage unit.
V. Wire - This is a high-voltage wire that gives a static
electric charge to anything nearby.
VI. Photoreceptor drum - so the drum gains a positive
charge spread uniformly across its surface.
VII. Laser - to make it draw the image of the page onto the
drum.
VIII. Ink roller - touching the photoreceptor drum coats it
with tiny particles of powdered ink (toner).
IX. USB port to communicate with PC.
X. Flash memory ROM and RAM for storing temporary
variables and stack
XI. LPC11U24 for the application
XII. 3.5” LCD display
XIII. 5 buttons keypad – to adjust printer settings
SOFTWARE COMPONENTS:
I. Readdata: Waits for the data to be received and action
as per data received
II. Print: Code to configure the printer to the settings
defined by the user.
III. Display: Display the info on the screen.
IV. Settings/up/down/OK/Back: To implement the changes
made by user on the general system settings
mentioned in specifications.
o Settings – Brightness, Contrast
o Up/down/OK/back are another function that
monitor the status of the other buttons of the
keypad and the result is updated in the function
Settings
o The appropriate variables are passed to
Task_Display.
V. Timer: Timer interrupt to delay the process (timer value
based on page number- 1st page = 10sec; next 11 pages
= 4.5455 sec each)
E. SYSTEM INTEGRATION
I. Checking for Bugs, fixing them.
II. Testing the product under various types of input
III. After verification, releasing the product into the
market
3. C++ code -
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int *datapointer;
int n = 5;
int dataarray[n];
datapointer = dataarray;
cout << "Output: " ;
for(int i=0; i<n; i++)
{
cout << *datapointer << " ";
datapointer++;
}
return 0;
}
4. Mbed code for metronome -
#include "mbed.h"
#include <stdio.h>
int main()
{
pc.printf("MBED METRONOME!\r\n");
period = 1;
redled = 1; //diagnostic
wait(.1);
redled = 0;
beat_rate.attach(&beat, period);
while(1){
if (up_button ==1) //increase rate by 4
rate = rate + 4;
if (down_button ==1) //decrease rate by 4
rate = rate - 4;
if (rate > 240) //limit the maximum beat rate to 240
rate = 240;
if (rate < 35) //limit the minimum beat rate to 35
rate = 35;
period = 60/rate; //calculate the beat period
pc.printf("metronome rate is %i\r", rate);
wait (0.5);
}
}
void beat()
{
beat_rate.attach(&beat, period);
//update beat rate at this moment
redled = 1;
wait(.1);
redled = 0;
}