18f452 Problems


Closed Thread
Results 1 to 3 of 3

Thread: 18f452 Problems

  1. #1
    mglazer's Avatar
    mglazer Guest

    Unhappy 18f452 Problems

    Hi, I have been using the 16f84a no problems at all now I've upgraded to the 18f452 and cannot even get a LED to flash. I have searched the forums and made sure the OSC setting are correct and set to HS for a 20mhz resonator.

    I have been trying for the last 6 hours with no luck and tried another pic just incase the one I had was a dud. I've attached a very crude circuit diagram incase I have done something wrong. I have also tried a crystal in place of the resonator.

    Thank you for any help that you can give.
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    what about if you place the following lines at the top of your code
    Code:
    @ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
        ' Oscillator switch OFF
        ' Use HS oscillator (20MHZ here)
        '
    @ __CONFIG _CONFIG2L, _BOR_ON_2L & _PWRT_ON_2L & _BORV_45_2L
        ' Brown out reset ON @ 4.5Volts
        ' Power-up timer ON
        '
    @ __CONFIG _CONFIG2H, _WDT_ON_2H 
        ' Watch dog timer ON
        '
    @ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
        ' Stack over/underflow ON
        ' Low Voltage programming OFF
        ' Background debugger OFF
        
    DEFINE OSC 20
    Be sure you correctly disable analog or multiplexed stuff on the I/O you're using for your LED.
    Last edited by mister_e; - 25th October 2005 at 17:35.
    Steve

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

  3. #3
    mglazer's Avatar
    mglazer Guest


    Did you find this post helpful? Yes | No

    Default Working

    Thanks for your reply, It pays to just walk away and try tommorow when you are tired. The problem was the ZIF socket was not fully pressed into the bread board.

    I feel like such an idiot.

    Thanks for your help.
    Last edited by mglazer; - 26th October 2005 at 05:20.

Similar Threads

  1. Pic 16 F877 to 18F452...?
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st October 2007, 15:54
  2. IC2 pic 18f452 program problems
    By MrSafe in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 20th September 2007, 18:55
  3. 18F452 "Unknown Processor" errors
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th April 2006, 03:56
  4. Help, problems first time with 18F452 PIC
    By MikeTamu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2005, 20:49
  5. USART problems
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 47
    Last Post: - 6th March 2005, 21:45

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