migration from 16F876a to 18F25k22


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: migration from 16F876a to 18F25k22

    I have 100R and 1K pots on my circuit; backlight and contrast (can't say which has which pot by looking at it).


    Look at the Electronic Parameters at bottom left:
    Voltage Logic 5V typ.
    Voltage LCD 20V typ.

    The LCD has a range of 4.5 to 30 volts, 5 volts should work, and I'd stay away from the upper max. I'd start with an old PC power supply (5V and 12V) and give that a shot if you don't have a variable power supply, or a bunch of old wall adapters.

    So yeah, I'd go with 500R pot on LEDA and 10K pot on V0 to start, and then tweak until I hit a pot that has an acceptable range. You'll see a sweet spot when you get to the right one; from dark to not "too" bright. Brighter LEDs mean shorter life, I aim for the just-enough-for-me range.


    I also noticed something else on your datasheet; CONTROLLER: RA8835 OR EQUAL. I'd do some googling on RA8835 and see if more examples come up. You can never have too many schematics, tables or descriptions.

    Robert
    Last edited by Demon; - 27th February 2012 at 03:08.

  2. #2
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: migration from 16F876a to 18F25k22

    Thanks Robert, I'll let you know how it turns out!

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


    Did you find this post helpful? Yes | No

    Default Re: migration from 16F876a to 18F25k22

    I used the 16F628 and 16F877 before but it looks like I'll have to move up the food chain and the 18F2xK22 and 18F4xK22 series look like just what I need. At least I'm not forced to upgrade to PBP 3.0 yet:

    http://melabs.com/support/patches.htm#pbp

    PBP 2.60A:
    Adds support for: PIC12F1822, 12LF1822, 16F1823, 16LF1823, 12F617, 16F722A, 16F723A, 16LF722A, 16LF723A, 18F23K22, 18F24K22, 18F25K22, 18F26K22, 18F43K22, 18F44K22, 18F45K22, 18F46K22, 18LF23K22, 18LF24K22, 18LF25K22, 18LF26K22, 18LF43K22, 18LF44K22, 18LF45K22, 18LF46K22
    And I can even use the low voltage versions if I want. WOOT!

    Robert
    Last edited by Demon; - 16th March 2012 at 21:05. Reason: Only an idiot signs a post twice. :D

  4. #4
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: migration from 16F876a to 18F25k22

    Quote Originally Posted by Demon View Post
    I used the 16F628 and 16F877 before but it looks like I'll have to move up the food chain and the 18F2xK22 and 18F4xK22 series look like just what I need. At least I'm not forced to upgrade to PBP 3.0 yet:

    http://melabs.com/support/patches.htm#pbp



    And I can even use the low voltage versions if I want. WOOT!

    Robert



    Robert




    Robert, I've got my GLCD working with very little modification to your code. I'm using an 18F45K22. I still have a few bugs to work out with the GLCD code but at least I have something on the screen. The migration to 18F was not too difficult with the exception of a problem I had with ports. my first setup was the same as if I was using 16F and the ports did not work. I then set up ports like this:

    asm
    ;PortA setup
    MOVLB 0Fh
    CLRF PORTA
    CLRF ANSELA
    MOVLW 30h ;PortA <5:4> input - Navigator
    MOVWF TRISA
    ;PortB setup
    MOVLB 0Fh
    CLRF PORTB
    CLRF ANSELB
    MOVLW 03h ;PortB <1:0> input - Navigator
    MOVWF TRISB
    ;PortC setup
    MOVLB 0Fh
    CLRF PORTC
    CLRF ANSELC
    CLRF TRISC
    ;PortD setup
    MOVLB 0Fh
    CLRF PORTD
    CLRF ANSELD
    CLRF TRISD
    ;PortE setup
    MOVLB 0Fh
    CLRF PORTE
    CLRF ANSELE
    MOVLW 0Fh ;PortE <2:0> input - Navigator
    MOVWF TRISE
    ENDASM

    and all works well. I haven't had time to look at Darrel's 'All digital' to see how he handled 18F series but it may be easer to use his include rutine.

    Wayne

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