18F1220 programming problem


Closed Thread
Results 1 to 9 of 9
  1. #1

    Default 18F1220 programming problem

    I am trying to run Darrel Taylor's "Hello World" program. It compiles, but when trying to program, I get the following message:

    "MicroCode Studio is unable to locate 'DT Hello World.hex'. Do you want to compile and assemble 'DT Hello World.pbp' now?" When I answer yes, it appears to compile, but the ME Labs U2 programmer window does not come up. What am I doing wrong? Code:

    TRISA = %00100000
    TRISB = %00000111
    WDTCON = 0
    ADCON0 = %00000000
    ADCON1 = %01111111
    LVDCON = %00000000
    CCP1CON = %00000000
    OSCCON = %01100010
    RCON = %10000010
    EECON1 = %00000100
    INTCON2 = %00000000
    INTCON3 = %01011011
    PIE1 = %00000000
    PIE2 = %00000000
    IPR1 = %00000000
    IPR2 = %00000000
    RCON = %10000000
    T1CON = %00000000
    T2CON = %00000000
    T3CON = %00000000
    TXSTA = %00000000
    RCSTA = %00000000
    LVDCON = %00000000

    @ __CONFIG _CONFIG1H, _IESO_OFF_1H & _FSCM_OFF_1H & _INTIO2_OSC_1H
    @ __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_27_2L
    @ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_32K_2H
    @ __CONFIG _CONFIG3H, _MCLRE_OFF_3H
    @ __CONFIG _CONFIG4L, _DEBUG_OFF_4L & _LVP_OFF_4L & _STVR_OFF_4L
    @ __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L
    @ __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    @ __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L
    @ __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
    @ __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L
    @ __CONFIG _CONFIG7H, _EBTRB_OFF_7H


    LED1 VAR PORTB.4

    INCLUDE "DT_INTS-18.bas" ; Base Interrupt System
    INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts

    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?
    INT_Handler INT_INT, _ToggleLED1, PBP, yes
    endm
    INT_CREATE ; Creates the interrupt processor
    ENDASM

    @ INT_ENABLE INT_INT ; enable external (INT) interrupts

    Main:
    PAUSE 1
    GOTO Main

    '---[INT - interrupt handler]---------------------------------------------------
    ToggleLED1:
    TOGGLE LED1
    @ INT_RETURN

    Thank you for any help.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Try shortening the name itself, keep it under 8 characters, and possibly the path too, just to see what happens...
    Other than that, looks like an MCS configuration problem.
    Last edited by skimask; - 26th June 2008 at 04:18.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I failed to mention: Other programs I have written for this part compile and program just fine, so it must have something to do with Instant Interrupts.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jderson View Post
    "MicroCode Studio is unable to locate 'DT Hello World.hex'. Do you want to compile and assemble 'DT Hello World.pbp' now?"
    So it must know where Hello World is. It can't find the hex file...ok...it didn't compile fully the last time, and therefore didn't produce a .hex file.

    When I answer yes, it appears to compile, but the ME Labs U2 programmer window does not come up.
    The U2 programmer (or any other programmer) is an add-on to MCS and must be configured as such, either with the correct command line or at least with the correct options in MCS.

    If the file compiled with errors in MCS, you would see other error messages at the bottom of the MCS screen, and most likely, if you think the error has something to do with the instant interrupts, the error would most likely have the words 'instant interrupts' in it.
    But you didn't say anything about that, so I think I can safely assume you haven't connected MCS to the programmer correctly as of yet.
    Or were there more errors?

  5. #5


    Did you find this post helpful? Yes | No

    Default

    I get the "Overwriting previous address contents" (Error 118), but as I said, other programs also give these error messages and still compile and program correctly.

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hello jderson,
    It compiles perfectly for me after commenting out the STD configs in the 18F1220.inc file and finds my programmer too, loads the hex too, My money is on Darrel's code is NOT at fault. EDIT: LVDCON = %00000000 is listed twice too
    Last edited by Archangel; - 26th June 2008 at 06:21.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jderson View Post
    I get the "Overwriting previous address contents" (Error 118), but as I said, other programs also give these error messages and still compile and program correctly.
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    applies to the overwriting problem

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Thanks Joe! Indeed, the CONFIF1H line is the offender. I don't understand why, but I'll find out.

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jderson View Post
    Thanks Joe! Indeed, the CONFIF1H line is the offender. I don't understand why, but I'll find out.
    CONFIF1H? Huh?

    I'm guessing here, 'cause I haven't/can't look at the 18f1220 inc file at the moment, but the link to the post above most likely will fix your problem.
    Last edited by skimask; - 26th June 2008 at 14:11.

Similar Threads

  1. 16F676 programming problem
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th May 2009, 17:39
  2. PIC18F4620 Programming problem
    By JavPar in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 6th December 2008, 04:21
  3. PIC 18f1220 EUSART Baud Rate Cache Problem
    By wklose99 in forum Off Topic
    Replies: 3
    Last Post: - 15th April 2008, 00:39
  4. Programming Problem with PIC16F819
    By Dick Ivers in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 24th July 2007, 18:42
  5. Problem programming the PIC16F648A
    By Edgardo_2 in forum General
    Replies: 2
    Last Post: - 29th December 2006, 00:02

Members who have read this thread : 1

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