Page 301 - ARM Based Microcontroller Projects Using MBED
P. 301

10.3 PROJECT 2—EXTERNAL INTERRUPT-DRIVEN EVENT COUNTER     287
            10.3.3 Block Diagram
              The block diagram of the project is shown in Fig. 10.5.

            10.3.4 Circuit Diagram

              Fig. 10.6 shows the circuit diagram of the project. A push-button switch is connected to
            GPIO pin PA_0 of the development board such that the state of the button is normally at logic
            HIGH and it goes to logic LOW when the button is pressed. The LCD is connected to PORTC
            of the development board as in the previous project.

            10.3.5 The PDL
              The program PDL is shown in Fig. 10.7.

            10.3.6 Program Listing

              Mbed provides several functions for handling external interrupts. Table 10.2 presents a list
            of the external interrupt functions. In this project we will be generating interrupts when GPIO
            pin PA_0 edge falls from HIGH to LOW.
              Fig. 10.8 shows the program listing (program: ExtInt). At the beginning of the program
            mbed.h and the LCD header file TextLCD.h (see previous project. You can copy and paste










            FIG. 10.5  Block diagram of the project.
























            FIG. 10.6  Circuit diagram of the project.
   296   297   298   299   300   301   302   303   304   305   306