Microblaze GPIO (basic) question

Dear All,

For my application, I'm using a Spartan-3 Starter Kit Board, with a microblaze microcontroller (uart, timer, bram, etc).

I need the microcontroller to control a few digital lines connected to somme discrete logic on the outside of the board. As far as I can understand, and since those lines don't need to be fast, the easiest way is to hook them on the OPB via a GPIO module. My question is how to do that.

I think I wave to create a custom OPB peripheral using the XPS wizard, and then edit the created VHD files, as it is donne for a "regular" IP, but in this case connecting the registers directly to signals, noting more, but i'm not sure. Is this correct? Can anyone direct me to a tutorial.

Tank you very much


Reply to
Loading thread data ...

Using the EDK you can just add a GPIO module to your project and connect it how you want to. the module is parameterized so you can specify how many lines you need. After that, you have to use the Xilinx provided drivers to "talk" to the core via software. I assume you know C or C++. It is not my strong suit by any means. Someone else in my group does that part of the project! But I know from looking that there are functions you call to set the direction of the lines and to set bits high or low (in essence, making that GPIO line high or low). You access the core using the address generated by the EDK and software pointers (at least that is how we do it). Basically, you will read and write to the GPIO address to control the actual lines of the device, which will be added to your external port list and connected to your outside logic.

I am sure that there is documentation in the EDK installation directory that will go in to this in detail. Since you mentioned you are using the UART, Timer, etc. I assume that you know the nitty gritty of the programming side.

Hope that helps some!

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.