18F2431 Learning Curve


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 Learning Curve

    How are the configs setup?
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 Learning Curve

    I always stay away from analog pins until I get a basic program running.

    Robert

  3. #3
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 Learning Curve

    Thanks Robert - Unfortunatley this device has so many options per pin. If I stay away from the analog pins then I run into PWM pins, motion feedback pins and others that I haven't got my head around yet. I thought the RA0/AN0 option was the path of leas resistance.

    Dave, I am using my MeProgrammer to configure the device at time of programming.
    Details are as follows:
    Oscillator = INTRC
    Inernal External Switch Over = Enabled
    Fail-Safe Clock Monitor - Enabled
    Power-Up Timer = Disabled
    Brown-Out Reset = Enabled
    Brown-Out Reset Voltage = 2.0V
    Watchdog Timer = Enabled
    Watchdog Timer Postscaler = 1:512
    Watchdog Timer Window = Enabled
    PWM Pins = Disabled on Reset
    Low-Side Transistor Polarity = Active High
    High-Side Transistor Polarity = Active High
    Special Event Reset = Disabled
    MCLR Pin Function = Reset
    Stack Overflow/Underflow Reset = Enabled
    Low Voltage Programming = Disabled

    All other memory options are "Not Protected"

    Cheers
    Barry
    VK2XBP

  4. #4
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 Learning Curve

    Update:

    I have added the following lines to my Blinky LED program:

    Code:
    ANSEL0 = 0              ' Set all PORTA as digital I/O
    ADCON0.0 = 0            ' Disable A/D module
    TRISA = 0               ' Set PORTA as output
    I was confident I would see a blinking LED after these changes but was sadly mistaken...

    Cheers
    Barry
    VK2XBP

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 Learning Curve

    Some will disagree, but I have never trusted the programmer to set the configs.
    What version of PBP are you running?
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 Learning Curve

    Ver 3.0.1.4

    How should I manually set the configs and/or which configs are critical for my simple application?

    I went back to the LCD test program and noticed that I do get two lines of text appearing BUT the timing is way out of kilter - maybe by a factor of 10 or 20?
    I am pretty sure I have a clock issue. I don't have any crystals to drop in place but will try to get some tomorrow. I will also re-try the Blinky LED program and reduce the time between toggles to see if I can get something happening...

    Cheers
    Barry
    VK2XBP

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