Bit Angle Modulation (BAM) in a PIC


Closed Thread
Results 1 to 40 of 151

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Assembler error

    I'm having problems compiling the sample code. Would you have any suggestions?
    Code:
    ;----[ MIBAM Setup ]--------------------------------------------------------
    BAM_COUNT CON 3                     ; How many BAM Pins are used?
    INCLUDE "MIBAM.pbp"                 ; Mirror Image BAM module
    
    RED    VAR BYTE
    GREEN  VAR BYTE
    BLUE   VAR BYTE
    
    ASM
    BAM_LIST  macro                     ; Define PIN's to use for BAM
         BAM_PIN (PORTB,0, RED)         ;   and the associated Duty variables
         BAM_PIN (PORTB,1, GREEN)
         BAM_PIN (PORTB,2, BLUE)
      endm
      BAM_INIT  BAM_LIST                ; Initialize the Pins
    ENDASM
    ;___________________________________________________________________________

    Assembler output:
    Code:
    project.asm 257: Symbol not previously defined (wsave)
    project.asm 260: Symbol not previously defined (ssave)
    project.asm 262: Symbol not previously defined (psave)
    project.asm 388: Symbol not previously defined (psave)
    project.asm 390: Symbol not previously defined (ssave)
    project.asm 392: Symbol not previously defined (wsave)
    project.asm 393: Symbol not previously defined (wsave)

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


    Did you find this post helpful? Yes | No

    Default

    In the MIBAM thread. The second post lists the typical Error/Warning messages you might encounter.

    In your case, you need to add the wsave block shown in Post#1.
    <br>
    DT

  3. #3
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    At 4800 baud, each byte takes about 2.1 mS.
    The USART has a 2.8 byte buffer, so at around 6 mS the USART buffer will overflow.
    Sorry I didn't get back. Thank you, that was where I missed it.

    Bit of a lull as I wait for a new meLabs serial programmer. For some reason the 18F2550 decided to become a heating element instead of a processor. Alas, it lived a good life.... Couldn't be EOC, could it? (Excessive Operator Carelessness). Had to dig out an old laptop that still had a parallel port to run the EPIC programmer.

    Bo

Similar Threads

  1. decoding quadrature encoders
    By ice in forum mel PIC BASIC Pro
    Replies: 93
    Last Post: - 28th February 2017, 09:02
  2. Cordic trig assembly code for PIC18f
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 54
    Last Post: - 8th September 2015, 05:36
  3. AT/PS2 Keybord - PIC Interface?
    By Kamikaze47 in forum Code Examples
    Replies: 73
    Last Post: - 9th August 2009, 16:10
  4. MIBAM - (Mirror Imaged Bit Angle Modulation)
    By Darrel Taylor in forum Code Examples
    Replies: 2
    Last Post: - 15th February 2009, 16:02
  5. Bit Angle Modulation
    By BH_epuk in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th November 2008, 07:01

Members who have read this thread : 3

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