trouble getting certain pins to act as digital on 18F2550


Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Jan 2010
    Posts
    10

    Default trouble getting certain pins to act as digital on 18F2550

    I have some code written that drives a stepper motor based on an encoder input. Actually there are two sets of encoder/stepper running on the same PIC. Their operation is totally independent. The outputs are going to a L298N stepper driver in both cases. Two of the outputs don't appear to be working as I would like them. RA3 and RA5 do not put out enough voltage for the L298N to recognize them as being on. If I connect leds to the outputs instead of the L298N they will very dimly light when they are on. This allows me to verify that the code is working properly. All the rest of the outputs light the same led/resistor combo brightly. The only significant info I can glean out of the data sheet is that on a POR those two, and only those two, on porta come up as analog. I am trying to set those pins to outputs in the code but maybe I need to be something else because of the way the operate on a POR.

    I also could never get RB1 and RB0 to act as outputs. After I moved those outputs to RB6 and RB7 everything worked fine. The only significant thing I can find on those two pins is they are associated with serial programming. I am apparently not getting those pins configured properly.

    My code and wiring diagram are attached.

    any help or suggestions?
    Attached Images Attached Images
    Attached Files Attached Files

Similar Threads

  1. PIC 18f2550 USB joystick TROUBLE (burnt PIC?)
    By jsags1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th October 2014, 19:06
  2. analog to digital setup on 18F2550
    By missouri100 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th February 2014, 14:49
  3. 16F1826 cannot get MCLR to act as an INPUT
    By SOTASOTA in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 13th February 2014, 02:31
  4. Analog pins for digital input
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th September 2005, 00:32
  5. Microchip MCP41xxx Digital Potentiometer Code Trouble
    By CocaColaKid in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 18:21

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts