2x1=10

because numbers are people, too
Persönliches
Fotografie
Programmierung
    • Frequency-variable PWM generator in Simulink

      I recent­ly came across the prob­lem that I need­ed a PWM (i.e. pulse-width mod­u­lat­ed rec­tan­gu­lar sig­nal) gen­er­a­tor block in Simulink with vari­able fre­quen­cy and duty cycle inputs. I couldn’t find one in the library, so I wrote one.

      Frequency-Variable PWM in Simulink

      The rather sim­ple imple­men­ta­tion basi­cal­ly con­sists of three parts: An inte­gra­tor block with an exter­nal reset input is used to cre­ate a saw­tooth sig­nal. The saw­tooth is then com­pared to a thresh­old val­ue giv­en by means of the duty cycle to cre­ate a rec­tan­gu­lar sig­nal. Last­ly that sig­nal is scaled to a stan­dard out­put range of 0..1.

      Frequency-Variable PWM in Simulink

      Weit­er­lesen »

      April 10th, 2014 GMT +1 von
      Markus
      2014-04-10T02:57:57+01:00 2014-04-10T03:09:47+01:00 · 13 Kommentare
      Matlab Simulink PWM
      MATLAB
      • ZYBO board MIOs: Driving the LD4 LED using the BTN4 button

        Just a quick and dirty non-tuto­r­i­al solu­tion on how to use the mul­ti­plexed I/Os (MIO/GPIO) to wire the BTN4 but­ton on the ZYBO board (MIO50, the right one) to the LD4 LED (MIO7). Both are con­nect­ed direct­ly to the pro­cess­ing sys­tem and can­not be con­trolled from the fab­ric.

        #include "platform.h"
        
        #include "xparameters.h"
        #include "xgpiops.h"
        #include "xstatus.h"
        
        #define GPIO_DEVICE_ID  XPAR_XGPIOPS_0_DEVICE_ID
        #define OUTPUT_PIN		7	/* MIO7,  pin connected to LED */
        #define INPUT_PIN		50	/* MIO50, pin connected to button */
        
        int main()
        {
        	int Status;
        	XGpioPs Gpio;
        	XGpioPs_Config *ConfigPtr;
        
                // Initialize the system
        	init_platform();
        
        	// initialize the GPIO driver.
        	ConfigPtr = XGpioPs_LookupConfig(GPIO_DEVICE_ID);
        	Status = XGpioPs_CfgInitialize(&Gpio, ConfigPtr, ConfigPtr->BaseAddr);
        	if (Status != XST_SUCCESS) {
        		return XST_FAILURE;
        	}
        
        	// configure the LED pin as output
        	// status checks skipped for readability
        	XGpioPs_SetDirectionPin(&Gpio, OUTPUT_PIN, 1);
        	XGpioPs_SetOutputEnablePin(&Gpio, OUTPUT_PIN, 1);
        
        	// configure the button pin as input
        	XGpioPs_SetDirectionPin(&Gpio, INPUT_PIN, 0);
        
        	// wire the button to the LED (inverted)
        	while(1)
        	{
        		u32 data = XGpioPs_ReadPin(&Gpio, INPUT_PIN);
        		XGpioPs_WritePin(&Gpio, OUTPUT_PIN, !data);
        	}
        
            return 0;
        }
        

        Note that when you open the system.mss file in SDK, you’ll find the ps7_gpio_0 entry under the Periph­er­al Dri­vers sec­tion. Click “Exam­ple” there to find more infor­ma­tion.

        März 6th, 2014 GMT +1 von
        Markus
        2014-03-6T08:23:11+01:00 2014-03-6T16:28:25+01:00 · 0 Kommentare
        ZYBO Zynq
        FPGA Tutorial
        • ZYBO with PlanAhead Tutorial

          Because I des­per­ate­ly searched for some­thing like that and found noth­ing, I just wrote a tuto­r­i­al myself on how to start with the Xil­inx PlanA­head work­flow in ISE 14.7 when using the Dig­i­lent ZYBO board. Though I made this with the ZYBO in mind, the gen­er­al work­flow also applies to Zed­Board users and prob­a­bly gen­er­al Zynq boards as well.

          It can be found at http://sunsided.github.io/zybo-tutorial/.

          Basi­cal­ly the tuto­r­i­al explains in about 120 pic­tures how to imple­ment

          LEDs <= Switches xor Buttons;
          

          using the Xil­inx tools. You can also find that nice pic­ture of my fin­gers there, too.

          ZYBO with my fingers

          If that ain’t some­thing!

          Edit:
          Johann wrote a tuto­r­i­al on using the ZYBO with Viva­do on Lin­ux. It can be found here.

          März 5th, 2014 GMT +1 von
          Markus
          2014-03-5T05:27:44+01:00 2014-04-16T02:30:54+01:00 · 6 Kommentare
          git Xilinx ZYBO Zynq Xilinx SDK ZedBoard
          FPGA Tutorial
          • Xilinx SDK: make crashing with Interrupt/Exception

            After export­ing the imple­ment­ed and gen­er­at­ed project from PlanA­head to Xil­inx SDK and hav­ing gen­er­at­ed a Board Sup­port Pack­age, the build stops with an error due to make crash­ing with a rather dubi­ous mes­sage along the lines of

            make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)
            

            It turned out that this is due to an exist­ing instal­la­tion of Git, when the Git direc­to­ry is added to the path. Specif­i­cal­ly, sh.exe is the prob­lem here and sim­ply remov­ing that from (or renam­ing it in) the Git instal­la­tion direc­to­ry solves the prob­lem.

            März 4th, 2014 GMT +1 von
            Markus
            2014-03-4T00:01:57+01:00 2014-03-5T05:45:44+01:00 · 1 Kommentar
            git Xilinx ZYBO Xilinx SDK Bug
            FPGA
            • Digilent ZYBO (Zynq-7010)

              The ZYBO is an eval­u­a­tion board for the Xil­inx Zynq-7010 All-Pro­gram­ma­ble SoC made by Dig­i­lent. I got mine from Trenz Elec­tron­ic at a reduced price for aca­d­e­m­ic use.

              I chose it over the Zed­Board (which I already have some expe­ri­ence with) because of the reduced size and since I don’t need the high-den­si­ty I/O jack. It turns out though that the board is very small, yet quite heavy.

              ZYBO package front

              ZYBO package back

              ZYBO board

              One thing to keep in mind though is that despite the rather large num­ber of PMOD con­nec­tors, not all of them might be actu­al­ly use­ful for a giv­en task. The one on the left is con­nect­ed to the Cor­tex proces­sor, the right one is mixed analog/digital, and the three low­er right ones are dif­fer­en­tial, leav­ing exact­ly the one on the low­er left as a log­ic-ded­i­cat­ed PMOD for the FPGA (i.e. a sin­gle end­ed one that is con­nect­ed direct­ly to the FPGA, apart from the XADC one, of course).

              I orig­i­nal­ly intend­ed the board to be used to exper­i­ment with the OV7670 cam­era, but that might turn out to be a prob­lem because of the PMODs. So: Caveat emp­tor.

              I had some trou­ble get­ting Dig­i­lent Adept and/or iMPACT to rec­og­nize my board (despite hav­ing installed the nec­es­sary plu­g­ins), because I had down­loaded the wrong ver­sion of Dig­i­lent Adept — sad­ly the search box on the Dig­i­lent web­site yield­ed Adept 2.3 as the best hit, which is out­dat­ed. After down­load­ing the recent ver­sion from here, every­thing worked as expect­ed and the device was cor­rect­ly iden­ti­fied by iMPACT.

              iMPACT Digilent ZYBO

              iMPACT Digilent ZYBO: Boundary Scan

              Unfor­tu­nate­ly, while Digilent’s own soft­ware, Adept, was now able to talk to the board too, it was still unable to rec­og­nize the chip.

              ZYBO with Digilent Adept 2

              Edit: After ask­ing Dig­i­lent sup­port I received a mail say­ing that the Zybo can’t be pro­grammed with Adept, so that’s expect­ed behav­ior.

              Edit: I wrote up a quick-start tuto­r­i­al for the ZYBO. You can read more about it here.

              März 3rd, 2014 GMT +1 von
              Markus
              2014-03-3T18:13:12+01:00 2014-03-16T17:03:26+01:00 · 2 Kommentare
              Xilinx ZYBO Zynq ZedBoard FPGA
              FPGA
    1. « newer
    2. 1
    3. 2
    4. 3
    5. 4
    6. 5
    7. 6
    8. 7
    9. 8
    10. 9
    11. older »
    • Kategorien

      • .NET
        • ASP.NET
        • Core
        • DNX
      • Allgemein
      • Android
      • Data Science
      • Embedded
      • FPGA
      • Humor
      • Image Processing
      • Kalman Filter
      • Machine Learning
        • Caffe
        • Hidden Markov Models
        • ML Summarized
        • Neural Networks
        • TensorFlow
      • Mapping
      • MATLAB
      • Robotik
      • Rust
      • Signal Processing
      • Tutorial
      • Version Control
    • Neueste Beiträge

      • Summarized: The E-Dimension — Why Machine Learning Doesn’t Work Well for Some Problems?
      • Use your conda environment in Jupyter Notebooks
      • Building OpenCV for Anaconda Python 3
      • Using TensorFlow’s Supervisor with TensorBoard summary groups
      • Getting an image into and out of TensorFlow
    • Kategorien

      .NET Allgemein Android ASP.NET Caffe Core Data Science DNX Embedded FPGA Hidden Markov Models Humor Image Processing Kalman Filter Machine Learning Mapping MATLAB ML Summarized Neural Networks Robotik Rust Signal Processing TensorFlow Tutorial Version Control
    • Tags

      .NET Accelerometer Anaconda Bitmap Bug Canvas CLR docker FPGA FRDM-KL25Z FRDM-KL26Z Freescale git Gyroscope Integration Drift Intent J-Link Linear Programming Linux Magnetometer Matlab Mono Naismith OpenCV Open Intents OpenSDA Optimization Pipistrello Player/Stage PWM Python Sensor Fusion Simulink Spartan 6 svn tensorflow Tilt Compensation TRIAD ubuntu Windows Xilinx Xilinx SDK ZedBoard ZYBO Zynq
    • Letzte Kommetare

      • Lecke Mio bei Frequency-variable PWM generator in Simulink
      • Vaibhav bei Use your conda environment in Jupyter Notebooks
      • newbee bei Frequency-variable PWM generator in Simulink
      • Markus bei Using TensorFlow’s Supervisor with TensorBoard summary groups
      • Toke bei Using TensorFlow’s Supervisor with TensorBoard summary groups
    • Blog durchsuchen

    • März 2021
      M D M D F S S
      « Mrz    
      1234567
      891011121314
      15161718192021
      22232425262728
      293031  
    • Self

      • Find me on GitHub
      • Google+
      • Me on Stack­Ex­change
      • Ye olde blog
    • Meta

      • Anmelden
      • Beitrags-Feed (RSS)
      • Kommentare als RSS
      • WordPress.org
    (Generiert in 0,415 Sekunden)

    Zurück nach oben.