Port D of Pic

Thread Starter

cassity69

Joined Dec 18, 2013
37
hello im using a pic 18f4520

i have connected a stepper motor into port D

everything is running as expected but i am intrested into why it is best to use port d

or does it not matter ?
 

Thread Starter

cassity69

Joined Dec 18, 2013
37
sorry i forgot to mention one other think

i have a variable resistor connected which is varying the speed as expected

is there an alternative i could of used instead of the variable resistor ? to change the speed like this does ?
 

Thread Starter

cassity69

Joined Dec 18, 2013
37
for some reason ive always used port d

which is now why i wanted to know lol

so there is no advantage at all with port d?

like for example port a has adc so i would use that for that purpose
 

THE_RB

Joined Feb 11, 2008
5,438
hello im using a pic 18f4520

i have connected a stepper motor into port D

everything is running as expected but i am intrested into why it is best to use port d
...
PORTA has the ADC inpuits and comparators.
PORTB has the internal pullups (good for connecting buttons).
PORTC has the CCPs for timing and PWM, and the RX/TX UART, MSSP SPI port etc.
PORTD is often the "preferred" port for simple parallel tasks (like a stepper motor).
:)
 
Top