MEL PICBASIC Forum - MIBAM - More Info


  • MIBAM - More Info

    Option DEFINEs and Constants
    • BAM_COUNT CON xx
      This constant must match the number of BAM_PINS being used.
      If they do not match, an error will be displayed.
       
    • DEFINE BAM_FREQ xxx
      By default, the module determines what the maximum refresh rate is for any given setup, and uses that rate. Depending on the conditions, it may be 700hz or more.
      If desired, you can set the frequency lower with this define.
       
    • DEFINE BAM_INFO 1
      When using this define, MIBAM will display some information about the Refresh Rate (Frequency), Minimum Period, and number of pins used.
       
    • ScopeSync VAR PORTx.x
      If this alias is used, MIBAM will output a sync signal on the specified pin for use with an oscilloscope.
      This gives a nice stable view of the waveform.
      The Pin is automatically set to output.

    <hr>Error/Warning messages
    • Error: Symbol not previously defined (wsave)
      When using a 12F or 16F, you need to add the wsave block shown above to your program.
      This is not necessary for 18F's, so the vars have been omitted from the module.
      &nbsp;
    • ERROR: Variable wsaveX position request beyond RAM_END xx
      If the chip you are using doesn't have GP RAM in all 4 banks, then you have to comment out the wsave variables for any of the banks that don't have any. The ERROR message(s) tell you which ones need to be commented.
      If the chip has ACCESS RAM at address $70, then it's best to use that location, instead of wsave1-3.
      &nbsp;
    • Error: BAM_COUNT (x) is less than # of Pins used (x)
      The BAM_COUNT constant MUST match the number of BAM_PINs being used.
      Increase BAM_COUNT to fix the Error.
      &nbsp;
    • Error: Duplicate label ("BAM_PIN" or redefining symbol that cannot be redefined)
      The module requires case sensitivity in MPASM. But sensitivity has been turned off in MCS.
      In MicroCode Sudio, View | Compile and Program Options | Compiler Tab ...
      Check the "Case sensitive" box.
      &nbsp;
    • WARNING: Too many BAM pins for xx Mhz - Results will be BLINKY!
      The module can only run 1 LED per Mhz of the CPU's main Oscillator.
      Reducing the number of LED's or increasing the OSC frequency should eliminate the warning.
      &nbsp;
    • WARNING: BAM frequency (xxHz) is Less than Requested (xxHz)
      The module determines what the maximum refresh rate is for any given setup.
      If a BAM_FREQ has been defined that is higher than the maximum frequency, the module will warn you of the situation. This warning is not critical, and may still work in your application.
      Commenting the DEFINE BAM_FREQ line will squelch the warning.
      &nbsp;
    • MESSAGE: 'BAM_INFO' - MinPeriod= xx inst, Cycle= xxxx inst, Pins= xx, FREQ= xxx Hz
      This is an informational message that will be shown if you have set DEFINE BAM_INFO 1 or get a "BAM frequency WARNING".
    This article was originally published in forum thread: MIBAM - (Mirror Imaged Bit Angle Modulation) started by Darrel Taylor View original post