Thursday, June 21, 2007

UART

i would like to share some knowledge here...


if let say, u want to get millions stream of data or bits from your external hardware and you want to test it on your PC, it is better if you capture these data or bits using hyper terminal..


in my case, i need 1 Gigabit of data from my external embedded hardware (i use Stratix FPGA development board), thus, i have to transfer the data from the external hardware to my PC through a serial communication interface (using RSA 232 protocol) --> actually u can transfer the data faster using universal serial bus (USB). At first, we write a c code in Visual C++ to capture the data continuously (looping 32 millions time to achieve 1 Gigabit) from external hardware and save it in a file. This method is actually consuming lots of memory, and if you are not writing your c code carefully, you'll face a problem of insufficient virtual memory and after 4 millions of cycle your pc hang. This happened to me lots of time. We troubleshoot the code, modify the code even try to break the output file into several fragments and put some delay between millionth iteration, yes, the insufficient virtual memory problem solved, but, the consequence is, the data rate transfer becomes slower and slower…we need to wait 1 day to get 153 Megabit (10% of 1 Gigabit)…


So, then we think another way of capturing big length of data using hyper terminal..we move the c code, and replace it with hyper terminal…the hyper terminal can save the captured bits from external hardware directly into the specified file and it is faster..moreover, we don’t face the insufficient virtual memory problem and my pc didn’t hang anymore…

1 comment:

skinoff said...

Hyper Terminal tu kat ne nak donload? I tau cuma Terminal LCC je :D hehehe which is not far from your areas right