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 D6→D5→D4→D3. 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 25 and then down-counting from 25 to 00 (in decimal system). There should be a sufficient dely between two number display status where a human can read them. This should loop infinitely.
Q3.
Write a program to read analog input from RA1 when SW5 is pressed and display the following messages on the LCD panel. "input is <= 2V" , "input is < =4V & > 2V", "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 testing your program : Use a 10k? potentiometer in the following configuration to provide the analog input. Use any of the GND pins in P2 as ground connection and the single female scocket next to PICkit3 connector as +5V and connect the mid pin of pot to RA1.)
Q4.
Write a program to display whatever you type on your computer key board(through TeraTerm) on the LCD display and display the message "Hellow 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)
Attachment:- detail.zip