??? 09/01/05 00:47 Read: times |
#100399 - Pinching a loaf Responding to: ???'s previous message |
Groan?
Type this out during your morning constitutional, did you? I have developed my bit-banging code in C...
When the start bit occurs, the first delay will be generated bitwidth/2 (208uS). The Interrupt Service Routine activates which repeats at 8 times for every 416us in order to capture the data bits because i want to detect the data bit in the middle of data bit'speriod. Well, I'd have hoped that you would have developed an understanding or at least some notion as to why the UART was not performing so well. You know, identifying the problem that you think a software UART will solve. As for your code, I'll just assume that it works -- at this point, it's not really important whether it does or doesn't. What's important is that you have described the algorithm above. Studying the 8051 databooks, datasheets, etc., you see that the hardware UART has a 16x sampling clock, and samples three times at mid-bit. Have you determined that for your particular RF link, the decoding is enhanced by instead sampling only once using the software UART? Anyway, by describing in a narrative form what you believe the problem to be (which you have not yet done) and then likewise describing an algorithm to solve that problem (well, you've described your algorithm, at least) -- that discipline to describe an algorithm rather than just hack one out is a step in the right direction. |