4-Line LCD and 18F4620


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Lcd/4620

    Here are the DEFINES for the 4620

    DEFINE OSC 4 'OSC IS 4Mhz.
    DEFINE LCD_DREG PORTB 'DATA BUS IS DB4,DB5,DB6,DB7 = RB4,RB5,RB6,RB7
    DEFINE LCD_DBIT 4 'STARTING BIT IS RB4, PIN #37
    DEFINE LCD_RSREG PORTA 'REGISTER SELECT PORT IS PORTA
    DEFINE LCD_RSBIT 0 'REGISTER SELECT BIT IS RA0,PIN #2
    DEFINE LCD_EREG PORTD 'LCD ENABLE PORT IS PORTD
    DEFINE LCD_EBIT 2 'LCD ENABLE BIT IS RD2,PIN #21
    DEFINE LCD_BITS 4 'TOTAL DATA BUS WIDTH IS FOUR BITS
    DEFINE LCD_LINES 4 'TOTAL LINES OF LCD IS FOUR
    DEFINE LCD_COMMANDUS 2000 'COMMAND DELAY TIME IN MICROSECONDS
    DEFINE LCD_DATAUS 50 'DATA DELAY TIME IN MICROSECO

    I have tried other port combinations with the same results.
    First off, sorry for posting in the wrong area. Let me back up to the 877 which was 100% perfect untill I tried to change the ENABLE port and ran into this error:INTERNAL[402]ATTEMPT TO POP EMPTY SYMBOL TABLE STACK. Don't know what is going on here? I tried another code for a 16F628 which was a simple and sound blink routine and got the same error. I thought I would post first before trying a restart and checking the MCS site for error codes. Nothing is simple in micro land.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    The only difference between the two codes is the config setup
    This would be part of the problem at least. The 18F4620 has A/D inputs on several
    port pins you're using to control the LCD.

    RB4 is AN11. RA0 is AN0. ADCON1 = 15 disables A/D so you can use these pins for
    digital I/O.

    I've never seen the internal 402 error, but a re-install should take care of it.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3


    Did you find this post helpful? Yes | No

    Default error status/locked

    Tried a reinstall , uninstall and install same-o, same-o. The question I have is: Is error 402 a lock up event meaning the programmer is bad and will need replacement. I hope MeLabs likes me. I will try turning off the comparators later. A positive side of all this is I had time to learn more about the drawing program in Eagle.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I've never seen the 402 error. I can only find referrence to it in the PM assembler text. I don't think this error has anything to do with the device programmer, but I would for sure contact MeLabs on this one.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Interrupt RPM and Taylors Elapsed time on 18F4620
    By Tobias in forum mel PIC BASIC Pro
    Replies: 70
    Last Post: - 3rd February 2010, 16:12
  2. 18F4620 and SHT11 problems
    By wjsmarine in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th June 2009, 10:26
  3. 16F877 upgrade to 18F4620
    By earltyso in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th January 2008, 06:28
  4. Need help to get I2CRead woriking
    By w7ami in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th November 2007, 16:22

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