Problems starting an 18F8720


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2010
    Posts
    12

    Default Problems starting an 18F8720

    High i try to start a basic blinking led, on a 18f8720, but no success, anyone knows config bits i should set to make this chip works ?

    My code looks something like this.

    main:
    HIGH PORTA.1
    PAUSE 300
    LOW PORTA.0
    PAUSE 300
    goto main


    I tried disabling WDT, HSPPL, and multiple different combinations of config bits but nothing did it.

    Its not a code problem but i have no clue on how i can debug/ troubelshoot the pic, this is pre-build card with the pic and pinouts.

    Should I consider that, because the pic is programmable, its most likkely not blown, i just have to find the right bits, or can it be that it's programmable but will never start because its faulty ?


    Regards.

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Have you tired disabling the analog-digital converter?

    ADCON0=%00000000
    ADCON1=%00001111
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    Join Date
    Apr 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Default i will try it this evening

    Thanks for the reply i will give it a try when going home,
    i know adcon can give unexpected behavior sometimes, but i did'nt know it can simply avoid you pic to run a simple blink led.

  4. #4
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    if the pin the LED is on is also an AD pin, then yes it will stop it if that pin is configured for analog use.

    Also, there is a problem in your code if you want the LED to blink. HIGH PORTA.1 will put port A, pin 1 high and LOW PORTA.0 will put port A, pin 0 low and thats where they will stay. Nothing will blink.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  5. #5
    Join Date
    Apr 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    my mistake in the code i typed over, i tried with pins on almost every port.
    B, H, A with the same result always. Not blinking. Therefore i have doubts over the device, how can i troubleshoot this ...

  6. #6
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Hard to say without more information like the entire code, config settings and hardware setup. Are you using an external OSC?
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  7. #7
    Join Date
    Apr 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Default The card

    This pic is on a card with an osc onboard of 6mhz supposed to be ran on 24mhz thanks to hsppl.

    Here is a pdf of the card, (it's in thai) but the last 2 pages are the wiring diagrams.

    http://www.steitec.net/media/product...1249723519.pdf

  8. #8
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Can you post your code and config settings.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  9. #9
    Join Date
    Apr 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Default Strange

    Came back home and done it over again, played a bit with the config bits and it started to blink with and without adcon, one config bit i have removed was LVP .... that should not interfere execution.;.. but ok it works now thanks for the support.

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