| ??? 01/18/04 13:06 Read: times |
#62845 - RE: How to use port pin to simulated RS232 Responding to: ???'s previous message |
hi,
well, it is possible but problems: - probably you should use timer 2 with auto-reload mode for baud-rate accuracy; - it loads MCU. For example even at 9600 baud you will need step to ISR each ~100µs. There it should saves used registers, checks for UART state/counter, sends current bit if it is need, prepares next bit or stop condition and restores registers then exits. Depend on code it eats 10...30% (or more) of machine time and so it is not full correct debugging as Erik already mentioned: your program execution will be terminated often and often; moreover it uses additional program modules which may influence on main ones etc; - if you need not only to send but receive a data aswell then think about start-bit detection. Either use INT0/1/2 pin or polling method. First one requires defined pin; at second case you must increase timer speed for correct detection (at least for time while you wait for start-bit). It is because you should use 2-from-3 scheme to avoid false bits detection. BTW, why just not use one of current UARTs for debug purpose? For example, your MCU_A is connected to MCU_B via UART. Then take TX of MCU_A and connect it to RX of PC or what you use as debug machine. Then monitor what MCU_A sends over the net. You may even mask messages for MCU_B and PC with 9th bit mode - it requires only minimal program modifications (indeed, if you have not already use this mode). regards |
| Topic | Author | Date |
| How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: How many UARTs? | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| Search | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: ST3234 | 01/01/70 00:00 | |
| RE: ST3234 | 01/01/70 00:00 | |
RE: ST3234 | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 | |
| RE: How to use port pin to simulated RS232 | 01/01/70 00:00 |



