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

8051 Software UART.

You know this should be really easy to find but for some reason I am having no luck. First off, I'm a C programmer and I am really bad at reading Assembler code. I know there is a way to write a software UART for the 8051. I am using a Phillips P89C668 right now and I will be changing it to another soon.

If someone could point me to some sample code how to setup a half-duplex UART I would really appreciate it.

I have two pins and I am going to use one as tx and the other as rx. I don't think I need to do a full duplex but if there is something out there that does it I'll take it at this point!

Thanks.
-stv

Parents
  • I agree.. It was easy to do it and i did actually write it in C.

    However, like stated very early by Erik, there were a few (not too many) timing issues that I didn't want to keep coding around so I just mixed in assembler in my C.

    Ok.. So this is now figured out. Be a good thread for some C coder to read someday! :)

    Thanks to all.

Reply
  • I agree.. It was easy to do it and i did actually write it in C.

    However, like stated very early by Erik, there were a few (not too many) timing issues that I didn't want to keep coding around so I just mixed in assembler in my C.

    Ok.. So this is now figured out. Be a good thread for some C coder to read someday! :)

    Thanks to all.

Children