Port 'a' problems


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Thanks for the help...still dazed and confused

    That's the only assembly routine I have in the code. It's all attached but if you need I'll include in the body of a post. Yeah Dave (Don't know what was happening there with attachments...thanks again). Anyway I tried CMCON=7 and CMCON=%00000111. When the code hits "high l9:high l11ause 3:"..l9 flashes (almost imperceptibly) then l11 goes high. When it gets to the next section ('High l10:low l11:high l12) then l10 goes high and l12 does nothing!!

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    what happen if you remove all those colon in your code???

    Pause 3, seems really fast so far... 300 could be more interesting.

    Not sure of those multiple...
    Code:
    RETURN
    END
    L12 refer to RA.4, and it's an open drain type. You can't drive a LED as you wish. At least, you could drive it if it's connected between Vdd, and the PIC, not between GND and PIC
    Last edited by mister_e; - 14th July 2007 at 14:30.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jul 2007
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Pause 3 and colons

    I have a pause of 3 because I am using an external clock signal from a 555 astable with an adjustable (low) frequency ( so that the flash rate is adjustable). It is definately a visible speed. The colons are there because I had each sequence on it's own line earlier. I split the lines and left the colon's because I read something last night in an old post by ski-mask discussing something along these lines. I just recoded without the colons as I'm typing this and nothing changed at all.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    What Mister_E said about RA.4 might be it -- or -- Looking at the two attachments it might be a combination of code and hardware. In the code I do not see a complimentary pin all of the time.

    I made this up for some hide I work with, it explains what I am getting at.
    http://mackrackit.com/mac/www/dave/LED/LEDs.html
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I don't understand why it shouldn't work unless you have an hardware problem OR a bad configuration fuse setting.....

    what happen with that one???
    Code:
            @       __CONFIG  _INTRC_OSC_NOCLKOUT & _MCLRE_OFF  &  _LVP_OFF & _WDT_OFF & _PWRTE_ON  & _BODEN_ON  
            '
            '       or use the one bellow if you use PM assembler
            '   @       device  pic16F628A, intrc_osc, wdt_on, mclr_on, lvp_off, protect_off 
            PORTB = 0
            PORTA = 0
            TRISB = 0
            TRISA = 0
            CMCON = 7
            
    START:
            PORTA = 255
            PORTB = 255
            PAUSE   200
            PORTA = 0
            PORTB = 0        
            PAUSE   200
            GOTO    START
    but yeah... pure assumption, no schematic available, and i need more cofee
    Last edited by mister_e; - 14th July 2007 at 14:52.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. port config.
    By tamertokgoz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th July 2008, 12:25
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  3. Notebook Com Port win2k problems
    By folkc in forum Serial
    Replies: 4
    Last Post: - 20th February 2006, 16:16
  4. STATUS re-curtain W
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2005, 15:21
  5. Port pin problems
    By sgreelish in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th March 2004, 18:56

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