I am facing a terrible issue regarding timing on windows. Googling arround, I've found those infos: Using QueryPerformanceCounter and QueryPerformanceFrequency APIs in Dev-C++ ( http://yeohhs.blogspot.com/2005/08/using -queryperformancecounter-and_13.html ) QueryPerformanceCounter() vs. GetTickCount() http://www.delphifaq.com/faq/delphi_windows_API/f345.shtml How to time a block of code http://www.cryer.co.uk/brian/delphi/howto_time_code.htm And Results of some quick research on timing in Win32 http://www.geisswerks.com/ryan/FAQS/timing.html With that I'm trying to write something like a uSleep function for windows: # include<windows.h> void uSleep ( int waitTime){ __int64 time1 = 0, time2 = 0, sysFreq = 0; QueryPerformanceCounter((LARGE_INTEGER *)&time1); QueryPerformanceFrequency((LARGE_INTEGER *)&freq); do { QueryPerformanceCounter((LARGE_INTEGER *)&time2); // }while((((time2-time1)*1.0)/sysFreq)<waitTime); } while ( (time2-time1) <waitTime); } T...
Hello Filipi,
ReplyDeleteTalking about open source hardware, some nice projects that I like a lot are the Arduino, which is very well know:
http://www.arduino.cc
I have an Arduino clone, a Seeeduino Mega. Very cool in the sense anybody can create "hardware" solutions for a lot of problems even having just a basic knowledge about electronics.
Another cool projects are the Minimig (an Amiga chipset re-implementation in a FPGA), Usebox (http://belogic.com/uzebox/) a very nice video-game running fully on a single microcontroller. In fact since hardware are ever more popular a lot of nice things are starting to show up.
Fabio Utzig
This one is also awesome!
ReplyDeletehttp://dangerousprototypes.com/2010/02/25/prototype-open-logic-sniffer-logic-analyzer-2/
Hi Fabio!
ReplyDeleteLog time hein..
I had already heard about Arduino Arduino. We are planning to buy some here at IDEIA, and start to use it as a standard arround here.
The Minimg is really cool. After seeing an image of one implementation of it on a Spartan 3 board, I started to study for my class of VHDL during my undergraduate studies.
The Uzebox is awesome, I had to build one for my kid :-)
And that logic sniffer is really the coolest one in those you told me. Just yesterday a colleague here from the IDEIA had asked me about a logic analyzer. I think he is gone build one.