18F4523 beginner needing help to blink an LED...


Results 1 to 23 of 23

Threaded View

  1. #10


    Did you find this post helpful? Yes | No

    Default Re: 18F4523 beginner needing help to blink an LED...

    Quote Originally Posted by thesparky View Post
    Still cannot get anything to work with this PIC18f4523.

    My code is (at the moment...):

    DEFINE OSC 8
    OSCCON = %01110000
    ADCON0 = %00000000
    ADCON1 = %00001111
    CMCON = %00000111
    TRISE=0
    TRISD=0
    PORTE.0 = 1
    PORTD.2 = 1

    I have tried various different things all day but I still cannot get any output.

    I cannot try the code Brian supplied as it was for a different PIC (well, I did try it but it did not compile with the @__... lines in place, once I'd rem'd them out it programmed fine but still did not work). I can't use a 18F2320 as this has not got enough pins for the final project I want to use this pic for, and ideally I would like at least 1 12 bit adc, preferably 2.
    You also need to set adcon2 on the PIC18F4523. It might be better to try a 10 bit a to d converter first. Maybe a PIC18F452 once you get that working you move to a 12bit converter. PBP adcin command may not work since it is geared to 8 and 10bit adc's.
    Good luck

    Nothing like a quick search. See Bruce's example
    http://www.picbasic.co.uk/forum/show...ighlight=12bit
    Last edited by mark_s; - 18th February 2011 at 15:33. Reason: add link

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