This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RE: PINSEL0 in LPC2148 (UART1 INITIALISATION)

in the keil ide example prog of uart the ports used for enabling uart1 is PINSEL0 = 0x00050000;,but when comparing the pin with the lpc schematics the uart1 pins are p0.8,p0.9 ,i'm not getting how the uart1 is getting enabled.

also in another example for selecting uart0 he has given that

PINSEL0 &= 0xFFFFFFF0; // Reset P0.0,P0.1 Pin Config PINSEL0 |= 0x00000001; // Select P0.0 = TxD(UART0) PINSEL0 |= 0x00000004; // Select P0.1 = RxD(UART0)

but in schematic RxD pin is p0.1 but in PINSEL0 it is given as 0x00000004,

can anyone plz explain the initialisation of uart0 & uart1 in lpc2148.

Parents
  • If there is two bits of configuration for each pin, then you need to skip 16 bits if you are going to skip 8 pins.

    Each digit of a hexadecimal number is only four bits, i.e. setting the configuration for two I/O pins.

    1) Read my previous posts.
    2) Read the datasheet
    3) Read up a bit on hexadecimal numbers.

Reply
  • If there is two bits of configuration for each pin, then you need to skip 16 bits if you are going to skip 8 pins.

    Each digit of a hexadecimal number is only four bits, i.e. setting the configuration for two I/O pins.

    1) Read my previous posts.
    2) Read the datasheet
    3) Read up a bit on hexadecimal numbers.

Children
No data