Bit Angle Modulation (BAM) in a PIC


Closed Thread
Results 1 to 40 of 151

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3157&stc=1&d=123328553 8" />

    Had that come up first, I woud have tried it. Looks interesting.

    But the mirror image seems to work great, so no reason to change horses just yet.

    There's 3 of our regular members looking at it now.
    I like knowing they can set CONFIGs and disable A/D on their own.

    Barring any problems, I'll post it soon.
    <br>
    Attached Images Attached Images  
    DT

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


    Did you find this post helpful? Yes | No

    Default Code Released

    After realizing that Pebbles is probably 60-70 years old by now ...
    I'm not so interested in BAMBAM anymore.

    The name has been changed to MIBAM. (Mirror Imaged Bit Angle Modulation)

    And the code for PicBasic Pro is now available here ...
    http://www.picbasic.co.uk/forum/showthread.php?t=10564

    Cheers,
    DT

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel.

    I am testing your code on a 887 chip at 20MHz.

    I am stuck on this error:

    Error[115] c:\pbp\mibam-~1.asm 223 : Duplicate label ("BAM_PIN" or redefining symbol that cannot be redefined)
    Error[115] c:\pbp\mibam-~1.asm 224 : Duplicate label ("BAM_PIN" or redefining symbol that cannot be redefined)
    Error[115] c:\pbp\mibam-~1.asm 225 : Duplicate label ("BAM_PIN" or redefining symbol that cannot be redefined)
    Error[115] c:\pbp\mibam-~1.asm 226 : Duplicate label ("BAM_PIN" or redefining symbol that cannot be redefined).

    In fact, the code is a copy of the example. Nothing more or less. Of course the part about wsave is included too. Attached is the final test code.

    Regards,
    Ioannis
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Duplicate label ("BAM_PIN" or redefining symbol that cannot be redefined)
    In MicroCode Sudio, View | Compile and Program Options | Compiler Tab ...

    Check the "Case sensitive" box.
    <br>
    DT

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default

    Yep, thats it.

    One word describes this software.

    A M A Z I N G !

    Congratulations Darrel!

    Only leds were more linear devices...

    Thanks a lot.

    Ioannis

    P.S. About the case sensitivity, is this going to have any side effects on other programs that I develop? Why did that happen right now?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis
    One word describes this software.
    <script language="JavaScript" src="http://www.pbpgroup.com/js/ColorText.js"></script>
    <div id="DTtext"><b>A M A Z I N G !</b></div>
    <script>ColorText("DTtext",['red','green','blue','magenta','cyan','black']);</script>
    Thanks Ioannis, and I ... uh ... may have embellished your quote a little. (Shameless )

    P.S. About the case sensitivity, is this going to have any side effects on other programs that I develop?
    I guess that depends on how much ASM code you've been writing.

    The default for MPASM is "Case Sensitive".
    The default for MicroCode Studio is "Case Sensitive".
    So somewhere along the way, you've changed the setting in MCS, and it may or may not have solved your problem at the time. Sometimes you just try things ... grasping for answers.

    Why did that happen right now?
    Because I chose to use tricky things that require case sensitivity.

    The sensitivity option has no effect on PBP statements, since PBP isn't case sensitive to begin with.
    And there are some ASM problems that can come up when un-checking the "Case sensitive" box, so I'd recommend leaving it checked at all times.
    DT

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default

    OK. Thanks for the explanation. I will keep the option checked for case sensitivity. I really cannot recall un-checking it...

    About the Light intensity control, at least for small 5mm Leds, at low levels there is a problem because of the nature of the diodes. Of course it has nothing to do with the code you have developed.

    I suppose that there should be a non-linear function to increse the current at low levels, maybe an exponential or geometric function. Some experimentation will be necessary.

    Anyway, having 20 devices to control with a kind of PWM is fantastic.

    Once again, you are #1!

    Ioannis

Similar Threads

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

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