Reference no: EM132373283
Embedded System Design Assignment - Laboratory Practicals
Q1. (a) Write a program to turn the LEDs ON in the following sequence D3→D4→D5→D6 and then turn them OFF in the following sequence D3→D4→D5→D6. This should loop infinitely. You should incorporate appropriate delay to make sure that it runs smoothly and a human eye can clearly see it.
(b) Write a program to run a DC motor connected to pins 1A and 1B in CW direction and reverse it when SW2 is pressed.
Q2. Write a program to display (on 7-segment) continuous up-counting numbers from 00 to 50 and then down-counting from 50 to 00 (in decimal system). There should be a sufficient delay between two number display status, where a human can read them. This should loop infinitely.
Q3. Write a program to read analog input from RA2 when SW5 is pressed and display the following messages on the LCD panel. "input is <= 1V" , "input is < =4V & > 1V", "input is > 4V" depending on the actual real-time analog input. (If the message goes over the first row display area, it should display on second line)
(To test your program: Use Analog out 1 in the sensor/actuator board.)
Q4. Write a program to display whatever you type on your computer key board(through TeraTerm) on the LCD display and display the message "Hello from CQU PIC Development Board" on TeraTerm terminal emulator on your Windows computer when you press switch S2. (You need to connect your PIC development board to your computer via USB to serial cable and configure TeraTerm appropriately for this. Use baud rate of 4800bps)
Assessment criteria: This assignment is based on C language programming skills. Answer to every problem should include a flowchart / NS-diagram or other similar graphical representation of the solution. All programs should have in-program comment lines and the algorithms/procedures used must be separately explained. A good working program as the answer to a question without evidence of development of it. Provide screenshots of your answers wherever applicable.