blink a single led


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Posts
    85

    Angry blink a single led

    hi,
    can any friend help this situation
    the program had run well for some years, now this fail even if to blink a single led on a breadboard.
    i have tried several chips: 16f 676, 876,,877a, 18f2455, 26k20... all the same bad result?
    the programmer is just updated to 5.1 last night
    thank for your help

    i post a program here (pic18f26k20):
    -------------------------------------------------------

    INCLUDE "h:\AllDigital.pbp"
    ASM
    __CONFIG _CONFIG1H, _FOSC_INTIO67_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
    __CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDTPS_512_2H
    __CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _HFOFST_ON_3H & _MCLRE_ON_3H
    __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L
    ENDASM
    OSCCON = $70 Internal oscillator is set to 16MHz $62 ' 8mhz--- '; Primary Clock is selected as system clock.
    OSCTUNE = $40 'HFINTOSC selected; PLL enabled; Factory calibrated frequency
    define osc 64
    ADCON0 = 0
    CM1CON0.7 = 0
    CM2CON0.7 = 0
    portb = 0
    latb = 0
    trisb = 0
    '------------------------------------------

    program:
    portb = $ff
    pause 1000
    portb = 0
    pause 1000
    GOTO program
    '==============================================

    end

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: blink a single led

    Upper case defines.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Apr 2008
    Posts
    85


    Did you find this post helpful? Yes | No

    Default Re: blink a single led

    tks for your rePLY,
    it is not the problem of program, nor breadboard? nor programmer?- it is suddenly dead
    note that is well simulated in the proteus sofware

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: blink a single led

    If it is suddenly dead, I'd pay close attention to the breadboard connections and power supply.

    You should also read up on READ MODIFY WRITE.
    http://www.picbasic.co.uk/forum/show...d+modify+write
    Last edited by Demon; - 28th November 2016 at 01:22.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5
    Join Date
    Apr 2008
    Posts
    85


    Did you find this post helpful? Yes | No

    Default Re: blink a single led

    TKS for ur reply,
    no way. power supply and every thing is ok
    the chip was programmed a month ago is ok (on the bread board and on the circuit), just after last month, every thing is corrupted ( even on the sam breadboard connection or the same pcb)
    i reprogram mplab and pbp but no help

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: blink a single led

    What has changed on the PC and programmer? In post#1 you said "programmer is just updated to 5.1 last night". if you mean that you updated the firmware in the programmer, then try reverting to the previous version.

    BTW RMW hardly an issue with 1 sec between writes.
    George

Similar Threads

  1. Single PIC to Blink 5 LEDs Independently?
    By RossWaddell in forum mel PIC BASIC Pro
    Replies: 68
    Last Post: - 18th July 2015, 16:56
  2. need led blink program
    By asifiqbal in forum General
    Replies: 6
    Last Post: - 4th March 2014, 11:26
  3. blink led 12f683
    By mel4853 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 19th January 2010, 22:39
  4. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  5. 10f206 Blink led
    By Bonxy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th November 2005, 20:01

Members who have read this thread : 2

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts