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

AT89C51ED2 UART not work?

I downloaded AT89C51ED2 UART source code from ATMEL web.
when I connected from PC COM1 to AT89C51ED2 and sended a byte data, it sended a wrong byte data back.

Have some solutions about this @@?

Parents
  • hi erik

    "void serial_IT(void) interrupt 4 using 1"
    why use this "using 1"?
    can I ask for why?

    that is nothing on the rs232 connector.

    Hyperterminal seetings....i will try it.

    and another question,
    can I use 11.0592Mhz crystal?
    because code says it is using 11.059MHz.

    Regard.
    Yu-Hung Hsiao

Reply
  • hi erik

    "void serial_IT(void) interrupt 4 using 1"
    why use this "using 1"?
    can I ask for why?

    that is nothing on the rs232 connector.

    Hyperterminal seetings....i will try it.

    and another question,
    can I use 11.0592Mhz crystal?
    because code says it is using 11.059MHz.

    Regard.
    Yu-Hung Hsiao

Children
  • "void serial_IT(void) interrupt 4 using 1"
    why use this "using 1"?
    can I ask for why?

    It makes the compiler use another register stack for the ISR.

    and another question,
    can I use 11.0592Mhz crystal?
    because code says it is using 11.059MHz.

    who wrote the code was a bit lazy, and dis not include the last digit, the "correct" crystal is 11.0592

    Erik