I Need Uart

Before I go any further and start wiring up my code to use the lwIP on the embedded MicroBlaze, I will need some sort of better method of debugging.  All code that I have implemented that uses a MicroBlaze processor via the Xilinx tools makes use of the UART to send and receive standard input and output.

Right now I have been getting around this by writing values to the GPIO and to the host via a FIFO, but I do not want to have to recompile all of my code and move where I have wired the FIFO to for each test.  This would result in very long compile-build-run-test cycles.  Or to be more accurate, synthesize-build-… okay, you get the point.

Anyway, I have just finished implementing a UART project that is able to receive the contents of a printf statement from the MicroBlaze in LabVIEW.  I am using even parity, even though they say it is no required, 1 stop bit and 8 data bits, all at the 128,000 baud rate.

I pushed my code to github, and am in the process of adding some printf statements to the main – large project – also known as “FPGANic”.

So for now, see:

https://github.com/JohnStratoudakis/LabVIEW_Fpga/tree/master/06_MicroBlaze/05_UART

and stay tuned as I will be cleaning up this code and coming up with a better way of sending and receiving data inside the MicroBlaze.  Perhaps I will make the entire thing “console” based, i.e. I send a command to the MicroBlaze via the UART, and the MicroBlaze will then create a UDP, send data, close a session, whatever I want!

Leave a Reply