| ??? 08/22/05 20:59 Read: times |
#99858 - Bit-banging/software UART on a AT89C2051 |
Hi All,
I'm relatively new to the world of microcontrollers, and I'm currently working on a project with a AT89C2051 chip as the main chip. The project is to make a simple calculator but with intentions to turn it into a serial I/O device for integration into later projects. I'm currently using half of the built in UART on the 2051 for a serial lcd screen I have hooked up to it and the other half for an input only serial port (current plan is to hook up a serial barcode scanner). However, I want to have a second full serial port to communicate with a computer. Since the 2051 only has one built in UART, it leaves me with a choice of either getting an external UART chip or doing a software UART. I'm already using 9 I/O lines of the 20 pin 2051 for a keypad and a LED, so I don't think I can use an external chip as I only have a few lines left. This leaves me with setting up a software UART. I've never written code for a software UART and currently not sure how to implement it for my situation. As you know, I'm already using the built in UART and I'm also using one timer for a simple scheduler (which currently just scans the keypad, but I might add more to this later) and the other timer for the built in UART. I also currently know very little assembler (that'll change soon :-), so I'd need to do this in C. Can anyone help guide me in implementing this software UART? Thanks, J Silverman |
| Topic | Author | Date |
| Bit-banging/software UART on a AT89C2051 | 01/01/70 00:00 | |
| this will be a mess when you do not have | 01/01/70 00:00 | |
| Re: this will be a mess when you do not | 01/01/70 00:00 | |
| now it is 3 devices | 01/01/70 00:00 | |
| Re: now it is 3 devices | 01/01/70 00:00 | |
| SW UART | 01/01/70 00:00 | |
| Re: SW UART | 01/01/70 00:00 | |
| Use a second 89C2051 | 01/01/70 00:00 | |
| you will have to anyhow | 01/01/70 00:00 | |
| The max has 2+2 drivers | 01/01/70 00:00 | |
| Some other things to think about | 01/01/70 00:00 | |
| TL16C754 software flow control question | 01/01/70 00:00 | |
what does that have to do with bit-bangi | 01/01/70 00:00 | |
| nope, there are many external UARTs ava | 01/01/70 00:00 |



