'embeded > raspberry pi' 카테고리의 다른 글
라즈베리 파이 Zero @ 5$ ?!?!? (2) | 2015.11.26 |
---|---|
rtos on rpi (0) | 2015.11.11 |
라즈베리 파이 CLCD 라이브러리 (0) | 2015.11.03 |
bcm2835 pwm 데이터시트 (0) | 2015.10.16 |
wiringpi pwm 라이브러리 분석? (0) | 2015.10.16 |
라즈베리 파이 Zero @ 5$ ?!?!? (2) | 2015.11.26 |
---|---|
rtos on rpi (0) | 2015.11.11 |
라즈베리 파이 CLCD 라이브러리 (0) | 2015.11.03 |
bcm2835 pwm 데이터시트 (0) | 2015.10.16 |
wiringpi pwm 라이브러리 분석? (0) | 2015.10.16 |
이렇게 비교하니 차이점이 좀 보이네..
LM3S617 << 스테핑 모터 RDK MCU
|
lm3s1607 |
lm3s811 |
uart |
3 |
2 |
i2c |
2 |
1 |
timer |
4 |
3 |
flash / sram |
128k / 32k |
64k / 8k |
PWM |
- | 3 |
adc |
8 |
4 |
analog comparator |
- |
1 |
target |
■ Remote monitoring ■ Electronic point-of-sale (POS) machines ■ Test and measurement equipment ■ Network appliances and switches ■ Factory automation ■ HVAC and building control ■ Gaming equipment ■ Motion control ■ Medical instrumentation ■ Fire and security ■ Power and energy ■ Transportation |
■ Factory automation and control ■ Industrial control power devices ■ Building and home automation ■ Stepper motors ■ Brushless DC motors ■ AC induction motors |
ADC 샘플 시퀀서... (0) | 2015.11.17 |
---|---|
axf to bin (6) | 2015.11.11 |
bitband 고찰.. (0) | 2015.10.23 |
lm3s617 stepper rdk (0) | 2015.10.13 |
lm3s spi / ssi (0) | 2015.10.06 |
한번 연결해봐야지
int lcdInit (int rows, int cols, int bits, int rs, int strb, int d0, int d1, int d2, int d3, int d4, int d5, int d6, int d7) ; In the above Fritzing diagrams, the 4-bit one would be initialised by: fd = lcdInit (2, 16, 4, 11,10 , 0,1,2,3,0,0,0,0) ; and the 8-bit one by: fd = lcdInit (2, 16, 8, 11,10 , 0,1,2,3,4,5,6,7) ; |
+-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 2 | 8 | SDA.1 | ALT0 | 1 | 3 || 4 | | | 5V | | | | 3 | 9 | SCL.1 | ALT0 | 1 | 5 || 6 | | | 0v | | | | 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | ALT0 | TxD | 15 | 14 | | | | 0v | | | 9 || 10 | 1 | ALT0 | RxD | 16 | 15 | | 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 | | 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | | | 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 | | | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 | | 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | | | 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 | | 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 | | | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 |
|
4bit 22 27 17 7 8 18 |
8bit 22 27 17 4 7 8 25 24 23 18 |
4bit
8bit
[링크 : https://projects.drogon.net/raspberry-pi/wiringpi/lcd-library/]
[링크 : https://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi/overview]
+
If using wiringPi v2, then you need to add in -lwiringPiDev as well as -lwiringPi
[링크 : https://projects.drogon.net/raspberry-pi/wiringpi/lcd-library/]
rtos on rpi (0) | 2015.11.11 |
---|---|
clcd - bona cm04075 / lc1628 (0) | 2015.11.04 |
bcm2835 pwm 데이터시트 (0) | 2015.10.16 |
wiringpi pwm 라이브러리 분석? (0) | 2015.10.16 |
라즈베리 파이 GPIO 유틸 PWM (0) | 2015.10.14 |
부트로더 영역은 그냥 접근할수 없어서 조금 번거롭지만
아무튼 결론은.. 쓸수있다! 다만 속도 향상이나 여러가지 마이너스 되는 부분은 있다! 인가?
하늘별 2013-08-31 09:27 180.224.165.213 Exynos4412(U2/X2) 는 eMMC4.1 만 지원하면 , eMMC4.5 읽기 속도를 낼 수는 없습니다. 다만 쓰기 속도는 빨라집니다. 침묵 2013-08-31 10:54 118.40.145.52 u2에 emmc 4.5가 인식은 되지만 읽기는 4.1,쓰기는 4.1 이상으로 작동된다는 말씀이지요? 잘알겠습니다. |
그래서 혹시 eMMC C1과 XU3가 호환이 되는지 알고 싶습니다. codewalker 2015-01-15 11:41 220.90.137.115 u-boot만 다시 fusiong 하면 사용 할 수 있습니다. 아래 내용을 참고하세요. http://codewalkerster.blogspot.kr/2014/02/how-to-recovery-emmcemmc-50-u-boot-on.html [링크 : http://com.odroid.com/sigong/nf_board/nboard_view.php?brd_id=odroidxuthree&bid=5482] |
odroid u3 사용준비! (0) | 2016.09.02 |
---|---|
odroid u3 지름! (0) | 2016.09.02 |
eMMC에 대한 환상은 깨도 되려나? (0) | 2015.11.11 |
또 다른 선택.. Odroid C1 (0) | 2015.04.17 |
odroid (0) | 2014.05.21 |
jtag/swd pullup & pulldown (0) | 2015.12.17 |
---|---|
jtag과 swd (0) | 2015.12.14 |
arm9 dsp / arm11 simd instuction 비교? (0) | 2015.10.01 |
arm11 simd instruction (0) | 2015.10.01 |
cortex-A5/A7 (0) | 2015.09.21 |
이게 정말 효율적일까? 라는 의문이 새록새록
일단.. 주소 연산하려면
* 2번(혹은 << 2번)
+ 1번
3번의 연산
만약 1비트를 조작하기 위해서 저 연산을 해야 하는데...
negation 과 and 연산이면 충분한데.. 오히려 연산량이 더 필요할 지도?
stellarisware의 bitband.c 예제
#define HWREGBITW(x, b) \ HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 | \ (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2)) for(ulIdx = 0; ulIdx < 32; ulIdx++) { HWREGBITW(&g_ulValue, 31 - ulIdx) = (0xdecafbad >> (31 - ulIdx)) & 1; PrintValue(g_ulValue); Delay(1); } |
32비트 주소체계라 4바이트 씩 띄엄띄엄 값이 들어있다.
[링크 : http://www.ti.com/lit/ds/symlink/lm3s1968.pdf]
2013/08/16 - [embeded/Cortex-M3 Ti] - bitband / cortex-m3
axf to bin (6) | 2015.11.11 |
---|---|
lm3s1607 / lm3s811 비교 (0) | 2015.11.03 |
lm3s617 stepper rdk (0) | 2015.10.13 |
lm3s spi / ssi (0) | 2015.10.06 |
lm3s stellarisware SPI (0) | 2015.10.05 |
balanced 모드(기본값)에서는 N/M (date / range)
When MSEN=0, which is the default mode, data to be sent is interpreted as the value N of the algorithm explained above. Number of clock cycles (range) used to send data is the value M of the algorithm. Pulses are sent within this range so that the resulting duty cycle is N/M. Channel sends its output continuously as long as data register is used, or buffer is used and it is not empty.
mark-space 모드에서는 M/S (data / range)
When MSEN=1, PWM block does not use the algorithm explained above, instead it sends serial data with the M/S ratio as in the picture below. M is the data to be sent, and S is the range. This mode may be preferred if high frequency modulation is not required or has negative effects. Channel sends its output continuously as long as data register is used, or buffer is used and it is not empty.
[링크 : http://www.farnell.com/datasheets/1521578.pdf] 139page
clcd - bona cm04075 / lc1628 (0) | 2015.11.04 |
---|---|
라즈베리 파이 CLCD 라이브러리 (0) | 2015.11.03 |
wiringpi pwm 라이브러리 분석? (0) | 2015.10.16 |
라즈베리 파이 GPIO 유틸 PWM (0) | 2015.10.14 |
DHT-11 DHT-22 RHT-03 (0) | 2015.10.14 |
데이터 시트상으로는 PWM 1과 PWM 2 채널 독립적으로
모드를 설정하여 사용이 가능해야 하나...
wiringPi에서는 편의상.. 걍 묶어 버렸다!!!!
wiringPi/wiringPi $ vi wiringPi.c
void pwmSetMode (int mode) { if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO)) { if (mode == PWM_MODE_MS) *(pwm + PWM_CONTROL) = PWM0_ENABLE | PWM1_ENABLE | PWM0_MS_MODE | PWM1_MS_MODE ; else *(pwm + PWM_CONTROL) = PWM0_ENABLE | PWM1_ENABLE ; } } void pwmSetRange (unsigned int range) { if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO)) { *(pwm + PWM0_RANGE) = range ; delayMicroseconds (10) ; *(pwm + PWM1_RANGE) = range ; delayMicroseconds (10) ; } } void pwmSetClock (int divisor) { uint32_t pwm_control ; divisor &= 4095 ; if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO)) { if (wiringPiDebug) printf ("Setting to: %d. Current: 0x%08X\n", divisor, *(clk + PWMCLK_DIV)) ; pwm_control = *(pwm + PWM_CONTROL) ; // preserve PWM_CONTROL // We need to stop PWM prior to stopping PWM clock in MS mode otherwise BUSY // stays high. *(pwm + PWM_CONTROL) = 0 ; // Stop PWM // Stop PWM clock before changing divisor. The delay after this does need to // this big (95uS occasionally fails, 100uS OK), it's almost as though the BUSY // flag is not working properly in balanced mode. Without the delay when DIV is // adjusted the clock sometimes switches to very slow, once slow further DIV // adjustments do nothing and it's difficult to get out of this mode. *(clk + PWMCLK_CNTL) = BCM_PASSWORD | 0x01 ; // Stop PWM Clock delayMicroseconds (110) ; // prevents clock going sloooow while ((*(clk + PWMCLK_CNTL) & 0x80) != 0) // Wait for clock to be !BUSY delayMicroseconds (1) ; *(clk + PWMCLK_DIV) = BCM_PASSWORD | (divisor << 12) ; *(clk + PWMCLK_CNTL) = BCM_PASSWORD | 0x11 ; // Start PWM clock *(pwm + PWM_CONTROL) = pwm_control ; // restore PWM_CONTROL if (wiringPiDebug) printf ("Set to: %d. Now : 0x%08X\n", divisor, *(clk + PWMCLK_DIV)) ; } } |
라즈베리 파이 CLCD 라이브러리 (0) | 2015.11.03 |
---|---|
bcm2835 pwm 데이터시트 (0) | 2015.10.16 |
라즈베리 파이 GPIO 유틸 PWM (0) | 2015.10.14 |
DHT-11 DHT-22 RHT-03 (0) | 2015.10.14 |
dSPIN_raspi / L6470 / sparkfun (0) | 2015.10.12 |
1024 로 설정되면
30 ~ 110 범위로 180도를 오가는지라 해상도가 낮아졌는데
100으로 설정하고 range를 키워주면 상당부분 해소 될듯
기존의 80/180=2.25도에서 320/180=0.56도로 4배 정도 해상도가 향상된다.
$ gpio mode 1 pwm
$ gpio pwm-ms
$ gpio pwmc 400
$ gpio pwmr 1024
$ gpio pwm 1 30
$ gpio pwm 1 70
$ gpio pwm 1 110
$ gpio pwmc 200
$ gpio pwmr 2048
$ gpio pwm 1 60
$ gpio pwm 1 140
$ gpio pwm 1 220
$ gpio pwmc 100
$ gpio pwmr 4096
$ gpio pwm 1 120
$ gpio pwm 1 280
$ gpio pwm 1 440
2015/06/22 - [개소리 왈왈/라즈베리 파이(rpi)] - 라즈베리 파이 2 PWM-MS 모드 servo 제어
bcm2835 pwm 데이터시트 (0) | 2015.10.16 |
---|---|
wiringpi pwm 라이브러리 분석? (0) | 2015.10.16 |
DHT-11 DHT-22 RHT-03 (0) | 2015.10.14 |
dSPIN_raspi / L6470 / sparkfun (0) | 2015.10.12 |
라즈베리 파이 홈페이지 내용 업데이트 - pi 2b (0) | 2015.10.09 |
온도/습도 센서 인데..
검색하다 보니 차이가 있... 다?
DHT11
Ultra low cost
3 to 5V power and I/O
2.5mA max current use during conversion (while requesting data)
Good for 20-80% humidity readings with 5% accuracy
Good for 0-50°C temperature readings ±2°C accuracy
No more than 1 Hz sampling rate (once every second)
Body size 15.5mm x 12mm x 5.5mm
4 pins with 0.1" spacing
DHT22
Low cost
3 to 5V power and I/O
2.5mA max current use during conversion (while requesting data)
Good for 0-100% humidity readings with 2-5% accuracy
Good for -40 to 125°C temperature readings ±0.5°C accuracy
No more than 0.5 Hz sampling rate (once every 2 seconds)
Body size 15.1mm x 25mm x 7.7mm
4 pins with 0.1" spacing
[링크 : https://learn.adafruit.com/dht/overview]
[링크 : http://cdn.sparkfun.com/datasheets/Sensors/Weather/RHT03.pdf]
RHT03 (also known by DHT-22)
[링크 : https://www.sparkfun.com/products/10167]
AM2302가 DHT22 대응인 듯
그냥 .. DHT11만 보더라도 상당히 불안정하게 값이 읽혀온다.
[링크 : http://www.kandrsmith.org/RJS/Misc/calib_dht22_dht11_sht71.html] 벤치마크?
아무튼.. DHT-11은 저가형에 정밀하지 못한 녀석
DHT-22/RHT03은 정밀한 녀석으로 결론...
wiringpi pwm 라이브러리 분석? (0) | 2015.10.16 |
---|---|
라즈베리 파이 GPIO 유틸 PWM (0) | 2015.10.14 |
dSPIN_raspi / L6470 / sparkfun (0) | 2015.10.12 |
라즈베리 파이 홈페이지 내용 업데이트 - pi 2b (0) | 2015.10.09 |
openCV 3.0.0 on 라즈베리 파이 2 (0) | 2015.10.06 |