18f2550 USB OSC Problem


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    14

    Unhappy 18f2550 USB OSC Problem

    I have programmed my 18f2550 bootload.hex which I have compiled with c18. I can send hex files with PDFSUSB. I'm using microcode studio.. I have no problems with any code except OSC settings... I have defined OSC as 48 MHZ at the beginning of program, but it's faster than that.. I put pause 1000, but it pauses 0.25 second...
    I tried to change config settings for the bootloader hex, but so i have got problems with PDFSUSB... So i think there is a solution with OSC setting..
    I need someone to help me...

  2. #2
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126

    Default

    How bizarre - I was loading the same code into a 18f2550 only yesterday !
    Did you change the CONFIG registers in your code as these control the actual OSC speed.

    You need to have OSC48 in the code as this is the internal rate the PIC runs at - you set the PLL frequency based on your crystal speed.

    Let me fire up the laptop and get the CONFIGs I used for 4MHz and 20MHz which I know work with my breadboard circuit.

    bill.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Yup, post your C18 pragma line and we will be able to help. seems to me that the CPUDIV is wrong... well i think...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Oct 2008
    Posts
    14

    Default

    Thanks for help.. But I only use c18 for bootload hex. I'm using PBP with microcode studio for my software...
    I didn't change lines.. PDFSUSB works fine.. I'm using 20 MHZ Crystal with 15pf capacitor...
    I wrote DEFINE OSC 48 but it's faster.. It causes also problems on serial comm with another PICs...
    I think config bits are normal...
    #pragma config PLLDIV = 5 // (20 MHz input)
    #pragma config CPUDIV = OSC1_PLL2
    #pragma config USBDIV = 2 // Clock source from 96MHz PLL/2
    #pragma config FOSC = HSPLL_HS
    Last edited by serkanc; - 28th October 2008 at 21:34.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Your program speed will relly on the config fuse setting of your bootloader, if they are false, your program won't work as expected... that's for sure. You can still alter the config fuse at run time.

    They seems to be great.. at least to me... hummm...
    Last edited by mister_e; - 28th October 2008 at 21:45.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Oct 2008
    Posts
    14

    Default

    I wil check again everything i done.. Possibble i made a mistakeee

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  3. 18F2550 MCRL/RE3 problem with USB bootloader Microchip
    By Ronald123 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th September 2007, 10:48
  4. Speed of USB EasyHID and Time problem
    By sjohansson in forum USB
    Replies: 10
    Last Post: - 18th January 2007, 22:21
  5. 18f2550 'access is denied' USB error?
    By Giulio in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th December 2006, 14:29

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