Code running 19 times slower than intended


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Problem solved!

    I finally found the problem thanks to rteo who advised that the 18F2550/4550 data sheet shows in one place that the external osc won't function with a supply voltage to the MCU of less than 4.2 volts. I had been running a supply voltage of 3.3 volts as a battery power conservation measure. I then experimented and discovered, rteo is partially correct.....my 18F2550 external osc circuit won't oscillate reliably until the supply voltage is at least 3.6 volts.
    This discovery is going to make me change the design for this product to a 4.2 volt supply rail.

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


    Did you find this post helpful? Yes | No

    Default

    Maybe your crystal will not run at a voltage lower than 3.6, but the 4550 will operate with an external OSC of 4MHz at 3 volts. I typically run this chip at 3.3 with SD cards.

    If you want to save power and run at a lower voltage get a three pin resonator at 4MHz.
    Dave
    Always wear safety glasses while programming.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    If you want to be able to run at lower than 4.2 volts you should probably be using the LF version of the part. Looks like the LF version will work from 2V to 5V with slower clocks the lower the voltage goes. Some F parts may work lower than the 4.2V spec, but there may be some that flat out won't.
    Tim Barr

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


    Did you find this post helpful? Yes | No

    Default

    Dave,

    Are you sure you're not using the LF version running at 3V?
    Attached Images Attached Images   
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Default

    Yes, I just doubled checked, again.

    Do not laugh at the messy board, everything on it runs at 3.3 volt. Another interesting thing is this chip can also be programmed at 3.3. I have the PicKit2 feeding a LM317. The PicKit is fooled into thinking it is running at 5 volts.
    Along with the SD card there is a MAX6675 and a DS1337. Working on a PYRO LOGGER.

    And the data sheet is a bit miss leading?
    I take the extended range (LF) as going down to 2 volts.
    I guess I could have a batch that was labeled incorrectly?
    Attached Images Attached Images    
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Are you running it at 48MHz @ 3V?
    Regards,

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

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


    Did you find this post helpful? Yes | No

    Default

    Yup, with a 4MHz external purchased from you
    Code:
    DEFINE OSC 48
    @ __CONFIG   _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    @ __CONFIG   _CONFIG1H, _FOSC_HSPLL_HS_1H
    @ __CONFIG    _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
    @ __CONFIG    _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H 
    @ __CONFIG    _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L &_XINST_OFF_4L
    Dave
    Always wear safety glasses while programming.

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