Cant get it to work


Results 1 to 24 of 24

Threaded View

  1. #16
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink Rt....

    Hi,

    This ( as ARatti finished it ) :

    Code:
    '****************************************************************
    '*  Name    : BPWZ.BAS                                      *
    '*  Author  : [select VIEW...EDITOR OPTIONS]                    *
    '*  Notice  : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] *
    '*          : All Rights Reserved                               *
    '*  Date    : 08/04/2010                                        *
    '*  Version : 1.0                                               *
    '*  Notes   : 16F819                                                  *
    '*          :                                                   *
    '****************************************************************
    DEFINE OSC 8                                    ' 8 Mhz Oscillation
    OSCCON = $70                                    ' Oscilator Config reg.
    
    ADCON1 = 7
    
    TRISA = %00000000
    TRISB = %00000000
    
    PortA = 0
    PortB = 0
    
    start:
        High 0
        pause 1000
        low 0
        pause 1000
    goto start
    Makes PortB.0 blink @ 2 Hz ... Only if you use an external 8 Mhz Xtal ... as PBP Defaults to HS Osc for the Config. ( see #14 from Dave )

    you must add :

    Code:
     @ device PIC16F819,INTRC_OSC_NOCLKOUT, WDT_ON, PWRT_ON, MCLR_ON, protect_OFF, LVP_OFF
    to the top of the listing to get INTRC Oscillator work, if MCS using. Then no need to define the options by hand in IC Prog ...

    a look to manual $ 4.11 will show how "numbers only" work as port pins defining ...

    is the great mysterious code problem solved, now ???

    Alain
    Last edited by Acetronics2; - 8th April 2010 at 11:52.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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