Menu

Unable to use 18F chips

Dan Damron
2010-05-03
2013-05-30
  • Dan Damron

    Dan Damron - 2010-05-03

    Following your advice, I am trying to move my program over to an 18LF4682.  I'm not having any success with any of the PIC18 series chips.  Here's my test program:
    ;Chip Settings
    #chip 18F4682,8

    ;Defines (Constants)
    #define LCD_IO 2
    #define LCD_CB PORTA.0
    #define LCD_DB PORTA.1
    #define PS2CLOCK PORTD.2
    #define PS2DATA PORTD.3
    #define USART_BAUD_RATE 9600

    CLS
    Print "Test"
    Do Forever
    Loop

    Now, this compiles fine, but generates a HEX file that is larger than the chip!
    When I download it with CLI, it downloads successfully, but doesn't run, period.

    Attempting to diagnose it, I loaded the HEX file in PICkit 2 software for manual download.  I get "Warning:  Hex File Loaded is larger than device".

    I've tried it also with 18F1320, same issues.  I also have some 18LF4685's but they are the same as the 4682's with more memory.

    Thanks Hugh,

    Kindest Regards,

    Dan Damron VE6IBM

     
  • gcha44

    gcha44 - 2010-05-06

    Hi,
    What's <Forever> after <Do> ?
    Is it a GCBASIC command , a variable ,…?
    Have you tried to compile without <Forever> ?

    GC

     
  • Dan Damron

    Dan Damron - 2010-05-24

    It's the same as do while true..

     
  • Dan Damron

    Dan Damron - 2010-05-24

    BTW, forgot to mention Hugh found a few bugs, and quickly fixed them. 
    The main problem was Microchip changed the CONFIG registers.  The clock wasn't being set properly, and with no clock source, no joy.

    Hugh has fixed this in the current update I believe.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.