티스토리 뷰

Summury

•Adafruit library v1 do not support the Intel Curie system, so I have coded it myself.
•Even if pin 13 of the shift register is set low, the shield will not work. Therefore it need to connect to GND of the hardware.

Contents

I purchased a Chinese OEM motor shield to drive dc motor with arduino 101.
I used a library compatible with a adafruit v1, but it was not compiled.
Library v1 does not support Intel Curie system.
Compared to the UNO, I found the pin layout is same.
So I coded without useing the library.

First, pin arrangement between Shift Register (74HC595) and Arduino is shown in the table below.

Arduino74HC595
DataGPIO8PIN14(DS)
ClockGPIO4PIN11(SH_CP)
LatchGPIO12PIN12(ST_CP)
EnableGPIO7PIN13(OE)

And, arrangement between Shift Register and motor driver(L293D) is shown below.

74HC595L293D
M1 Q2IN1
Q3IN2
M2Q4IN3
Q1IN4
M3Q0IN1
Q6IN2
M4Q7IN3
Q5IN4

Therefore, the data pin to transfer to Shift Register is GPIO8, Shift Register Latch is GPIO12, Shift Register Clock is GPIO4.
And the forward, backward data for motor 3, 4 are as follows.

Data (LSBFIRST)
Forward0x81 (10000001)
Backward0x06 (00000110)

However the pin 13 of Shift Register must be grounded, but it is connected to VCC through a register.
So, I outputed Low at Arduino GPIO7 but shield did not work, and pin 13 of Shift Register stays 1mV(higher than normal GND). So, I removed the register and connected it to GND, andmotor shield worked.
The motor shield v2 of Adafruit might be compatible but price is expensive.


'개발 > Genuino101' 카테고리의 다른 글

Arduino101(Genuino101)의 IMU 기초  (0) 2017.04.12
Arduino101(Genuino101)에서 BLE 통신  (0) 2017.04.12
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함