systemolz.blogg.se

Lpc2148 library for proteus 8
Lpc2148 library for proteus 8













lpc2148 library for proteus 8 lpc2148 library for proteus 8

In the above tutorial, we just discussed how to configure the PORTS for GPIO for blinking the LED's. Writing Logic 1 will set the PORT pin and writing 0 will Clear the particular PORT bit. This is the second approach in which IOPIN register is used for both setting and clearing the PORT pins.

lpc2148 library for proteus 8

LEDs are turned ON by sending a high pulse using IOSET register.Īfter some time the LEDs are turned OFF by sending the low pulse using IOCLR register. PORT1 pins are configured as GPIO using PINSEL register and then their direction is set as Output using the IODIR register. Note:It is recommended to configure the PORT direction and pin function before using it. Input: The current state of digital port pins can be read from this register, regardless of pin direction or alternate function selection (as long as pins are not configured as an input to ADC). Output: Writing to this register places corresponding values in all bits of the particular PORT pins. This register is used for both reading and writing data from/to the PORT. Writing 1s produces lows at the corresponding port pins. This register controls the state of output pins. Reading this register returns the current contents of the port output register, not the physical port value. Writing 1s produces highs at the corresponding port pins. This register individually controls the direction of each port pin. Primary (default) function, typically GPIO port Below table shows how to select the function for a particular pin using two bits of the PINSEL register. The remaining 16 bits(P0.16-P0.32) are configured using 32bits of PINSEL1 register.Īs mentioned earlier every pin has a max of four functions. This implies that we need two PINSEL registers to configure a PORT pins.īy this, the first 16(P0.0-P0.16) pin functions of PORT0 can be selected by 32 bits of PINSEL0 register. As there can be up to 4 functions associated with a GPIO pin, two bits for each pin are available to select the function. The required function can be selected by configuring the PINSEL register. Every GPIO pin has a minimum of one function and max of four functions. The Below registers will be used for Configuring and using the GPIOs for sending and receiving the Digital signals.Īlmost all the LPC1768 pins are multiplexed to support more than 1 function.















Lpc2148 library for proteus 8