Pwm modulation on blackfin

Hi All
I'm trying to modulate PWM timer (working on 1MHz) with sinusoidal signal at 50 Hz on Blackfin 537.
the VI working done, but i'm cannot control the frequency on modulating signal, however it's look like the FOR loop proccesing time is 1.7msec. why ?
My software: Labview 8.6 , ADI_Blackfin 8.6
Hardware : ADSP-BF537 EZ-KIT, silicone ver 0.2
Attachments:
pwm_modulation.JPG ‏79 KB

Hi Karunya,
I'm downloaded the datasheet of ADSP-BF537 EZ-KIT. From that I'm understand that I'm can't work with TMR0 and LED4 in the same project.
What I'm mean in my question is why I'm see the signal that generated to TMR0 only on LED4, and not between pins 6 and 9 on header P11. The signal was checked by oscilloscope.
Following your request to measure the execution time of FOR loop by using flat sequence and timer, I can't do it because in working with BlackFin, labview compiling the VI and downloaded him to the RAM of EZ-KIT, and the VI looking like freeze (not on running mode) and I'm doesn't see any change on indicators. To demonstrate this operation, I'm measure the time of steps on one cycle of output signal. Attached image from oscilloscope, you can see that the time of one step (is equal to one iteration of FOR loop) is around 1.7 msec.
My main question is how to increase the iteration cycle of executed FOR loop, or any other suggestion to create modulated PWM by sinusoidal signal with adjustable frequency of sinusoidal signal (at range of 10-100Hz).
   Note: my mission is to create modulated PWM, when carrier signal on 100kHz (natural frequency of TMR0) and modulated by signal (that change the % of duty cycle for TMR0) is absolute sinusoidal at range of 10-100Hz (because the % of duty cycle can be 0-100%).
The absolute sinus that you see on the image got from Low Pass filter by the oscilloscope software.
Attachments:
Block diagram 10 sample.JPG ‏88 KB
pwm_10samples.JPG ‏28 KB
pwm_100samples.JPG ‏27 KB

