120 likes | 199 Views
Survey Form. Simply put a cross in the appropriate answer for each question, e.g. The contact hours were sufficient Leave the other boxes blank. Agree Strongly. Agree. Neutral. . Task 1 Briefing. T he Design of an Electronic Dice. The Technology.
E N D
Survey Form Simply put a cross in the appropriate answer for each question, e.g. The contact hours were sufficient Leave the other boxes blank Agree Strongly Agree Neutral
Task 1 Briefing The Design of an Electronic Dice
The Technology • Based on the Microcontroller card you have built • Controlled by a C program in PC - this is what you must write • You do NOT have to program the microcontroller • ASCII characters are used to transfer data between PC and microcontroller
System Configuration RS232 to COM1 Circuit Board C Program on PC
What the Circuit Does • All communications is via RS232 (9600,N,8) • When the button is pressed – circuit sends Y • When the button is released – circuit sends N • Bit pattern of received character controls LEDs example: receives character @ which is 1000000 bit 6 LED turns ON, all others are off. or: receives character A which is ASCII 1000001 bit 0 and 6 LEDs turn ON.
System Diagram Push switch sends Y Release sends N Send character to display pattern
Example of Controlling LEDs Character to Control Display bit 0 bit 1 Receives the ASCII character 4 bit 2 bit 3 bit 4 This has bit pattern 0110100 bit 5 bit 6 So LEDs of bits 2, 4 and 5 are on
Flow of Program Start: Wait until button pressed (receive Y) count=0 While button pressed (not received N) increment count if (count=7) count=1 LED pattern=count delay Return to Start
What you have to do • Use hyperterminal or to familiarize yourself with the way the circuit board works • Practice using serial communications with C (see Help about Serial Communications) • Write pseudocode to describe the operation of the PC program • Write and debug your C program
What you must submit • You should submit a short report on your program containing: • The Pseudocode • The C program (including comments) • A description of the operation of the program • Report to be submitted in week 20 • Your lecturer will want to see the program working in week 20
For the Brighter Students • It is possible that some groups will finish the program before week 20. • Think how the program can be extended or • Design another game (or application) for the board. • Credit will be given for extra work done.
Students for Interview The following students should remember their interviews Chan Tsz Ho Benny Choi Chak Hung Li Kwun Wah Chun Hiu Fung Kwong Yik Kin Chan Wan Hong Tam Chun Man Rex Chow Wai Yin