Python: comunicación en serie; función de sueño

I have been trying to send some data from python to a FPGA for processing. Due to some constraints on the receiving side, i had to introduce a sleep.

El código es el siguiente:

for rowNum in range(640):  
    for colNum in range(480):  
        for depth in range(64):  
            x = ser.write(imageArray[depth][colNum][rowNum])  

The size of the data I am sending is 640*480*64 at a baud rate of 115200bps. Ideally, it should take, (640*480*64 ms + 640*480*64*10/115200 seconds which is ~6 hours) The *10 is because of the number of bits in my one byte.

But, my transfer is taking more than 24hours. Any idea why this is happening? The reception side has no problems.


preguntado el 03 de mayo de 12 a las 16:05

How long does it take if you comment out the ser.write() line? That'll tell you whether the problem lies with ser.write() o en algún otro lugar. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.