has the fullduplexserial object got a fifo?
Lee Marshall
Posts: 106
what happens if a byte is received and the rx routine hasn't been called?
does the last received byte disappear, and get replaced, or does the new byte go into a queue.
im asking because my application needs to receive about 25 bytes one-after-the-other, wait 50ms, then receive another 25.
now my other question: how fast is SPIN code executed, are we talking about 1 instruction per millisecond or 1 per microsecond? i just need a ballpark figure.
here is my math i am using to decide whether or not to worry:
1/19200(baud rate) = 52us(per bit)
10 bits in standard UART transmission, so that's 520us per byte.
520us to process the byte and be ready for the next one.
so, 520us/0.05us(instruction time) = 10400.
theoretically, i can carry out 10400 normal instructions in that time.
or 520us/0.275us(worst case hub instruction time) = 1891 hub instructions
this is little help, though, if i don't know how long SPIN directives take.
100 cycles? 1000 cycles??????? 30??
i have tested this, and found it to work properly, but i wish to increase my baud rate to, say, 115200, which could prove problematic without a fifo on the uart if im using SPIN code, which the fullduplexserial object needs.
Any help would be great
Lee.
Post Edited (Lee Marshall) : 10/29/2008 3:59:54 AM GMT
does the last received byte disappear, and get replaced, or does the new byte go into a queue.
im asking because my application needs to receive about 25 bytes one-after-the-other, wait 50ms, then receive another 25.
now my other question: how fast is SPIN code executed, are we talking about 1 instruction per millisecond or 1 per microsecond? i just need a ballpark figure.
here is my math i am using to decide whether or not to worry:
1/19200(baud rate) = 52us(per bit)
10 bits in standard UART transmission, so that's 520us per byte.
520us to process the byte and be ready for the next one.
so, 520us/0.05us(instruction time) = 10400.
theoretically, i can carry out 10400 normal instructions in that time.
or 520us/0.275us(worst case hub instruction time) = 1891 hub instructions
this is little help, though, if i don't know how long SPIN directives take.
100 cycles? 1000 cycles??????? 30??
i have tested this, and found it to work properly, but i wish to increase my baud rate to, say, 115200, which could prove problematic without a fifo on the uart if im using SPIN code, which the fullduplexserial object needs.
Any help would be great
Lee.
Post Edited (Lee Marshall) : 10/29/2008 3:59:54 AM GMT
Comments
2) The execution speed of Spin statements depends on the complexity of the statements involved because they're compiled into byte codes and individual byte code interpretive instructions take on the order of microseconds.
3) FullDuplexSerial is certainly capable of handling 230KBps. You probably want a larger buffer in that case.
Post Edited (Mike Green) : 10/29/2008 4:01:02 AM GMT
if i really cranked everything up, framerate, baud rate to what i would call perfect, i would still have 8ms after all reception was complete to do processing.
so what do i change to make it a 32-byte buffer? is simply the size of the rx_buffer array, or is there some other number which needs to change.
i find prop asm very readable for some reason.
I recommend using the Multiple Port Serial Driver from the Propeller Object Exchange. This provides for a 64 byte buffer and supports up to 4 serial ports with the maximum Baud depending on the number of ports initialized. With two ports in use, the maximum Baud is 230KBps. It also supports the optional use of RTS and CTS.