16f628 for all outputs


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Exclamation Does this help?

    Quote Originally Posted by skimask View Post
    Are you using the PIC16F628 or the PIC16F628A?
    There's enough of a difference between the two to keep things from working.
    And post some code, a schematic, something, anything.
    For all I know you've got 3 buckets of grass clippings, 2 rocks, and a jar of mustard.
    Hi skimask,
    Here is a circuit attachment I found online you might find helpful.


    hth
    -Adam-
    Attached Images Attached Images  
    Ohm it's not just a good idea... it's the LAW !

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


    Did you find this post helpful? Yes | No

    Default

    <table><td><img SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1629&stc=1&d=117919107 7"></td>
    <td>
    • Jar of mustard = +5V
    • RCK 1, RCK 2 = Gnd
    • GCB1, GCB2, GCB3 = LED + 330 OHM Resistor
    • PIC16F84 = something that should be removed from the market since 10 years, can happilly be replace by a 16F628. If you do it, remove the crystal + both 22pF capacitor and try the code bellow
    </td></table>
    Code:
    <font color="#000000">        <font color="#008000">'
            '       Pic Configuration
            '       =================
                    '
                    '       Here we will set the PIC configuration fuses
                    '       to use the internal PIC oscillator and disable the MCLR
                    '       pin.
            </font>@ __CONFIG  _INTRC_OSC_NOCLKOUT &amp; _MCLRE_OFF  &amp;  _LVP_OFF &amp; _WDT_OFF &amp; _PWRTE_ON  &amp; _BODEN_ON  
                    <font color="#008000">'
                    '       This assume you're using MPASM to compile your code
                    '       For detailed information about Configuration fuse setting, 
                    '       have a look to &quot;Presetting Configuration Fuses (PIC Defines)&quot; thread
                    '       in the forum FAQ section.
                    '           http://www.picbasic.co.uk/forum/showthread.php?t=543
    
            '                      
            '       Hardware assignment
            '       ===================
            </font>GCB_1   <font color="#000080">VAR </font>PORTB.0
            GCB_2   <font color="#000080">VAR </font>PORTB.1
            GCB_3   <font color="#000080">VAR </font>PORTB.2
                            
            <font color="#008000">'
            '       Hardware configuration
            '       ======================
            </font>TRISB = 0               <font color="#008000">' Configure all PORTB i/o to output
            
            '
            '       Software/Hardware initialisation
            '       ================================
            </font>PORTB = 0
                   
            <font color="#008000">'------------------------------&lt; Main program &gt;-----------------------------------
            '
    </font>Start:  <font color="#008000">'
            '       Here will do the 'buckets of grass clippings' light show
            '       using a simple method... not the best
            '
            </font>GCB_1 = 1
            <font color="#000080">PAUSE </font>500
            GCB_2 = 1
            <font color="#000080">PAUSE </font>500
            GCB_3 = 1
            <font color="#000080">PAUSE </font>500
            GCB_1 = 0
            <font color="#000080">PAUSE </font>500
            GCB_2 = 0
            <font color="#000080">PAUSE </font>500
            GCB_3 = 0
            <font color="#000080">PAUSE </font>500
            <font color="#000080">GOTO </font>Start
            <font color="#008000">'
            '---------------------------------------------------------------------------------
    </font>
    Steve

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

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Pic_User View Post
    Hi skimask,
    Here is a circuit attachment I found online you might find helpful.

    hth
    -Adam-
    Good answer!
    Oh Man! I near fell outta my chair!

Similar Threads

  1. 16F628 does not run. I can't believe this
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd October 2009, 15:41
  2. SERIN2 not working with 16F628
    By d1camero in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 20:37
  3. 16F628 & In-Circuit Programming?
    By Len in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th March 2004, 13:02
  4. 16F628 on-chip eeprom problem
    By atomski in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 4th March 2004, 07:43
  5. need help configuring 16F628
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd March 2004, 18:59

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