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

Serial communicaion Problem Simulayion is working but not in hw

#include <LPC21xx.H>
void uart0_init()
{

PINSEL0 = 0x00000005; U0LCR = 0x83; U0DLL = 97; U0LCR = 0x03;
}

void uart0_putc(char c)
{ while(!(U0LSR & 0x20)); U0THR = c;
}

void uart0_puts(char *p)
{ while(*p) { uart0_putc(*p++); }
}

int main (void)
{ uart0_init();
while (1) {
uart0_puts ("s");
} }

  • So think about things in the Real Hardware that would not be considered by simulation; eg,

    * Baud rate

    * Frame format

    * Physical connections

    * Issues with the device "receiving" the comms

    * etc, etc,...

  • yes sir i checked it but here not showing any errors ,if possible means tell me now what i want to do with this hardware................ here i am checked different baud rates but here is serial communication not working and as well as LPC2148 serial working but on that ADC is not working................ here LPC2129 ADC is working but Serial is not working....if you have any sample codes means please send my mail id:srinunaik2k8@gmail.com

  • Are clocks enabled, can you see a signal on the wire with an scope? Are there some examples in the ARM\boards or example directories, or documentation for your board. What's with the periods?

  • Remember that we have no idea what your project is trying to achieve, or what your system is other than what you explain & describe.

    "i checked it"

    You checked what, exactly?

    How, exactly, did you check it?

    What, exactly, were the results of your checks?

    "but here not showing any errors"

    Where?

    "tell me now what i want to do with this hardware"

    How can I tell what you want to do?!

    "i am checked different baud rates"

    Again: how, exactly, did you do those checks?

    And what, exactly, were the results of your checks?

    "serial communication not working"

    What are you trying to communicate with?