Hi everyone!
I have an FTDI FT232R. I need to produce a stream of data (which will be read off a binary file) that will be output at a constant rate (6144 bytes/second) in Bit Bang Mode.
I have Windows 7 and I am trying to use ftd2xx LIB to create an application in C that will do that for me. I was successful in producing the correct stream but because Windows is not a RealTime OS the timing in my output is pretty random.
I figured I could just wait until the transmit buffer is almost full and keep it always almost full - this way the data would just be output at the Baud Rate I set it to. I just can't figure out how make this happen (checking when transmit buffer is full and if it's not then feed more data, if it is full then halt until it has room for more data). Can anyone please help me?
I have an FTDI FT232R. I need to produce a stream of data (which will be read off a binary file) that will be output at a constant rate (6144 bytes/second) in Bit Bang Mode.
I have Windows 7 and I am trying to use ftd2xx LIB to create an application in C that will do that for me. I was successful in producing the correct stream but because Windows is not a RealTime OS the timing in my output is pretty random.
I figured I could just wait until the transmit buffer is almost full and keep it always almost full - this way the data would just be output at the Baud Rate I set it to. I just can't figure out how make this happen (checking when transmit buffer is full and if it's not then feed more data, if it is full then halt until it has room for more data). Can anyone please help me?