| ??? 02/17/04 21:20 Read: times |
#64970 - RE: Changing serial protocol in BASIC-52 Responding to: ???'s previous message |
oops, seems I made my answer very quick and forgot some important thing... Sorry.
1) Could you post your code, please? 2) What whould I do: + set UART to 9 bits mode with RB8 set to "1"; + use modern C51 with FE bit; + set correct bit rate; + make simple UART ISR (see above). Now how does it look. - UART detects start bit; - it receives 7 data bits and parity bit as 8th one into SBUF; - it receives 9th bit which is first stop bit: if it is not "1" then reception will be drop; - Frame Error feature detects second stop bit: if it is not "1" then it sets FE bit to indicate that stop bit (in our case it is SECOND stop bit) is invalid; - ISR is executed and so: a) check for FE bit: if it is set then ignore received byte and clear FE as well; b) load SBUF into ACC and then look at P flag of PSW. At this point I should recommend you to do real tests because I never sure about what does mean Even/Odd parity: some vendors say that is set, another - reseted. Just test it. If wrong condition is detected then ignore received byte. Regards, Oleg |
| Topic | Author | Date |
| Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 | |
| Stop Bits - dont worry! | 01/01/70 00:00 | |
RE: Stop Bits - dont worry! | 01/01/70 00:00 | |
| RE: Changing serial protocol in BASIC-52 | 01/01/70 00:00 |



