Adafruit motor shield + Pic16F876

by jjwa on Tue Oct 02, 2012 12:21 am

Having read Adafruit motor shield manual and most of FAQ without finding any answer for my case. I’m a bit frustrating since I couldn’t find answer. So I have Pic 16F876 which will control my Bi-polar stepper motor. I have four pins in my Pic programmed for that purpose but my problem is which I/O pins in a shield am I supposed to connect to my Pic.
Any assistance or recommendations most appreciated.
jjwa
 
Posts: 3
Joined: Mon Oct 01, 2012 9:43 am

Re: Adafruit motor shield + Pic16F876

by adafruit_support_bill on Tue Oct 02, 2012 4:29 am

That is addressed in the FAQ:
Which pins are connected to the DC/Stepper motors?
The DC/Stepper motors are NOT connected to the Arduino directly. They are connected to the 74HC595 latch which is spoken to by the Arduino. You CANNOT talk directly to the motors, you MUST use the motor shield library.


To control the motors you need to control the H-bridges via the 74HC595 latch. The latch is controlled by pins 4, 7, 8 & 12.

Source code for the library and full schematics can be downloaded here: http://learn.adafruit.com/adafruit-motor-shield/downloads
User avatar
adafruit_support_bill
 
Posts: 28045
Joined: Sat Feb 07, 2009 9:11 am

Re: Adafruit motor shield + Pic16F876

by jjwa on Sun Oct 07, 2012 4:45 am

“To control the motors you need to control the H-bridges via the 74HC595 latch. The latch is controlled by pins 4, 7, 8 & 12.”

Thanks, with one stepper motor this works fine with Pic. But if I want to control two stepper with Pic how to do it or do I have to buy one more motor shield?
jjwa
 
Posts: 3
Joined: Mon Oct 01, 2012 9:43 am

Re: Adafruit motor shield + Pic16F876

by adafruit_support_bill on Sun Oct 07, 2012 6:12 am

There are 2 L293D H-bridges and the latch controls both of them. You can see how they are connected in the schematic:
https://raw.github.com/adafruit/Adafruit-Motor-Shield-for-Arduino/master/mshieldv12schem.png
User avatar
adafruit_support_bill
 
Posts: 28045
Joined: Sat Feb 07, 2009 9:11 am