User`s manual

ROBOT . HEAD to TOE
Product User’s Manual – SD02B
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
12
5.2 Connecting to Microcontroller using Signal Input Pins
Typical application would require a microcontroller to generate pulses and control the
direction. Following figure shows an example of SD02B connected to microcontroller. The
above example shows that the PULSE pin is being connected to RC2 of PIC16F877A.
This pin has the function to generate pulses using Compare mode. Please refer to source code
of PR7 from Cytron Technologies website for details of using Compare mode. Please note
that if you are using PR7 to control SD02B, the voltage selector for SD02B should select
Vmotor because the Vcc pin for PR7 only supplies 5V to *Vin. This is lower than the
minimum voltage required for *Vin, which is 8V. Please refer to chapter 3 (Product
Specification and Limitations) for details. The link to PR7 DIY Project is:
http://www.cytron.com.my/PR7.asp
Direction and EN pin can be connected to any digital I/O of PIC16F877A. However, both
these pins must be configured as output from the controller.
EN
X
FAN & HEAT SINK
SD02B
!X
Y
!Y
Reset
Power
Te s t
!X
Vm ot or
GND
!Y
DIR
Y
X
GND
Signal
Vi n
EN
PU LS E
GND
Stepper
12V
CCP 1
Direction
VCC
UART
NC
Gnd
TX
RX
MCLR/Vpp
1
RA0/AN 0
2
RA1/AN 1
3
RA2/AN 2
4
RA3/AN 3
5
RA4
6
RA5/AN 4
7
Vss
12
OSC1
13
OSC2
14
RC0
15
RC1
16
RC2
17
RC3
18
RC4
23
RC5
24
RC6
25
RC7
26
Vss
31
RB0
33
RB1
34
RB2
35
RB3
36
RB4
37
RB5
38
RB6
39
RB7
40
RE0/AN5
8
RE1/AN6
9
RE2/AN7
10
RD1
20
Vdd
11
RD0
19
RD2
21
RD3
22
RD4
27
RD5
28
RD6
29
RD7
30
Vdd
32
U1
PIC16F877A
5V
5V
104
C7
C CAP
1 2
Y1
XTAL
33pF
C5
Ca p
33pF
C6
Ca p
4K7
R?
5V
CCP1
EN
Direction
C1
25V 100uF
C2
25V 10uF
VCC
12V IN
1
GND
2
OUT
3
U?
LM7805