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 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

  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

    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