Jump to content
  • 0

controlling the oled of nexys video


sosso

Question

17 answers to this question

Recommended Posts

Hi @sosso,

If you are trying to write to the leds then you should be using channel 1  XGpio_DiscreteWrite(&gpio, 1, led);    //write data to the LEDs.

I typically use the xparameters definitions for initialization. You must include the xparameters.h library.

#include "xparameters.h"

 XGpio_Initialize(&gpio, XPAR_AXI_GPIO_0_DEVICE_ID);    //initialize input XGpio variable

and this is setting the direction.

XGpio_SetDataDirection(&gpio, 1, 0x0);

Also i do not believe you with se any activity in vivado simulation since sdk handles how the leds are being used.

thank you,

Jon 

 

    

 

Link to comment
Share on other sites

Hi, @jpeyron

      As I told you, I'm new in this domain, so I have to start with just blinking LEDs using and  handling SDK, since I don't have a Nexys Video board, I have to find a way if any, to make the simulation. If you know more experienced people on this, Could you please ask them whether or not we can make this simulation, just to make sure the simulation exists, because I feel i'm looking for something which doesn't exist   !!!!!

Link to comment
Share on other sites

Hi @sosso,

I have not attempted and right now I do not have the time to incorporate the process described in the PDF you attached into the LED project I attached. Hopefully one of the more experienced community members with have some input for you. I would also suggest to reach out to Xilinx support. Is your end goal to simulate the Pmod OLED in this way? Have you tried to make a Pmod OLED project following the instructions on the previous post above?

thank you,

Jon

Link to comment
Share on other sites

Hi jpeyron, 

     I tried a program, but the LED signals were not displayed, 

       I couldn't add the LED signals to the screenshots I attached above, is there an idea how to add them?

When you look to Untitled 1 window above, you will see only 7 ports which can be displayed, how can I add the LED ports?

Link to comment
Share on other sites

Hi @sosso,

What signals are you referring to? If you are referring to the led project attached above then you would have alter the project and follow the pdf you attached to simulate the led signals. You can also see the leds in action if you run the project. 

Thank you,

Jon

Link to comment
Share on other sites

Hi @sosso,

I was trying to say that i did not believe you will see any activity in vivado simulation since sdk handles how the leds are being used. The pdf you attached shows how you can incorporate your sdk application in your simulation. I made a completed project for the nexys video that just moves the leds as a binary counter in vivado 2017.4 here that should be helpful.

thank you,

Jon

Link to comment
Share on other sites

Hello, attached are screenshots of what I'm trying to do, I struggle at inserting the leds to display their values, In the Untitled1 window, there is 7 spots to be displayed, but there is no trace of the LEDs, how can I proceed?            

                                             thank you,  

 

image.png

image.png

Link to comment
Share on other sites

Hi @sosso,

If you look at the block design in the tutorial you can see the axi_gpio_o and axi_gpio_1. For axi_gpio_0 the buttons are connected in the first spot on the IP and the switches are connected on the second part of the IP so in this case the buttons would be on channel 1 and the switches would be on channel 2. The Leds are connected to axi_gpio_1 by themselves so they are on channel 1. If you need more information for interrupts i would look at AXI Interrupt Controller (INTC) v4.1 LogiCORE IP Product Guide. This xilinx forum thread might help. The Pmod OLED does not use an interrupt. Feel free to skip the gpio and interrupt sections of the Getting Started with Digilent Pmod IPs.  Here is an older tutorial (Nexys Video - Getting Started with Microblaze) that will be helpful for getting the Pmod OLED going on the Nexys Vivdeo.

On Step 2 you will also want to add the vivado library to the project. Click on projects->ip->IP repository and select the path to the vivado library you should have downloaded from here.

 On step 3.3 do not check the interrupt box(Pmod OLED does not use interrupts).

On step 5 also add the Pmod OLED IP core. To do this select the boards tab, right click on the Pmod Port you want to use and select the Pmod OLED IP.  

You should follow the rest of the tutorial dealing with vivado. Once SDK is open you will make a new application, name it and select the empty template on the next page. Then copy the main.c file from the vivado-library\ip\Pmods\PmodOLED_v1_0\drivers\PmodOLED_v1_0\examples into the new applications src folder. Then program the fpga and run the application by right clicking the application and selecting run as->launch on hardware(system debugger).

thank you,

Jon

 

XGPIO_channels.jpg

Link to comment
Share on other sites

Hi thank you for the answers,

       For the first and second channel, i mean which one  is for the LEDs, and which one is for the Buttons.

       For the files I am referring to, when i want an interrupt to occur, when i read the interrupt enable function, i notice that they enable a bit, but how can I see the register enable bits? I mean like a microcontroller datasheet.

 

       

Link to comment
Share on other sites

Hi @sosso,

Here is an older tutorial that for the zybo that will show how to handle channels as well as setting there direction. You can look at the block design in the tutorial to see what gpio 0 and 1 are. The xparameters.h has the address information.

 XGpio_Initialize(&input, XPAR_AXI_GPIO_0_DEVICE_ID);    //initialize input XGpio variable
   XGpio_Initialize(&output, XPAR_AXI_GPIO_1_DEVICE_ID);    //initialize output XGpio variable
 
   XGpio_SetDataDirection(&input, 1, 0xF);            //set first channel tristate buffer to input
   XGpio_SetDataDirection(&input, 2, 0xF);            //set second channel tristate buffer to input
 
   XGpio_SetDataDirection(&output, 1, 0x0);        //set first channel tristate buffer to output

What file or files are you referring to for your questions? The Pmod OLED IP uses the axi quad spi ip core. The AXI Quad SPI v3.2 LogiCORE IP Product Guide should help with questions about this part of the pmod oled ip core.


thank you,

Jon

 

 

 

 

Link to comment
Share on other sites

hello , 

             What I mean by gpio_1 and gpio_2 is that there is Xgpio functions whose arguments require what is called "the channel", i don't know wheter its 0 and 1,or 1 and 2?

        XUL_SR_TX_FIFO_EMPTY this is a define and it's given the numbre 0X04, but why this number ?it is said that after the reset the FIFO will have this number if the reset was succesful, but what kind of document shall I read to find out more about that

        how can I know about the values of channel offset, and the base adress? 

      typedef __UINTPTR_TYPE__ __uintptr_t;
  here for example, __UINTPTR_TYPE__ is not a  type in C, so what is it?

how can i access the datasheet of FIFO, to see enable/disable bits for interrupt control ?

The last one, there is some instructions that enable\disable bit on control register wether it's for interruptions or anything else, so how do i know which bit to set, is there any datasheet like pic microcontrollers datasheets?

Thank you so much in advance

 

       

Link to comment
Share on other sites

Hi @sosso,

There is not a good way to verify your oled project will work. You could try simulation but you would need to fully understand the signals that the oled needs. This process would be very difficult. We have verified multiple time that the oled IP works with the onboard oled. Here is a forum thread dealing with the onboard oled and how to use it with a microblaze/oled ip core project. the thread also includes a completed working project in vivado 2016.4. Could you be more specific about the gpio_1 and gpio_2. Could you attach a screen shot of you block design? I would guess that these are different gpio ip cores in your block design?

thank you,

Jon 

Link to comment
Share on other sites

thanks for the answer,

           please, i have a project to do using nexys video, i don't have one, the university can't let me access the nexys video board all the time i want, so how can i know wether or not the program -- inserted using the uart -- will work, without using the board, because i'm new learner at FPGAs.

    My second question would be, what is gpio_1 and gpio_2, the difference and what do they represent?

                                                   thank you ,

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...