Announcement

Collapse
No announcement yet.

MagicCode Question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MagicCode Question

    Hi,

    I have been having some problems getting my code to compile correctly, specifically with magic code in the main loop accessing variables defined from a separate magiccode in the constant/global/data section, from my testing it would seem that the problem lies in only being able to have one magiccode in each of the possible insertion points, whereas for code clarity I have broken my magic code up into sections so that I can use the alias to give details of the block function and thus give improved code readability and management.

    Can you confirm that it is only possible to have one magic code block at each of the insertion points and if so if this is a limitation that is likely to change in the future?

    Regards,
    Neil

  • #2
    Hello Neil.

    Yes, it is only one magic code block at each insertion point. It is only really necessary to have the one block of code for globals etc as these only need to be intialised once and they are available for all code. I can appreciate the clarity in breaking up code etc, but it works well as is and won't be changed in the future.

    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      35DCT-CLB using gen4 PA

      form 3...i have 4 User Buttons
      form 7...i have colorpicker
      form 0...i added Magic KbCp-0 and Magic Code-0

      I went by the Colorpicker LED demo App Note.. and connected to PA4 PA5 and PA6..RGB respectively.

      When i push on the colorpicker and or swipe the color picker, nothing happens.
      When i push the user buttons on form3 the LED changes to a specific color.

      I have assigned my user buttons to separate pinOutputs and GPIO (PA)'s.

      I set Magic Code to Global.

      Thank you,


      Comment


      • #4
        Perhaps you should have put this in a new thread?

        We cannot possibly work out what you have done wrong without seeing your code.

        Use File, Zip project and post your project here
        Mark

        Comment


        • #5
          I have done nothing to the code, except added Magic KbClrP and Magic code. I did not add anything else to those codes because i did not see any code added in the demo. What I have done is what I have stated above. I will not be able to post project until this evening. Any help to understand what may wrong would be helpful.


          Thank you

          Comment


          • #6
            35DCT-CLB to gen4 PA

            I found out the problem

            My connections to gen4 PA were wrong. i read it upside down. i guess i should have been standing on my head to make connections

            Now, it just does nothing.

            I go to form7, colorpicker0, press the color picker and it does nothing.

            RGB to PA4, PA5, PA6.
            colorPicker0 to Magic KbClrP0
            Magic Code0 to Global

            Thank you

            Comment


            • #7
              Hi,

              You could send your zipped project to my email if you like. paul at 4dsystems dot com dot au

              Best regards

              Paul

              Comment

              Working...
              X