??? 05/02/07 09:33 Read: times |
#138448 - different timing Responding to: ???'s previous message |
Gia,
You did not specify it, but I assume you are using a traditional 12-clock '51 derivative. There is a cca. 1% mismatch between your transmitter and receiver bit-timing routines, due to different cycle counts of MOV C,bit and MOV bit,C . For example, if you use 11.0592MHz crystal, your transmitter transmits at 9600 baud, but your receiver expects 9701 bauds. This, together with the fact that MOST of the logic-less four-leg optocouplers ARE too slow for anything but moderate baudrates*, puts your design on the edge. No wonder you transmit 01h correctly but 02h etc. not (slight baudrate mismatch exhibits itself on the higher bits). A single NOP should help a bit, but I recommend you to replace the optocoupler, too (see the footnote). JW --- * don't believe the datasheets - or, more precisely, read carefully under which conditions were they obtained - each volt and milliampere counts! To get 19200 from a PC817 I had to do various magic and well-chosen incantations and some huge collector current to the phototransistor and suffer decreased C-E voltage swing (original Sharps are very slightly better than the copies). One day we can discuss this further, but fornow for a safety margin, I recommend you to use a "digital" optocoupler, such as the H11L1 and similar, which guarantee you some 1Mbit/s or so. |
Topic | Author | Date |
bit-bang proplem | 01/01/70 00:00 | |
bit bang can be many things | 01/01/70 00:00 | |
Optocouplers | 01/01/70 00:00 | |
re:schematic and code | 01/01/70 00:00 | |
Speed? | 01/01/70 00:00 | |
Do you have a CRO to see the wave forms? | 01/01/70 00:00 | |
different timing | 01/01/70 00:00 | |
everything ok | 01/01/70 00:00 | |
not quite so... | 01/01/70 00:00 | |
requested sermon | 01/01/70 00:00 | |
thanks, Erik... | 01/01/70 00:00 | |
one more | 01/01/70 00:00 | |
that is not necessarily good enough | 01/01/70 00:00 | |
check time![]() | 01/01/70 00:00 |