Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Spartan 3AN Dev board UART

Status
Not open for further replies.

wuchy143

Member
Hello,

I'm trying to figure out how to get a UART working on the SPARTAN 3AN development board. Ultimately I'd like to use hyperterminal to send a character to the fpga and have the fpga echo it back to hyperterminal so I see it again on my screen. Looking in Starter Kit User Guide there isn't any information on UART stuff. I also looked online and didn't find too much there either.

Does anyone know the steps I would need to take to get this thing up and running? I've already been able to program the FPGA and have it do very simple things like turn on an LED, blink an LED, turn on an LED when I throw a switch...I know...very simple stuff :)

If I'm over my head let me know what else I need to look at before I head down this road. I don't want to waste anyones time and really want to know this stuff.

Regards,

-mike
 
Maybe if instead of explaining this specific example someone could explain to me in general terms how UARTs are usually used in an FPGA. I have read online and I see people talking about Microblaze and using a "core"????
 
It's like synthesizing a microcontroller inside the FPGA and then using it like a normal MCU. Microblaze requires a paid license to use though. Picoblaze is a 1st party 8-bit processor and is open source.

Echoing isn't too bad...you have to get into a hardware mindset rather than software mindset. I would think, that if the FPGA ran significantly faster than UART fast enough (which it probably will), you simply configure it to pass the state of the input pin to an output pin (and of course connect those pins appropriately to the TX and RX of a RS-232 driver. THe same as if you used just a piece of wire to loop the signal from the TX back to the RX. I don't think any UART IP core is really needed for your example.
 
Last edited:
Wow thanks!! Oddly enough I assigned the rs232 rx = rs232tx in my .v file and when I connect up to hyperterminal it echoes characters like you said it would.

Now I"m a little confused. I did not write any code for a UART but there has to be one in there somewhere because it's rx and tx'ing RS232 data. What am I missing?
 
Wow thanks!! Oddly enough I assigned the rs232 rx = rs232tx in my .v file and when I connect up to hyperterminal it echoes characters like you said it would.

Now I"m a little confused. I did not write any code for a UART but there has to be one in there somewhere because it's rx and tx'ing RS232 data. What am I missing?

You are correct in that there is no code for a UART mechanics in there. It's just that if echoing is all you want, the truthtable for a UART simplifies down to a piece of wire (which is basically what you just made, except it's a wire that only responds to digital signals due to voltage thresholding. You basically made a digital repeater). THat circuit will simply echo any digital signal that meets the voltage thresholds. Not just UART.

If you actually wanted a UART in there, you'd have to put a UART module in and sort of link it's data-out pins to it's data in-pin. So that the UART would actually extract the UART data from the signal before placing it back on the bus to be spent (and some intermediate registers may be needed).
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top