migration from 16F876a to 18F25k22


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    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 for your comments. Yep, I've looked at evey piece of document I can find and the microelektronika schematic is the only thing I can find to give me any idea of what to do with Vo, and of course they are not using the same GLCD so its just a roll of the dice and hope for the best.

    The attatched datasheet shows the Negative Voltage Generator at the bottom right of the page. notice V0 is an input to the NVG. So, Robert, do you think V0 is a Ground reference for the NVG. If we look at the easypic_v7 data sheet, microelektronika takes Vo to a 10k pot to the NVG, which of course will bring Vo bellow Vss. I think I will start with the 10k pot to ground and if the contrast is not great enough I tie the pot to NVG. I will use your advise on how to handle the LED's. Are you using only a 15 ohm resistor on LEDA?

    CN2 GLCD uses 20 pin FFC cable
    Pin function description My Action
    1. VSS GND GND
    2. VDD Logic Power input +5V
    3. VO LCD contrast control POT 4kohm
    4. AO Command / Data Select U1.RA.7
    5. /WR 8080: Data Write U1.RC.0
    6. /RD 8080: Data Read U1.RC.1
    7. DO Data buss line0 U1.RD.0
    8. D1 Data buss line1 U1.RD.1
    9. D2 Data buss line2 U1.RD.2
    10. D3 Data buss ilne3 U1.RD.3
    11. D4 Data buss line4 U1.RD.4
    12. D5 Data buss line5 U1.RD.5
    13. D6 Data buss line6 U1.RD.6
    14. D7 Data buss line7 U1.RD.7
    15. /CS LCD Controller function Reset U1.RC.3
    17. VEE Negative voltage output (-23V) ???
    18. SEL1 SEL1=L, 8080 interface; GND
    19. FGND Front Panel Ground GND
    20. NC

    CN3 LED wiring
    21. LEDA Power for led Backlight(A) POT_500 ohm to Vcc
    22. LEDK Power for led Backlight(K) GND

    Thanks Again Robert!
    Wayne
    Attached Images Attached Images

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


    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 02:08.

  3. #3
    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!

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


    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 20:05. Reason: Only an idiot signs a post twice. :D

  5. #5
    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

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


    Did you find this post helpful? Yes | No

    Default Re: migration from 16F876a to 18F25k22

    Quote Originally Posted by MOUNTAIN747 View Post
    ...
    17. VEE Negative voltage output (-23V) ???
    ...

    Wayne,

    I've been thinking of the negative voltage that your LCD would like to have. You might be getting acceptable results using 5VDC+, but if you're not satisfied with the brightness/contrast, I totally forgot that you can have -12VDC on a PC PSU. That's still safely within the operating specs of the LCD.

    http://pcsupport.about.com/od/inside...in-12v-psu.htm

    Robert

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