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


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    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 23:13.

  2. #2
    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 08: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.

  3. #3
    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 . . .

  4. #4
    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 : 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