Similar Messages

  • Labview Embedded module for blackfin processor

    hi
    i want ot know that, Labview Embedded module for blackfin processor full development kit is essentail for detecting Blackfin Board.
    I have all the software to detect the board but only Labview Embedded module for blackfin processor is Evaluation version.
    so is that a resion for not detecting the Board
    Regards
    mithun patil

    Just to be clear: The version of VisualDSP++ you need is not just VisualDSP++4.0, but VisualDSP++ 4.0 for LabVIEW Embedded. It is a special version created especially for use with LabVIEW Embedded. Go to the Help>About window in VDSP and verify that this is the product name. The evaluation version should not matter as long as the evaluation period has not expired.
    Message Edited by Michael P on 08-07-2006 11:26 PM
    Michael P
    National Instruments
    Attachments:
    vdsp.JPG ‏28 KB

  • Embedded labview module and blackfin 533

    I need some advice for Embedded labview program integrated with Blackfin 533 Processor. The purpose is to input a value from a GUI in labview and store in a port/location in the blackfin board. Then, upon knowing this location, i can extract the value and use it in my main program in visualDSP.
    Anyone know how to integrate them together as well as identifying where the value is stored in the blackfin? Im using blackfin 533 with Ez-Kit lite.
    thanks

    Just to be clear: The version of VisualDSP++ you need is not just VisualDSP++4.0, but VisualDSP++ 4.0 for LabVIEW Embedded. It is a special version created especially for use with LabVIEW Embedded. Go to the Help>About window in VDSP and verify that this is the product name. The evaluation version should not matter as long as the evaluation period has not expired.
    Message Edited by Michael P on 08-07-2006 11:26 PM
    Michael P
    National Instruments
    Attachments:
    vdsp.JPG ‏28 KB

  • Integrating a DSP and BlackFin Modules with LV 8.5

    Hi all,
    I am just posting my last trouble when I was using Labview software for an academic work.
    So I'll try to summarize the topic.
    So, the point was to integrate LB with DSP board specifically model BF537 from BlackFin.
    The problem is: Not all version of Labview can support DSP Module (this is an extension that you should install to do the integration possible) and BlackFin Embedded application for BF537 as well.
    Just to clarify: you should have the correct version of LV because after that, you should install DSP Module and then, BlackFin Embedded.
    The LV 8.6 supports BlackFin Embedded but doesn't supports DSP Module. The LV 2009 and LV 2011 we have the same issue. You can read the respective guide of these versions just to check it out.
    The only version of LV that can support DSP Module and Embedded Module for Blackfin Processors is version 8.5.
    The problem would be solved if both Modules(DSP and BlackFin) would are easily available on NI site or other website.
    I spent many hours searching with no success. For LV 8.5 the correct DSP Module is 2.5 and I could not find this specific Module on any ws. Regarding Module for Blackfin Processors I have no problem to download it.
    I tried to contact NI local support of my country but they have slow answers and any engineer can help me although all have been very attentive by phone.
    My solutions was contact USA engineer. The local team is very efficient and some minutes later the DSP Module 2.5 was available to download in this link:
    ftp://ftp.ni.com/outgoing
    (mario_2.5.zip)
    If anyone has problem to download the file, please let me know. I will be so glad to help.

    Hello.
    Could you send us your VI (v8.5) please? Thanks.
    Regards.
    Romain D.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    NIDays 2010 : Conférence mondiale de l'instrumentation virtuelle
    >>Détails et Inscription<<

  • Using Fieldpoint Explorer, I am having trouble configuring outputs on my RLY-420 and PWM-520 modules attached to an FP-1000 network module

    I have noticed that I can not get my Relay module to turn off all of the channels, also I can only set the PWM modules down to ~4% output.
    I have tried to "Reset" the factory defaults on the FP-1000. I've tried to configure the powerup states of the different modules, all with no luck.
    I have made sure I am running with the latest firmware on the FP-1000
    I did notice this problem before upgrading the firmware. Immediately after doing the upgrade the problem went away for a short while. Now it is back again.
    My system is configured as follows:
    1 FP-1000 network module @address 0
    4 FP-TC-120 modules @1,
    2, 3, 4
    2 FP-TB-10 dual channel bases @ 5, 6
    2 FP-PWM-520 modules @ 7, 8
    1 FP-RLY-420 module @ 9
    Something seems to me to be happening with my .iak file in FieldPoint Explorer, of course I could be completely off base.
    I appreciate any insight anybody might have with this problem
    Kerry Libberton
    TDA Research
    Wheat Ridge, CO

    Kerry,
    There are several different things that may be going on here. First of all, there may be an issue with power consumption. A network module (FP-1000 in this case) is designed to source up to 9 Watts of power to I/O modules. This assumes an average of 1 Watt per module. Certain modules require more than 1 Watt, most require less leaving extra power for the ones that require more. In your configuration, you may be over this depending upon how your FP-TB-10's are populated. Assuming that the TB-10 is unpopulated, your consumption is 4 * 0.35 + 2 * .25 + 2 * 0.6 + 1.7. = 3.8 Watts. Thus, the load from the Dual Channel modules may not exceed 5.2 Watts. If you are using exclusively the Dual Channel Analog Out Current modules, you will overload the power supply.
    Anothe
    r thing to look at is when resetting the network module, check the box that says factory configuration. After the reset, uncheck the box and then configure your channels and power-up values (edit this device on each module).
    Also, there are some times when relays may get "stuck" in an on position due to extremely high inductive loading. I have not seen that happen very frequently, but it does make me wonder, what type of load are you driving on the relay channels?
    The PWM module, has 12 bit resolution, and will accept values of 0% for the output duty cycle. What value for the period have you set?

  • [SOLVED] Control PWM frequency of LED-backlight in Thinkpad laptops

    Hi.
    I'm seeking for a person who is eager to make a contribution to opensource
    Recently I've got Lenovo X220 laptop and noticed that it makes me sick. Eventually I discovered a screen flickering that is caused by low PWM frequency (backlight brightness is controlled with PWM).
    This issue is so ubiquitous, that some folk created simple utility for Windows to adjust PWM frequency by interacting with Intel driver.
    http://pastebin.com/6iirMbfc
    It's only 50 lines of code. So I hope that accomplishing the same under linux won't be very hard.
    As you might have guessed, I don't have any experience nor knowledge in C. Thus I'm asking here for help.
    So... anyone eager to create similar utility for linux?
    Hails and beer for the author implied
    P.S. Of course, I would be very glad to hear, that my question is non-sense because our belowed linux already provides handy ways to control PWM frequency (though, I was not able to find anything like this).
    UPD: that damn screen flickering made me not only sick, but also dull.
    I've just found this in archwiki
    https://wiki.archlinux.org/index.php/Ba … at_care.29
    Seems like it does the same, that mentioned utility does. Though, some background knowledge is required. Appreciate any help with this.
    Solution
    Thank you all, folks.
    Solution is an wiki already.
    https://wiki.archlinux.org/index.php/Ba … 15_only.29
    Last edited by eDio (2013-04-21 16:22:23)

    I've found some patch to fix default PWM frequency in i915
    http://web.archiveorange.com/archive/v/ … BgDr5oIynd
    From the code of this patch I've got an address of a register that controls PWM frequency 0xc8254. I was not able to determine anything else. That patch seems to be applicable to an old kernel so I had no any context (new kernel in the Linus's github repo doesn't look very similar). Also, my "native" programming language is java so I'm a little bit scared by C syntax .
    To manipulate Intel GPU registers one can use intel_reg_read and intel_reg_write programs from the community/intel-gpu-tools.
    By default, register contained value
    0 x 12 28 12 28
    Experimentally I was able to determine, that register controls the period of PWM modulation (1/frequency).
    The most comfortable value for me is *0x03000000*.
    I'm going to put this info to the wiki on the weekend. I'm sure it'll be useful for others.
    C+Linux programming adepts are welcome to write an application for user-friendly PWM modulation frequency adjustment
    P.S. forgot to mention that Linux rocks! I can't imagine investigations like this in other OSes.
    Last edited by eDio (2013-03-21 22:16:18)

  • Point-By-P​oint filtering for Blackfin

    Hi,
    I am evaluating the embedded module for blackfin for a project, where i need to do some real-time-filtering during ADC.
    In normal LabVIEW  (not for an embedded target) I would do this using PointByPoint-filters. But as these VIs all seem to use floating point data types, they are not really suitable for my application.
    I couldn't find any way to do point-by-point-filtering using the blackfin-optimized VIs by now. So my question is, if there are any blackfin-specific point-by-point VIs that I just did not see (perhaps not available in the evaluation version?) or if there is any other way to accomplish real-time-filtering with the existing VIs.
    Thanks,
    Jan

    Hi John,
    The “Inverse Chebyshev Filter PtByPt.vi” is reentrant. When you
    open the SubVI, the title should say “clone” in parentheses. Each clone runs in
    its own memory space. You cannot modify a reentrant VI unless you close all
    referencing VIs.
    The “Inverse Chebyshev Filter PtByPt.vi” is also part of a LabVIEW
    library. (C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\ptbypt\NI_PtbyPt.lvlib).
    This Library is password protected. Also you do not want to modify something
    shipped as standard along with LabVIEW.
    There is a way around this though. Open the “NI_PtbyPt.lvlib”.
    From the menu select File >> Save As. This will duplicate the entire
    Library to a new location. Now open the copy “Inverse Chebyshev Filter
    PtByPt.vi” and modify it to use Inv Chebyshev co-effecients. You can now use
    this modified SubVI. I did try this (in LabVIEW 8.5) and the outputs of the
    Point by Point and Array functions were the same in your Demo program.
    Again, I cannot comment if this is a bug in LabVIEW or we
    are missing something. It would be best to contact NI or wait for someone from
    NI to comment on this forum.

  • Way to use NI FieldPOint PG-522 module

    Hi everybody!
    I'm using for few days fieldpoint family. My needs are concerning analog inputs and pulse generation for PWM module.
    For the analog inputs, everything's OK, the sample provided with CD is complete, but I have some difficulties to use PG-522 module.
    My needs are to control a PWM module. Unfortunatelly, the PWM module for FieldPoint is not fast enought (I need a 2kHz signal, and FP-PWM-520 module allows only a maximum of 500Hz). That's why I decide to use Pulse Generator module with resolution of 100µs (it is constant) and I select On Time from 0 to 5, Off Time from 5 to 0, to get a real 2kHz signal.
    It seems to be OK, but since I decide to use 2 channels on the module, I don't really understand how to do...
    For the moment, here is the source code (LabWindows/CVI) I use to build a small dll to make it easy to control.
    Here is the function I use to send OnTime and OffTime values:
    int __declspec(dllexport) FP_PG_SetTime(int PG_Channel_Number, int OnTime, int OffTime)
        IAStatus status = IA_SUCCESS;
        SYSTEMTIME timestamp;
        int i;
        int temp;  
        if(OnTime<0 || OnTime>5)
            temp = 5;
        else
            temp = OnTime;
        // Copy value to send with calculation of channel to control
        memcpy (PG_value + (PG_Channel_Number*4), &temp, 4);
        // Control Channel #0
        if(PG_Channel_Number == 0)
            // FP_handle, PG_value are static var, PG_On_Time_0 is the handle created with FP_CreateTagIOPoint function on the item under MAX
            if(status = FP_Write (FP_handle, PG_OnTime_0_handle, PG_value, BUFFER_SIZE))
                // Don't report errors because open current loop occurs when nothing is connected.
                if (status == 0x8181)
                    Error(status);
        // Same thing for OffTime
        return 0;
    Ok, now, some questions...
    I don't understand why I need to open handle for each item (OnTime_0, OffTime_0,....) Because I send a value array, it should be possible to select the channel only with the memcpy operation, isn't it? If yes, how to send both OnTime and OffTime value???
    The best would be to get a full sample project, but I didn't find anything on the net. Is there somebody that worked with this hardware able to explain to me how to use them as simple as possible?
    Thanks a lot, and sorry for mistakes, I'm french!

    Hi,
    Here is a link that may help you:
    http://digital.ni.com/manuals.nsf/websearch/E912B2A8B772349686256D3400764B3C
    ClémentG

  • RC Servo control using FP-PWM-520?

    I was wondering if anyone has any experience using Labview (7.0) to control a Fieldpoint FP-PWM-520 module to drive small RC aircraft servos? I am a chemist and I am very inexperienced in advanced Labview programming but I am trying to make good use of the equipment I have available. I want to use the servos to automate a remote radiochemical synthesis ( as a syringe driver)  I have read that I may need a pulse width of up to 2 ms to drive this servo. This may kill the project right away since the output of the FP-PWM-520 seems to only go up to 1ms. Is that so? Anyway I would also very much appreciate any example code with LV 7.0 that may show this type of control. I apologize for my lack of knowledge in coding. I hope I can sort of reverse engineer someone elses code and learn a few things in the process. Thanks very much for any and all help!
                                                                                                                   Steve Toorongian

    We tried to use a cFP PWM module to drive RC servos and it almost worked.  My recollection
    is that we could move the servo as required but the turn on and turn off issues killed the idea
    for our application.  There is no way to control when in the PWM cycle the module turns off
    it's output, therefore the final position of the servo (after you turn off the pwm output) could
    be anywhere.  Subsequently, turning on the pwm would cause it to jump from wherever it
    stopped after turn off to the new position.
    Our solution was to develop a small microcontroller based pwm driver.  This gives us complete
    control over the pwm output as well as a bunch of remote I/O points.  We multiplex up to
    64 of these devices onto a serial port on the fp controller.
    If the turn on and turn off issues aren't a problem I can dig out some of our testing .vis.  They
    are not finished applications, just 'move the servo' kind of things.
    The microcontroller driver was developed under contract so I can't offer any of that stuff
    without permission.  Let me know if that would be of interest.
    Matt

  • PWM-520 low voltage problems

    Hi all.  I am having a problem with an FP-PWM-520 module and I'm hoping that someone can help.
    I have a Fieldpoint system with two FP-PWM-520 modules in positions @7 and @8.  The two modules are powered by a dedicated 24V supply.  One module works properly but the second module does not output enough voltage to run our equipment (~4-6V per channel at 100% instead of ~24V).
    I measured and got 23.96VDC across V and C.  I tried swapping the modules to see if it was a problem with the terminals but the problem moved with the module.
    Is there a configuration setting that i missed or is the module toast?
    Thanks,
    Dave

    Hi Janell.  Thanks for the reply.  Here are the clarifications you are looking for.
    1. The power supply is connected to the V and C terminals at postion @7 in the Fieldpoint train.  The V and C terminals at position @7 are then jumpered to the V and C terminals at position @8.  As originally connected, the two PWM modules share the same power supply.  This power supply is used exclusively for the two PWM modules.
    When I say that I swapped modules it means that I took the two modules and switched their position in the train (ie: the module that was at position @7 was moved to position @8 and the reverse was done with the other module).  When I swapped the modules, the low voltage outputs followed the module that I suspect has a problem.
    2. I did try isolating the supply to each module.  The result was that one module worked properly and the other still put out the low voltages.
    3. I will try this in the morning.  Is it possible that the PWM modules are interfering with each other?
    Thanks,
    Dave

  • FP-PWM-520 Resetting to 0% pulse width

    I am trying to use an FP-PWM-520 module to set a voltage output from a PV panel.  I am having an issue trying to reset the module to 0% pulse width.  I am taking a measurement, using an FP-AI-110 module on the same FP-2000 logger, every 1 second.  The VI I have written takes some number of readings, currently set to 10, and then resets the PWM module to 0% pulse width to open the PV module and take a new reading.  The VI then recalculates a new pulse width, sends it to the PWM and I resume taking measurements. 
    Am I wrong in assuming that I can reset, then set the PWM block 2 times in a matter of seconds?  Do I need to wait a specific amount of time before I send the reset and new pulse width? 
    Thanks for your help.
    Message Edited by upchuckjunk on 01-15-2008 05:25 PM

    I have been using Fieldpoint successfully for data acquisition for 3-4 years now.  I am new to the PWM blocks.  The code I am running resets the FP-PWM block, writing an array containing  eight "0" to the block, then waits for 1 second, reads the FP-AI block.  I can post code, but will have to strip out quite a bit from the state machine before I post it.  As I stated above, the PWM does not always reset.  It seems to reset most of the time, but every 3-4 cycles, it fails to reset the PWM to 0%.  I know this because my voltages never reach the maximum values they should. 
    To reset the blocks, what exactly do I need to do?  Do I need to wait a specific time?  Do I need to write some specific value to the block?  If I get answers to these questions, I know I can figure out what is going on with my code. 

  • Help: Wrong Pulse Width By cFP-PWM-520.

    Hallo People:
    I want  to know, how can I find an Irrtum.
    I have ein NI cFP-PWM-520, Pulse Width Modulation Output Module, wenn I put es in my teststand under a bank, wo the another FieldPoint Modules lay, the inpuls width change itself automatic, examples, I figure es in 1000 mS cycle,  50% High Level, after Max. 30 second,  on oscillograph the cycle will  2000 mS, the High Level changed too, but by MAX (Measurement & Automation) is es in range,  wenn I test es only without another modules, es sei ok too.
    Can somebody tell me, how can i just find the right reason, why?
    thanks

    Ich habe eine Messstation, die meisten Aufgabe sind von Fieldpoint erledigt. Das FieldPoint-System besteht aus cFP-2010, cFP-CB 1, cFP-PWM 520, noch cFP AI 102, die alle sind auf  cFP-BP 4 angesteckt.
    Vor realem Test die alle werden geprüft, in Ordung. Natürlich nicht ziemlich genau wie im realen Test. Aber es kommt ständig Fehler von den PWM Module, die Signal nicht stabil, die High und Low Pegel schwangkt. Zum Beispiel, ich habe am Anfang bei MAX die Messungsperiod auf 1000 mS gestellt, nach ein paar Sekunden, von Oszilloskop wurde die Messperiod auf 2000 mS feststellt, die Messperiod steht in MAX unverändert.
    Aber es scheint momantan nicht Problem mehr, die alle PWM Module müssen zurück schicken um Firmware zu update, aber will ich trotzdem wissen, was passiert, oder nach Vermutung welche Ursache kann es sein.
    Ich freue mich sehr, um eure Antwort bekommen.

  • Pulse output blackfin

    I want to run a stepper motor from the general IO on the 537 EZ kit and i need functions for finite and infinite pulse train.
    Is there anyone who might help me a little bit on the way? embedded/Blackfin is new to me and i havent even found the general IO pins on the board.
    regards
    Fredrik

    Hi LabRat,
    For a beginner wanting to learn about timing and how to interface it with external signals, I would point you to the shipping examples that come with the LabVIEW Embedded Module for Blackfin.  (Help » Find Examples » Toolkits and Modules » Blackfin » Device Drivers)
    At first glance, I would direct you to the examples titled RTC OnceAlarm.lvproj, RTC Periodic.lvproj, and TimerWithCallback.lvproj.  These examples illustrate how to toggle pins and use timers.
    I hope this helps,
    Kevin S.
    Applications Engineer
    National Instruments

  • Elemental I/O with ADSP-BF527

    Good morning,
    I am using the LabVIEW Embedded module for blackfin processors, and I want to use the Elemental I/O for that target. The problem encountered is that this target does not support the Elemental I/O. So how can I use the pins of that target (PWM, analog and digital pins).
    Thank you.
    Solved!
    Go to Solution.

    Hey,
    Yeah unfortunately your device does not support elemental I/O according to How Do I Access All Elemental I/O on my Blackfin Microprocessor. Here are two other ways to "communicate" with your device: Blackfin Discussion Forum using Inline C Node and LabVIEW Help for Blackfin Module. These are two ways that you can get and send data to your device. There is also this page that has VIs specific to your device.
    Regards,
    David
    National Instruments
    Applications Engineer

  • How can I generate a component array using JBuilder?

    Now I'm using JBuilder to design my program's GUI. I wanted a JTextField array like this:nums[0]~nums[2].So I draged three JTextFields into the container at JBuilder's design view. But when I set the names of them as nums[x](x=0,1,2). I got a Error Message. It told me that I used a illegal name. How should I do, please?
    thank you a million!

    The DIO ports on a MIO will not satisfy your needs (unless you move to LV RT).
    They do not support buffered outputs.
    Your update rate (how often you can set the port and clear it) is going to be limited by how fast (a-hem slow) windows will let you iterate,
    and,
    be non-determinstic.
    You could use,
    1) LV RT with the existing board, or
    2) FieldPoint PWM module, or
    3) Arbitrary waveform generators, or
    4) HS DIO board, or
    5) use the analog output of your baord where you que-up a 0 -5V waveform of the proper shape (i.e. make sure that the duty cylce fraction of the update values are high, the rest low).
    This is just to get a PWM signal out.
    Now there is another issue. Determinism. How often do you plan on reading your inputs and making a change to you
    r PWM? If you plan on doing more often that 10/second, write your code to handle windows going out to la-la land when you expect it to be working.
    Can you tell I like LV-RT.
    I hope my ramblings have helped.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for