PIC16F819 LED not blinking


Closed Thread
Results 1 to 16 of 16

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Update...LED is on steady. No blinking
    You might want to try something like this to see your LEDs blink;
    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: 
      PORTB.4 = PORTB.4 ^ 1
      PAUSE 250
      PORTA.0 = PORTA.0 ^ 1
      PAUSE 250 
      Goto LOOP
    Check your PBP manual to see why your LEDs aren't visibly blinking with PULSEOUT...;o)
    Regards,

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

  2. #2
    Join Date
    Oct 2009
    Location
    Austin, Texas
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    You might want to try something like this to see your LEDs blink;
    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: 
      PORTB.4 = PORTB.4 ^ 1
      PAUSE 250
      PORTA.0 = PORTA.0 ^ 1
      PAUSE 250 
      Goto LOOP
    Check your PBP manual to see why your LEDs aren't visibly blinking with PULSEOUT...;o)
    Still no blink. Tried above program as well. PULSOUT did not work either...?

  3. #3
    Join Date
    Oct 2009
    Location
    Austin, Texas
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    I now have blimking LED's....

    DEFINE 4 statement was not needed.

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