Thursday, April 10, 2008

Lesson 2 Part 2

If you have wired the LCD as per connection schematic and successfully compiled and programmed the PIC, the LCD will show "I'm alive... :-)" on the upper row.

The bottom row of LCD will show an incrementing number (row 2, column 1) and decrementing number (row 2,column 9)

Pressing the switches will sound the buzzer. Either at 1000Hz or 1100Hz depending on which switch. If the switch connected to PORTB 7 is pressed, the buzzer will sound at 1000Hz.
Switch connected to PORTB 6 will sound buzzer at 1100Hz.

The LED will blink alternately at 100ms interval. (as per line 18 & line 20)

P/S. You can also make the buzzer sound 1000Hz at 100ms interval by changing line 21 to "if (PORTB.F2==1){

No comments: