MPASM 18F4550 getting started


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1

    Default MPASM 18F4550 getting started

    Hi All,

    Can someone please get me started by posting the first one or two pages of a working program using MCSP 3.0.0.0 with PBP 2.47 and MPASM together with a PIC18F4550. I am having great trouble getting the syntax right and I keep getting crazy errors when converting a satisfactorily working 16F877A program over to MPASM and the 18F4550.

    I need to see how to get the first few define, include and device statements to work. Yes I have the MPASM manual, all 270 pages, and I am reading up on this as best I can, but it can be all a bit subtle as to where to use __ or _ and what goes in the first column or later.

    I have installed MPASM in c:\mpasm and PBP in c:\pbp and my code in c:\testcode to get the path lengths to a minimum but I still get errors such as processor not defined, syntax errors and illegal declarations.

    Any help gratefully received.

    Cheers
    Brian

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    >> working program using ... PBP 2.47 and MPASM together with a PIC18F4550

    This might fit the bill.

    USBDemo, something to learn USB a little bit
    http://www.picbasic.co.uk/forum/showthread.php?t=5418
    <br>
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default A fair bit to digest

    Thanks Darrel, a fair bit to digest in the threads you pointed me to. I will unzip (the files that is) and go through them tonight.

    Cheers
    Brian

  4. #4


    Did you find this post helpful? Yes | No

    Default Example will not compile for me - almost there.

    Hello Darrel namesake.

    I had a hard drive crash last week and had to replace the disk. I thought I had properly backed it up BUT a quick check this morning showed my MCS+ had reverted to 2.2.x.x. I reloaded MCS+ 3.0.0.0 and now I am nearly getting the 18F4550 to work. Not quite there though.

    Sorry to appear ungrateful but the USB example does not do it for me.
    a/ Surely we can stay within PBP and not need an ASM ..... ENDASM block at the start to configure the processor? No big deal, but a surprise to me.

    b/ The USB example does not properly compile for me. I have unzipped all the files in the USB example and placed them in a directory c:\testcode. I have loaded the USBDemo.pbp into MCS+ (3.0.0.0) with PBP (2.47) and I have selected the 18F4550 in the MCS+ processor selection drop down. I have selected MPASM (freshly downloaded last week) as the assembler.

    MPASM threw up many errors so I changed _FCMEN_OFF_1H to _FCMEM_OFF_1H which brought the errors down to ten lines of errors, all of the form:-

    Error [118] c:\pbp\USBdemo.asm 128: Overwriting previous address contents (0000)
    Error [118] c:\pbp\USBdemo.asm 134: Overwriting previous address contents (0000)

    During the assembly, MPASM buts up a green box that flashes past then a red box and then MCS+ gives the error lines above. Page 159 of the MPASM User's Guide was not helpful.

    What is the signifigance of the 'overwriting' errors? Is this a bug in the supplied example?

    Cheers
    Brian

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

Similar Threads

  1. 18F4550 to 18F2550
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th September 2007, 23:13
  2. How can I turn off USB support in 18F4550
    By BrianT in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th September 2007, 03:56
  3. getting started with a PIC 18F4550
    By bigbear in forum General
    Replies: 2
    Last Post: - 16th October 2006, 02:31
  4. 18F8722 and MPASM confusion!
    By Jackson in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 2nd April 2006, 01:24
  5. Converting to MPASM
    By btaylor in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 4th November 2005, 01:35

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