Help with 18F2520


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks for all your help Cokehead and Mr E! I will give this a try this evening and let you know what happens.

  2. #2
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Hmm... Same thing. I put this at the top: ADCON1 = %00001111
    CMCON = %00000111 and same character over and over. Could it be possible that I need to use a line driver?

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    <bgsound src="http://www.darreltaylor.com/files/woohoo2.wav" loop="false">BertMan,

    It may have just been a typo, but in your first post you had this line ...

    define OSC = 8

    It shouldn't have an equal sign in there, and PBP won't complain if it's wrong. But it may be thinking it's running at a different frequency.
    <br>
    Last edited by Darrel Taylor; - 7th October 2005 at 04:40.
    DT

  4. #4
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Just for grins I adjusted the baud rate in hyperterminal to see if I could get any different results, and found something very interesting. At 300 baud it works! I set the baud rate to 2400 as it is defined in pbp, and nothing.

  5. #5
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Smile

    Thanks Darrel, it was a typo.

  6. #6


    Did you find this post helpful? Yes | No

    Default

    One more thing, use uppercase for your DEFINE statements.

  7. #7
    BertMan's Avatar
    BertMan Guest


    Did you find this post helpful? Yes | No

    Default

    Figured it out! The 4x clock multiplier is enabled by default. This means I was running at 32mhz instead of 8mhz. Had to set both of these to get the oscillator to perform the way I needed it to:

    OSCTUNE = %00000000
    OSCCON = %11110000

    This would explain running at 300baud when I selected 2400.

Similar Threads

  1. 18F2520 clock speed ?
    By Gixxer in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 21st August 2008, 20:01
  2. who knows how to let LCD03 work with 18F2520?
    By Janine in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd May 2008, 15:24
  3. 18f2520 - Option_reg
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th April 2008, 18:06
  4. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 17:26
  5. Writecode With 18f2520
    By TomM in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th March 2006, 19:48

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