Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Sun Mar 01, 2015 4:42 am |
|
|
I must admit, I was surprised your version wasn't doing parity, since it was a very long time ago, when this didn't work.
I must admit when I last used it, it did seem to be right, testing with a serial monitor.
Have just tried the code, on three compiler versions, and the parity is correct. 4.141, 5.020, 5.030.
If you send 0, which with odd parity should result in bit9, being set, it does set this bit. Send 1, and it clears bit9.
The assembler is identical to what you post.....
Stick a serial monitor on the line and see what is happening. |
|