"hello world" with 18f6680


Closed Thread
Results 1 to 40 of 92

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    3 things,
    1. no configuration fuses.. make sure you set the right osc mode
    2. disable all multiplexed analog converter, comparator, voltage reference or else fancy stuff
    3. with 18Fs, you want to use LAT instead of PORT to avoid R-M-W behaviour. The best solution is often write to the whole port in one shot instead of using multiple High/Low lines.
    Steve

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

  2. #2
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ok....

    1. i wasn't sure how to set the fuses before, but since then i have discovered the .inc file, and i have changed them in there. if i try to add it to the code too, it says I'm overwriting code space.

    2. i knew i had to do that... i just forgot...

    3. i have never even heard of LAT.. is it in the manual? i had a quick look but couldn't find it there. and when you say write the whole port instead of multiple lines, do you mean all of portb at a time? or am i missing something??

    thanks for the help.. i tried using a PIC18F before, and ran into a lot of problems too, so i put that project on hold for a while and went back to 16F's...

    heres the thread about the Robot i built using a PIC18F6585.. http://www.picbasic.co.uk/forum/show...light=treadbot

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


    Did you find this post helpful? Yes | No

    Default

    Awwwww,

    I wondered what happened to the Treadbot.

    Poor little guy. Back-burners such a lonely place. (except at my house, lot's of company there)

    Hope you get back to it some day.
    And I hope I can help out more when you do.
    <br>
    DT

  4. #4
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    yeah, it seemed to work until the motors got up to a certain speed, adn then it would just freeze.. i started this "project" just to learn the 18f

  5. #5
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    If you put +5vdc on portd.4 does the LED light? If not then it's a hardware problem, if it does then try something really simple like;

    DEFINE OSC 20
    HIGH PORTD.4
    END

    Did the port go high? I took a quick look at the datasheet for you PIC, and I didn't see that PortD.4 is multiplexed, so it should work fine.

    LAT is not in the manual, it is in the datasheet, it's a memory register, you've probably seen it as LATA, or LATB, etc.

    Usually when I have this problem it's because I put the LED in backwards, even though I checked it three times before I soldered it.

    Merry Christmas!

    Jerry.
    If your oscilloscope costs more than your car...

  6. #6
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    i have actually made d.4 an I/O connection on my board.. there is three pins, ground, + and signal (just like a servo). so i had an LED hooked to it, but since then, i have just hooked up my multimeter, and its not showing any voltage across signal to ground when i put it high. i do get 5V across the + and ground. and i can write code to the PIC, and i can read the same code back off the PIC.. its a double stacked board, and i soldered the headers into both boards, so i may need to try to get them apart to look inside where the PIC is..

  7. #7
    Join Date
    Mar 2006
    Location
    Pennsylvania, USA.
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Isn't that always the way? Hopefully you'll see something easy to fix when you get it opened up, it's got to be something simple. The 18F chips are great once you get the hang of them, just keep at it, and remember, we do this for fun right?

    Merry Christmas!

    Jerry.
    If your oscilloscope costs more than your car...

Similar Threads

  1. 18f6680 N/C
    By mackrackit in forum Off Topic
    Replies: 2
    Last Post: - 29th April 2008, 21:21
  2. need help with "hello world" in hyperterm
    By ericmiles in forum Serial
    Replies: 3
    Last Post: - 31st October 2007, 16:08
  3. 18F6680 and portd problems.
    By jkbh in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 6th June 2005, 11:54

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