18F2620 OSC Confusion


Closed Thread
Results 1 to 4 of 4

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    wich crystal speed you have???

    let's say 20MHZ.... So set config fuse to HS OSC at programming time and add
    DEFINE OSC 20
    at the top of your code

    XT is for 4MHZ crystal only.

    If you select INTROSC, on F2620 the default setting is...1 MHZ wich explain the 1/4 time speed you have. Default PBP xtal speed is 4MHZ.
    to set internal Oscillator speed, write directly to OSCCON register.
    OSCCON=%01100000 '=> set internal osc to 4MHZ
    the above will fix your problem.

    Be friend with this

    Welcome to the forum and have fun!!!
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    ooh i forget, you can't configure the internal USART to talk directly to the PC... you need MAX232 or else inverter. BUT you can use software command like SEROUT, SEROUT2 and use the inverted mode. Just use a resistor in serie will work.
    Steve

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

  3. #3
    Join Date
    Jun 2005
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Yippi Ki A

    Thanks, Worked Like a Dream!
    Ash

Similar Threads

  1. Internal vs. external osc for comms
    By mtripoli in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th January 2010, 14:58
  2. Define osc 1
    By ronsimpson in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st October 2009, 06:35
  3. 18f2550 USB OSC Problem
    By serkanc in forum USB
    Replies: 10
    Last Post: - 29th October 2008, 20:52
  4. 18F458 and 20MHz osc problem...
    By batee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th October 2004, 20:16
  5. 12f675 internal osc question.....
    By Gabe@SPdFtsh in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th January 2004, 06:33

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