Most servo motor will work well on 50 Hz of PWM frequency;
this mean the PWM signal should have a period of 20ms.
This servo can operate 180° when given a pulse signal ranging from 600usec to 2400usec.
#define MIN_PULSE_WIDTH 600 // the shortest pulse sent to a servo #define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo #define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached #define REFRESH_INTERVAL 20000 // minumim time to refresh servos in microseconds
--------------
360° Servo
利用PWM控制轉的方向與轉速
360° servo 是藉由0.5~2.5ms HIGH PULSE
50Hz的脈波訊號做控制霢1.5ms HIGH PULSE是
位於停止的狀態;小於1.5ms 時順時霢轉動霢愈
小愈快;大於1.5ms 時霢時霢轉動霢愈大愈快。
------------------
S3C6410 的PWM 如何設定,才能得到20ms的週期 (50HZ)
如果 PCLK=83MHZ, 8-bit prescaler=255 and 4-bit divider=16
MIPS isn't generally considered a useful measure of performance - it's typically quoted based on choosing the fastest (likely one of the least capable) instructions on a machine, with no regard to the capabilities of that machine. Consider, if I built a machine that could only execute NOP, but could execute 200 million NOPs a second, it would be a 200 MIPS machine, however, if I built an entire fully feature CPU that could execute only 100 million NOPs per second (and NOP was the fastest instruction) but could also execute loads, stores, adds, multiplies etc. etc., it would be a 100 MIPS machine - however, the NOP-only machine appears (using the MIPS measure) to be twice as "good" despite being useless. DMIPS is based on the time taken to execute a particular benchmark, something which might be considered representative of a real workload, namely Dhrystone. The DMIPS figure for a given machine is the relative speed a VAX 11/780 (a particular "1 MIPS" machine) would have to run at to complete the benchmark in the same amount of time as the machine being measured. For example, if a 100MHz CPU completes the benchmark 200 times faster than the VAX 11/780 does, then it would be considered a 200 DMIPS machine. For CPUs that can be run at various frequencies, then you'll often see this value reported divided through by MHz, e.g. 2 DMIPS/MHz in this example. So, the quick answer is that (unlike MIPS) DMIPS can't be calculated, it can only be measured. There are further details, and a link to the Dhrystone source code here:http://en.wikipedia.org/wiki/Dhrystone
non-static variable xxx cannot be referenced from a static context
同樣的你也不能在static method 中呼叫非static 的method
non-static method xxxx() cannot be referenced from a static context
由於static 成員是屬於類別而不是物件,所以當您呼叫static 方法時,並不會傳入物件的位置參考,所以static方法中不會有 this 參考,由於沒有this 參考,所以在Java 的static 方法成員中不允許使用非static 成員,因為程式沒有this 來參考至物件位址,也就無法辨別要存取哪一個物件的成員,事實上,如果您在static 方法中使用非static 資料成員,在編譯時就會出現以下的錯誤訊息:
non-static variable test cannot be referenced from a static context
或者是在static 函式中呼叫非static 函式,在編譯時就會出現以下的錯誤訊息:
non-static method showMe() cannot be referenced from a static context