Newbie problems, Can someone help me..


Closed Thread
Results 1 to 3 of 3
  1. #1
    vaidyasp1's Avatar
    vaidyasp1 Guest

    Default Newbie problems, Can someone help me..

    hi,

    I am working with two controllers 16f84 and 18f4520. I use my picbasic pro compiler to compile following program. It works fine with 16f84 but does not work with 18f4520. For 18f4520 i have connected just vdd and vss pins. Is the circuit fine??

    I also get a warning 230 while compiling the code for 18f4520. I think that is for the configuration bits.

    I think my controller is not running at all. Because it cannot have the clock. so, i want to know the configuration bit settings for internal 8Mhz rc oscillator. So, how can i configure them. I use the EPIC programmer given from melabs. So, what should be the option for internal rc oscillator??
    whether it should be INTRC Clockout or INTRC??


    My very simple code was as below....
    -----------------------------code-----------------------------------


    OUTPUT PORTA.0

    loop: High 0 ' Turn on LED connected to PORTB.0
    porta.0 =0
    high portb.3
    Pause 500 ' Delay for .5 seconds

    Low 0 ' Turn off LED connected to PORTB.0
    low portb.3
    porta.0=1
    Pause 500 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever
    End

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Oops - wrong button

    Paul
    Last edited by paul borgmeier; - 26th April 2006 at 08:21.

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


    Did you find this post helpful? Yes | No

    Default

    All about 'How to set config fuses http://www.picbasic.co.uk/forum/showthread.php?t=543

    Also you'll need to disable all analog stuff on PORTA & PORTB (Comparator and A/D converter) : Datasheet Section 19.0 and 20.0

    AND finnally you'll need to configure the internal oscillator speed as the default is 1MHZ : OSCCON register Section 2.6
    Last edited by mister_e; - 26th April 2006 at 13:28.
    Steve

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

Similar Threads

  1. Problems with U2 programmer C30 compiled code
    By minimii in forum Off Topic
    Replies: 0
    Last Post: - 5th November 2009, 09:43
  2. request for a newbie forum
    By nimonia in forum Forum Requests
    Replies: 1
    Last Post: - 20th May 2006, 09:01
  3. Problems with 16F876 on interrupts an WRITE / READ
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th December 2005, 14:38
  4. Goto inside a gosub??? Problems...
    By leonel in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 13th October 2005, 12:17
  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