Newbie 74hc595 question


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    the 16F684 does

    [/QUOTE]Hello manjero, I think that Darrel missed the fact that you're using an 'F84. You can drop the:-

    CMCON0 = 7
    ANSEL = 0

    The 'F84 doesn't have any analogue inputs to turn off or configure as digital IO. They're always digital IO. In fact, I have 16F84(A) selected, the compiler, (v 2.44), doesn't even recognise CMCON0.
    [/QUOTE]

    I built the circuit using 4 74hc595 cascaded and with a pic16f684 i had laying around with a 4 MHZ xtal.

  2. #2
    Join Date
    Jan 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bbarney View Post
    the 16F684 does
    Hello manjero, I think that Darrel missed the fact that you're using an 'F84. You can drop the:-

    CMCON0 = 7
    ANSEL = 0

    The 'F84 doesn't have any analogue inputs to turn off or configure as digital IO. They're always digital IO. In fact, I have 16F84(A) selected, the compiler, (v 2.44), doesn't even recognise CMCON0.
    [/QUOTE][/QUOTE]

    Sorry, it's my failing eyesight. I didn't see the "6" and thought it was a PIC16F84.

    ... Steve

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I only seen the 6 cause I know Darrel doesn't miss anything

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bbarney View Post
    I only seen the 6 cause I know Darrel doesn't miss anything
    Uht-Oh, I'm getting a reputation.


    Quote Originally Posted by manjero View Post
    I changed my code to this: ...
    That's getting closer, but Wait, there's More.

    The Latch Pin should start out LOW.
    Then after the SHIFTOUT, the data gets latched by toggling it High/Low.

    The pause only adds up to about 6000 (6 seconds).
    For 60 Seconds, you need 60,000.

    And the 595 is a really fast chip. pause 10 and Pulsout aren't needed.

    Code:
    bvar = 255
    
    LOW  LPIN       ; Latch Idles LOW
    
    ' Shift out 32 - 1's to 74HC595's
    Shiftout DPIN, CPIN, MSBFIRST,[bvar, bvar, bvar, bvar]
    
    HIGH LPIN       ; Latch data to 595's outputs
    LOW  LPIN
    
    Low DPIN        ; Set Data to 0
                               
    Main:
        pause 60000 ; Wait 1 minute
    
        HIGH CPIN   ; clock in a 0
        LOW  CPIN
    
        HIGH LPIN   ; Latch data to 595's outputs
        LOW  LPIN
    GOTO Main
    hth,
    DT

Similar Threads

  1. newbie with serial com question...
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th December 2006, 05:34
  2. Newbie Question - Info Please
    By ehoskins in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd October 2006, 14:50
  3. Greetings from Newbie and a question
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th July 2006, 15:52
  4. Newbie question
    By senojlr in forum General
    Replies: 7
    Last Post: - 11th April 2006, 21:23
  5. Replies: 4
    Last Post: - 8th September 2005, 15:42

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