PIC 18F2455 USB code compiling problem


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Location
    Bursa, Turkey
    Posts
    16

    Default PIC 18F2455 USB code compiling problem

    Hi. I got now stuck with USB stuff with PIC 18F2455.
    Shortly, I want to apply a sine wave to PORTA.0, do ADC conversion
    and send the data via USB to PC. Meanwhile, the PC interface is no ready as
    I couldn't compile the code. As soon as the PC interface is ready I am planning make sure that I get data on the PC side and send them out and via
    DAC reconstruct that sine wave.

    Here I modified Steve's USBDemo.zip. I am new to macro files, do not know what they are used for and need it at all. But however, I used macros. Could I figure that out without macros. Because I didn't understand some lines of the code I actaully used. Any input, help about the code and/or macros will
    be appreciated.

    My PBP version is 2.46 an I use MicroCode Studio 2.3.0.0. The necessary lines of 18F2455.INC file are commented as needed.

    And I have the errors below. Can someone help me with that.


    Shot at 2007-07-03
    Attached Images Attached Images  
    Attached Files Attached Files
    Don't worry be happy....

  2. #2
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by abdy37 View Post
    Hi. I got now stuck with USB stuff with PIC 18F2455.
    Shortly, I want to apply a sine wave to PORTA.0, do ADC conversion
    and send the data via USB to PC. Meanwhile, the PC interface is no ready as
    I couldn't compile the code. As soon as the PC interface is ready I am planning make sure that I get data on the PC side and send them out and via
    DAC reconstruct that sine wave.
    Good luck doing much more than a good couple of khz with that...

    My PBP version is 2.46 an I use MicroCode Studio 2.3.0.0. The necessary lines of 18F2455.INC file are commented as needed.
    Get latest MPLAB (7.62?) and MCS 3...

  3. #3
    Join Date
    Mar 2007
    Location
    Bursa, Turkey
    Posts
    16

    Thumbs down

    Quote Originally Posted by skimask View Post
    Good luck doing much more than a good couple of khz with that...

    Thank you for your invaluable advices. It just keeps me 'better'. It seems you are enjoying making a fun of folks.

    Get latest MPLAB (7.62?) and MCS 3...
    There is no MPLAB 7.62. The latest version is 7.61 and I use v7.60.
    MCS version on the Melabs site is 2.3.0.0
    Don't worry be happy....

  4. #4
    skimask's Avatar
    skimask Guest

    Default

    Quote Originally Posted by abdy37 View Post
    There is no MPLAB 7.62. The latest version is 7.61 and I use v7.60.
    MCS version on the Melabs site is 2.3.0.0
    Ok, 7.61 then...couldn't remember...
    MCS version on MeLabs might be 2.3, but MCS version on MCS webpage is 3.0.

  5. #5
    Join Date
    Mar 2007
    Location
    Bursa, Turkey
    Posts
    16

    Talking

    Quote Originally Posted by skimask View Post
    Ok, 7.61 then...couldn't remember...
    MCS version on MeLabs might be 2.3, but MCS version on MCS webpage is 3.0.
    I will let you know if something changes.
    Don't worry be happy....

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Hi Abdykerim,

    Error #1
    There's 2 DoUSBIn, AND 2 DoUSBOute label, They are located at the bottom of your program...

    Error #2,3,4,5,6,7,8,9,A,B,... Ok Ok
    once you have commented the default config fuses in the 18F2455.INC file located PBP folder
    Code:
    ;****************************************************************
    ;*  18F2455.INC                                                 *
    ;*                                                              *
    ;*  By        : Leonard Zerman, Jeff Schmoyer                   *
    ;*  Notice    : Copyright (c) 2006 microEngineering Labs, Inc.  *
    ;*              All Rights Reserved                             *
    ;*  Date      : 06/05/06                                        *
    ;*  Version   : 2.47                                            *
    ;*  Notes     :                                                 *
    ;****************************************************************
            NOLIST
        ifdef PM_USED
            LIST
            "Error: PM does not support this device.  Use MPASM."
            NOLIST
        else
            LIST
            LIST p = 18F2455, r = dec, w = -311, w = -230, f = inhx32
            INCLUDE "P18F2455.INC"	; MPASM  Header
           ; __CONFIG    _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
           ; __CONFIG    _CONFIG1H, _FOSC_HSPLL_HS_1H
           ; __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
           ; __CONFIG    _CONFIG3H, _PBADEN_OFF_3H
           ; __CONFIG    _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
            NOLIST
        endif
            LIST
    EEPROM_START	EQU	0F00000h
    BLOCK_SIZE	EQU	32
    ... nothing else wrong happen IF AND ONLY IF YOU HAVE SELECTED THE RIGHT PIC IN THE DROP MENU AS WELL ...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Need PIC MODBUS RTU code. Will pay.
    By vsingh in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th February 2012, 12:04
  2. Problem runing my code
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 1st December 2009, 20:36
  3. 16f887 44 pin demo board code problem?
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th December 2008, 14:17
  4. Apparent code size problem
    By eetech in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 30th July 2007, 15:51
  5. Microcode Studio 18f2455 problem?????
    By volkan in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st May 2007, 21:04

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