PIC 16LF722 + PIC KIT 2 //configuration problem


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Posts
    4


    Did you find this post helpful? Yes | No

    Unhappy PICKIT 2, 16LF722, PM assempler, PBP 2.50b - ONE LED BLINKING

    I'm using:
    - Melabs default (PM) assembler.
    - PBP 2.50b
    - PICKIT 2
    - PIC 16LF722
    - one led connected to portb.0

    How I can set the micro for the internal 16Mhz oscillator?
    How can I select the single parameters in the configuration word 1 (CONFIG1) like described on page 89 of PICF72X/PIC16LF72X manuals?
    How can I write the PBP commends?

    Thanks
    Bye
    Reply With Quote

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


    Did you find this post helpful? Yes | No

    Default

    I got patched up
    This is a cool chip, I need to get some.
    The code below should blink an LED, on for 1/2 second and off for 1/2 second.

    I do not use PM, so the config line for PM may not be correct.
    The code as is works with MPASM. I will suggest you start using MPASM as you will need it for other chips and/or projects.

    Also, if you are new to all of this a different chip might be better to learn on. 16F676,16F88 ??

    Hope this works for you.
    Code:
    '16F722
    'SETS UP THE INTERNAL OSC FOR 16 MHZ
    DEFINE OSC 16
    OSCCON= %00111000
    'SET THE FUSES - COMMENT OUT THE PBP INC FILE
    
    'PM CONFIG
    'device  pic16F722, INTRC_osc_noclkout, wdt_on, protect_off
    
    'MPASM CONFIG
    @  __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _CP_OFF
    
    TRISB = $00000000		'MAKES PINS OUTPUT
    ANSELB =$00000000		'MAKES PORT B DIGITAL
    
    START:
    HIGH PORTB.0
    PAUSE 500		'1/2 SECOND
    LOW PORTB.0
    PAUSE 500
    GOTO START
    END
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Sep 2006
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I got patched up
    'MPASM CONFIG
    @ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _CP_OFF

    I usually modify the PIC16FXXX.INC file, the one that PBP includes (I program with MPLAB), did not know it can be done like that .


    I saw this chip too and, like you, need to get some, and if you're stunned, look at this:
    http://www.picbasic.co.uk/forum/show...7816#post67816
    Last edited by MarioC; - 15th December 2008 at 05:31.

Similar Threads

  1. PIC KIT 2 writing problem ?
    By KaanInal in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd January 2010, 12:59
  2. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  3. PIC 2 PIC wireless connection
    By MegaADY in forum General
    Replies: 1
    Last Post: - 24th June 2004, 01:46
  4. how to connect 2 LCDs on a PIC
    By f1fco in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 15th April 2004, 17:59
  5. Serin2/Serout2 PIC 2 PIC
    By actionplus in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2004, 06:46

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