DCD command - need some advice


Results 1 to 21 of 21

Threaded View

  1. #12
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c
    Ok' I'm working my way through this version using the 16F873A, but I've hit a small issue...

    I have set port A to all inputs...

    the PIC simply ignores any input on RA2, but more confusingly, it runs each pattern once in sequence, ie it cycles through the patterns as if the button is being pressed, so swcount must in some way be changing...
    Code:
    Pot PORTA.1,scale,D                     ;used to read value from 10k pot and set the speed
    read patt[swcount],steps                ;read the first value of the selected patter and place it in the variable steps
            for C = 1 to steps              ;for / next loop
               READ PATT[SWCOUNT]+ C,PORTB  ;reads the step value for selected pattern and send it to PORTB 
               PAUSE D                      ;delay for speed
            NEXT
    GOTO MAIN
    Exactly what value have you put into ADCON1 to "set port A to all inputs" yet still get the Pot command to work? It seems as though you still might have some of them set as Analog Inputs.

    SteveB
    Last edited by SteveB; - 17th December 2006 at 00:57.

Similar Threads

  1. Need "PIC16F84A" Controler schematic Advice...
    By Kyo_89 in forum Schematics
    Replies: 1
    Last Post: - 27th May 2009, 23:03
  2. Design Advice
    By isaac in forum General
    Replies: 38
    Last Post: - 11th October 2008, 23:07
  3. Your OTP advice?
    By truvahorse in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th June 2008, 16:37
  4. NCD vs. DCD - Commentary
    By andrewroz in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th November 2007, 23:16
  5. Advice needed on 'neat' Project!
    By vacpress in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th February 2007, 06:21

Members who have read this thread : 0

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