PIC16F819 LED not blinking


Results 1 to 16 of 16

Threaded View

  1. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Your config options have ZERO effect on actual config settings.
    Code:
    @__Config_INTRC_OSC 
    @__Config_PWRT_OFF
    @__Config_MCLR_OFF
    @__Config_BOREN_OFF
    @__Config_DEBUG_OFF
    So your config settings are whatever the default config options are set to in your
    PBP 16F819.INC file for the MPASM assembler.

    And, like Melanie mentioned, you for sure will want the WDT disabled since DEFINE OSC 3
    is for a 3MHz osc & not 32kHz osc, so your timing is way off.

    Try this just to verify it's working;
    Code:
    DEFINE OSC 4 
    @ __CONFIG _INTRC_IO & _WDT_OFF & _PWRTE_OFF & _LVP_OFF & _MCLR_OFF & _BODEN_OFF & _DEBUG_OFF
    OSCCON = %01100000  ' 4MHz 
    ADCON1=7 
    TRISA = %00000000 
    TRISB = %00000000 
    TRISB.4 = 0 
    TRISA.0 = 0 
    PORTA.0 = 0 
    PORTB.4 = 0 
    
    LOOP: 
    
    PULSOUT PORTB.4,20 
    PAUSE 20
    PULSOUT PORTA.0,20 
    PAUSE 20 
    
    Goto LOOP
    And, for PBP 2.6 you'll want to change LOOP to something like LOOPS since LOOP is now a
    reserved word.
    Last edited by Bruce; - 30th November 2009 at 22:38.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 07:19
  2. Blinking an led problem on P16F84
    By aimenbukharie in forum General
    Replies: 1
    Last Post: - 20th March 2009, 06:00
  3. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 21:19
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 03:30
  5. simple LED Blinking project
    By koossa in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th December 2004, 02:25

Members who have read this thread : 1

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