Help with HS in sample programms


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006
    Posts
    13

    Question Help with HS in sample programms

    Hi,

    I got really big problem to find out which config bits are needed
    for the USB18 demo's in the PBP directory. (oszillator)
    I use a 20MHz quarz as used in the LABXU board and want to
    run the mousedemo.bas program. But also in the sample HEX files
    of the LABX board, the config words are not transfered through the
    HEX file
    Please someone can tell me his working config word ?
    Or perhaps what for a combination used ?
    HS / HS PLL / USB? etc.
    I cannot figure it out
    Is it right to use this line:
    Define OSC 48
    or should it be 20 ? internal 96MHz ?

    regards,
    sirnoname

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

    Default

    These are the defaults I use on most all USB projects. 18F4550 target with a
    20MHz primary crystal osc.
    Code:
    CONFIG PLLDIV=5,CPUDIV=OSC1_PLL2,USBDIV=2,FOSC=HSPLL_HS,FCMEM=OFF,IESO=OFF
    CONFIG VREGEN=ON,CCP2MX=ON,WDT=OFF,WDTPS=32768,PBADEN=OFF,PWRT=OFF,MCLRE=ON
    CONFIG LPT1OSC=OFF,BOR=ON,BORV=2,STVREN=ON,LVP=OFF,ICPRT=OFF,XINST=OFF,DEBUG=OFF
    CONFIG WRTB=ON
    You would use Define OSC 48 since the CPU core is running at 48MHz.
    Regards,

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

Similar Threads

  1. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  2. Hello, long time no post (ADC sample rate)
    By Jhong2 in forum General
    Replies: 0
    Last Post: - 14th April 2009, 04:13
  3. MN1307 sample code problem
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 20th November 2008, 20:41
  4. Hs Pll
    By Ron Marcus in forum Off Topic
    Replies: 2
    Last Post: - 21st February 2006, 00:34
  5. DS1307 sample Program
    By Mark in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th September 2004, 02:25

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