Demo I - Blinking LED

Document Sample
Demo I - Blinking LED Powered By Docstoc
					Demo I - Blinking LED
The purpose of this demo is to show how fast you can build the simplest application in LabVIEW and run it on the Blackfin processor. Required connections for this demo:

1. Launch LabVIEW 8.20. 2. Launch the Blackfin Project Wizard by choosing Blackfin Project from the dropdown menu and clicking Go.

3. Choose Next to create a new LabVIEW project with a new VI. 4. Choose Analog Devices ADSP-BF537 from the dropdown menu. Click Next.

5. Check the Create Build Specification box and click Finish.

6. Save the project to the exercises folder as Blink.lvproj. 7. Save the VI as 8. The project will be created with a build specification and an empty VI. Move to the block diagram of the new VI. 9. Build the following VI:

a. Place a timed loop from the Programming>>Structures>>Timed Loop palette. b. Place a BF Toggle LED from the Blackfin>>EZKIT>>LED palette. Be sure to select the BF537 Toggle LED from the polymorphic VI selector.

10. Switch to the LabVIEW Project Window. Right-click the build specification called VDK Application and choose Properties. This properties window is where you configure the type of C code that will be generated by LabVIEW and compiled for the Blackfin. 11. Switch to the Processor tab and change the Processor Variant to match the processor variant is on your EZ-KIT. To determine your variant, look at the actual Blackfin chip on the board. There should be a number in the format 1.0.X. If your processor says 1.0.2, then you have a 0.2 silicon revision.

12. Choose File>>Save All. 13. Click the Run button on the VI. LabVIEW will then generate C Code, pass this generated code through the Analog Devices VisualDSP++ optimizing crosscompiler, download the application and run it. You can also manually invoke all of these operations by right-clicking the build specification and choosing Build, Deploy, and Run. 14. Right-click the Analog Devices ADSP BF-537 target in the project tree and choose Processor Status. This will launch the processor status window. Here, you can display the running application.

15. Switch back to the block diagram of the VI. Copy and paste the loop twice so that there are 3 total loops. 16. Change the constant value in each loop to be 2 and 3 so that each loop is responsible for blinking a different LED. 17. Double click two of the loops and change the period from 1000 to 500 and 100. Call out that you can select MHz clock for faster loop rates and that you can independently select the priority of each loop. These thread priorities map directly to the VDK operating system thread priorities. 18. Click the Run button again. The application will automatically build, download, and run so that the three LEDs should be blinking at independent rates. This is intended to demonstrate the ease with which you can accomplish parallel multithreaded code in LabVIEW.

Shared By: