Device appears to be running slow: Returned after being in the field for months.


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305

    Default Device appears to be running slow: Returned after being in the field for months.

    A couple of issues here, both with a 18F1320. It appears that it is running super slow. The LCD is displaying gibberish and a flashing LED is taking hundreds of times longer to flash on and off. All settings are correct. Resonator is correct.

    I have no idea.

    Couple of days after this, another 1320 came back with the same problem. I've programmed hundreds with the same code, and very few have come back, and only these two have this symptom. The others were for other areas of the power supply failing.
    I can reprogram these PIC's and get exactly the same results. I replaced all support components on each pcb but it is actually the PIC that's failing.

    So has anyone else seen failures of this nature? Did you figure it out? On both these boards, I replaced the PIC and the boards ran fine.

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


    Did you find this post helpful? Yes | No

    Default

    Are you using the internal OSC? If so are the boards running in a hot environment?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    No, external ceramic resonator.
    Boards can sometimes get hot but are designed to turn off the output if an overt emp is detected.

  4. #4
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    I got bit by this phenomena once on my first '18F' series parts after years of using '16F' parts.

    Turns out I didn't have both pins of the oscillator set up correctly. One was set for OSC IN but the other was inadvertantly configured for GPIO. It worked fine on my desk for months during development but would inexplicably drop to the internal slow oscillator in the field.

    Check the "Clock Sources and Oscillator Switching" section of your data sheet.

    The following is for a different device than yours but illustrates the issue.

    ...includes a feature that allows the
    device clock source to be switched from the main
    oscillator to an alternate low-frequency clock source.
    PIC18F2525/2620/4525/4620 devices offer two alternate
    clock sources. When an alternate clock source is enabled,
    the various power managed operating modes are
    available.
    Essentially, there are three clock sources for these
    devices:
    • Primary oscillators
    • Secondary oscillators
    • Internal oscillator block

    ...The secondary oscillators are those external sources
    not connected to the OSC1 or OSC2 pins. These
    sources may continue to operate even after the
    controller is placed in a power managed mode.

  5. #5
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    The fuses are set right and the program performs exactly the same if I set it up for internal RC.

    Here is the code with everything removed except the LCD related stuff. I cant show the actual code used in the product. It appears to be none code related though as this is a very stripped piece of code that should have no problems.

    DEFINES are the same, ports are the same.


    DEFINE OSC 10
    DEFINE LCD_DREG PORTB ' Set LCD Data port
    DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_RSREG PORTB ' Set LCD Register Select port
    DEFINE LCD_RSBIT 2 ' Set LCD Register Select bit
    DEFINE LCD_EREG PORTB ' Set LCD Enable port
    DEFINE LCD_EBIT 3 ' Set LCD Enable bit
    DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_LINES 2 ' Set number of lines on LCD
    DEFINE LCD_COMMANDUS 2000 ' Set command delay time in us
    DEFINE LCD_DATAUS 50 ' Set data delay time in us

    DEFINE ADC_BITS 10
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 50

    ADCON1 = %01000000
    ADCON2 = %10111111
    TRISA = %11111111 'All inputs
    TRISB = %00000000 'PORTB.1 is output to flash heartbeat LED

    PAUSE 1000
    LCDOUT $FE, 1
    LCDOUT $FE, 2, "HELLO"
    LCDOUT $FE, $C0, "WORLD"

    Loop:
    PORTB.1 = 1
    LCDOUT $FE, 1
    PAUSE 500
    LCDOUT $FE, 2, "LED 1"
    LCDOUT $FE, $C0, "I=123456"
    PAUSE 1000
    PORTB.1 = 0
    PAUSE 500

    Goto loop
    Last edited by jmgelba; - 16th December 2010 at 22:13.

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Meaning no disrespect . . . how about you let US see those fuse settings, you know . . fresh eyes.
    esp.is this in there?
    Code:
    _FSCM_OFF_1H    
    ; Fail-Safe Clock Monitor disabled
    
    _IESO_OFF_1H     
    ; Internal External Oscillator Switch Over mode disabled
    Last edited by Archangel; - 17th December 2010 at 07:31.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  7. #7
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    136


    Did you find this post helpful? Yes | No

    Default

    Could it be some sort of corrosion between the OSC1 and OSC2 pins?
    I've experienced something similar due to oxide formation between the pins . . .

  8. #8
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    No corrosion. And it will run slow if set for internal oscillator.

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