서보모터 제어해보겠다고 간단하게 PWM으로 해보려고 했는데
클럭이 문제인지 자꾸 가장 왼쪾을 벗어 나려고 쑈하는 바람에
모터 고장날까봐 후다닥 -_-
pwmSetClock(1); -> 2.342kHz pwmSetClock(2); -> 4.81MHz pwmSetClock(3); -> 3.19MHz pwmSetClock(4); -> 2.398MHz pwmSetClock(5); -> 1.919MHz pwmSetClock(6); -> 1.6MHz pwmSetClock(7); -> 1.3MHz pwmSetClock(8); -> 1.2MHz pwmSetClock(9); -> 1.067MHz pwmSetClock(10); -> 959kHz pwmSetClock(11); -> 871kHz pwmSetClock(20); -> 480kHz pwmSetClock(200); -> 48kHz pwmSetClock(500); -> 19kHz pwmSetClock(1000); -> 9.59kHz pwmSetClock(2000); -> 4.802kHz pwmSetClock(4000); -> 2.401kHz pwmSetClock(5000); -> 10.58kHz [링크 : http://raspberrypi.stackexchange.com/questions/4906/control-hardware-pwm-frequency] |
The PWM controller incorporates the following features: • Two independent output bit-streams, clocked at a fixed frequency. • Bit-streams configured individually to output either PWM or a serialised version of a 32-bit word. • PWM outputs have variable input and output resolutions. • Serialise mode configured to load data to and/or read data from a FIFO storage block, which can store up to eight 32-bit words. • Both modes clocked by clk_pwm which is nominally 100MHz, but can be varied by the clock manager. [링크 : http://www.element14.com/.../43016-102-1-231518/Broadcom.Datasheet.pdf] |
+
2015.06.21
[링크 : http://www.rasplay.org/?p=6783] python
[링크 : https://learn.adafruit.com/adafruits-raspberry-pi-lesson-8-using-a-servo-motor/overview] python
The base clock has a frequency of 19.2 MHz. Setting a divisor of 400 along with a "range" of 1024 gives us a PWM frequency of 19200000/400/1024 = 46.875 Hz, or a period of 21.3 milli seconds.
[링크 : http://electronut.in/controlling-two-servos-with-hardware-pwm-on-the-raspberry-pi-model-a/]
[링크 : http://devkyu.tistory.com/349]
[링크 : http://razzpisampler.oreilly.com/ch06.html] stepper motor
'embeded > raspberry pi' 카테고리의 다른 글
라즈베리 파이 2 PWM-MS 모드 servo 제어 (0) | 2015.06.22 |
---|---|
라즈베리 파이 pwm 모드/값 별 파형 (0) | 2015.06.22 |
라즈베리 파이 lirc 리모컨 빠른 반복 (2) | 2015.06.20 |
라즈베리 파이 B/2B lirc on ubuntu wheezy + kodi (0) | 2015.06.20 |
크아앙 TSOP38238 불량 이었나!?!?!? ㅠㅠ (2) | 2015.06.18 |