Quote Originally Posted by Snap View Post
I am trying to build a timer for my slot car track with VB and a pic. I am using a pic 16f84a but can also use the 877 for more I/O ports. My question is this ..
Can the 9800 baud (whatever) serial com port handle a 1000th of a SECOND input or will it crap out under the speed it takes to get the signal and process it into the monitor. I could just trigger the built in timer for VB but as we all know it is not the most accurate of controlls. I want the Pic to tell the PC the elasped time in real time. I might be able to use get time option in VB but I want to use the PIC. Once I get the signal into VB I can generate charts., graphs whatever I just need to know should I be trying to solve this in pic basic and send the info to VB or vice versa....
Any suggestions (There are no wrong answers)
9600 baud = 9,600 bits per second. One byte = 8 bits, plus one start bit, plus one stop bit = 10 bits total, plus an extra bit time for a space between bytes = 11 bits....
9,600 = 11 = 872.72 bytes per second = .00114583 seconds per byte.
Can the PIC handle the speed? Sure, the PIC can handle a lot of speed. But, as you can see, at 9600 baud, each byte takes more than 1/1000 of a second to transmit. So, if you have 2 cars hit the trap at the same time, and your max resolution is actually 1/1000 second, the second message might get missed.