PIC18F4550 question VS PIC16F887


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 question VS PIC16F887

    I tried it both ways MPASM and PM, and both of them do not work. I cant even compile.

    I even tried to compile this program:http://melabs.com/samples/LABXUSB-18F4550/USBMOUSE.htm

    I can compile if I just use in the overhead: DEFINE OSC 20 and put an external 20mhz crystal, it is somewhat working, but is not keeping the timer properly and is not showing all the letter on the LCD.

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 question VS PIC16F887

    Using:
    DEFINE OSC 8
    OSCCON = %01110000

    only as the overhead and compiling:
    Executing: "C:\PBP2.60\PBPMPLAB.BAT" -ampasmwin -k# -p18F4550 "both.bas"
    Executing: "C:\PBP2.60\PBPW.EXE" -ampasmwin -k# -p18F4550 "both.bas"
    PICBASIC PRO(TM) Compiler 2.60A, (c) 1998, 2010 microEngineering Labs, Inc.
    All Rights Reserved.
    Loaded C:\PBP2.60\both.COF.
    BUILD SUCCEEDED: Sun Feb 20 10:22:55 2011

    but the LCD is only showing black squares...

    K

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 question VS PIC16F887

    Quote Originally Posted by lerameur View Post
    but the LCD is only showing black squares...
    That looks like a timing issue or maybe a problem with the LCD contrast. That would be my guess. To check that the timing is correct I would try to blink an LED with let's say a 1 sec on and off interval. For the contrast issue I would use a pot to see if there are any changes. Are you using the same voltage with the PIC16F887 and with the PIC18F4550?

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 question VS PIC16F887

    the pins are the same on both 887 and 4550 chips. The 4550 does work with a 20mhz crystal but the timing is off. It does not record a proper time on the RTC and when I show the time on the LCD and do not pause for 1sec but a bit less then half a second and it always shows me 08:08:08:08. and the first few letters are missing on the lCD on the first line.

    K

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 question VS PIC16F887

    I change to DEFINE OSC 40 while still using a 20Mhz crystal. The text is good on the LCD , but the timer always read 08:08:08

    K

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 question VS PIC16F887

    Hey Dave,

    when yo mentioned these settings:
    @ __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    @ __CONFIG _CONFIG1H, _FOSC_INTOSCIO_EC_1H
    @ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    @ __CONFIG _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
    @ __CONFIG _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L &_XINST_OFF_4L


    should they be inside asm... endasm ? or just copy and paste ?

    also in the MPLAB I have the build option: -ampasmwin -k#

    K

  7. #7
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: PIC18F4550 question VS PIC16F887

    I changed the config line in the .INC file and it is now working with the 8mhz internal oscillator.
    The INC file is configure to handle external oscillator by defAULT. I am figuring how to make it work. even with the original INC file, and only user DEFINE OSC 20. the LCD is not showing any text.

    k

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