Searching \ for '[PIC] How To Make RA4 And RA1 Of A 16F628A Steer A' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: 'How To Make RA4 And RA1 Of A 16F628A Steer A'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] How To Make RA4 And RA1 Of A 16F628A Steer A'
2007\01\25@031751 by Thilo Klein

flavicon
face
Dear reader.

I am setting the bits to drive a L293D using a 16F628A. Both other
Pins work (RA2 and RB4), so there are 12 Volts finally. But the
stepping motor wires being connected indirectly to RA4 and RA1 only
get ca. 0,5 volts.  I think this is a software problem.

According to the Data sheet, RA4/T0CKI/CMP2 is a "Bidirectional I/O
port", that means that it can supply and sense voltage levels. I read
that it can not source current, so a pullup should help:

Connecting RA4 to Vdd via 1,5k resistor and connecting RA4 to the
basis of an emitter follower to finally drive the L293D is an option.
What do you think about that

Regarding the software error, this is what I wrote.

;Partly in german
Define OSC 8
GOTO Start
Start:

;Assignments (<xy>Unten means inputs of the stepping motor)
GruenLED VAR PORTB.5
GelbLED VAR PORTB.4
BraunUnten VAR PORTA.2
BlauUnten VAR PORTA.4
GelbUnten VAR PORTA.1
RotUnten VAR PORTB.6

;Variables
Zeit VAR WORD
Motor VAR WORD
Lichter VAR BYTE

;ISequence
OPTION_REG = 0
INTCON = 0
High CMCON.0
High CMCON.1
High CMCON.2
PORTB = 0
PORTA = 0
TRISB = 0
TRISA = 0
Low GruenLED
Low GelbLED

Hah:
TRISA = 0
High GruenLED
High GelbLED
High RotUnten
Low GelbUnten
Low BlauUnten
Low BraunUnten
TRISA = 0
Pause 2000
High GruenLED
Low GelbLED
Low RotUnten
Low GelbUnten
Low BlauUnten
High BraunUnten
Pause 2000
TRISA = 0
Low GruenLED
High GelbLED
Low RotUnten
Low GelbUnten
High BlauUnten
Low BraunUnten
Pause 2000
TRISA = 0
High GruenLED
Low GelbLED
Low RotUnten
High GelbUnten
Low BlauUnten
Low BraunUnten
Pause 1000
Low GruenLED
High GruenLED
Pause 1000
GOTO Hah

To be commented.

Regards

TK

2007\01\25@035617 by Jinx

face picon face
> Connecting RA4 to Vdd via 1,5k resistor and connecting RA4
> to the basis of an emitter follower to finally drive the L293D is
> an option. What do you think about that

Hi Thilo, just the pull-up is needed. The RA4 can supply what the
L293D input needs

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...