whitewolf

Adding an UART to AVR8

Recommended Posts

Hello, I'm wondering if anyone made another uart in avr8 papilio 250k to be used with external peripherals. I tried to edit the vhd files. But its difficult since I'm new to VHDL. I have some experience with Verilog. since Can you give me a VHDL or Verilog example.

Thank you.

Share this post


Link to post
Share on other sites

Hello WhiteWolf,

I've run out of time for the day and have to head out the door, but I just wanted to reply before I forget...

Here is a tutorial about using the Xilinx high speed uart:

http://www.papilio.cc/index.php?n=Papilio.HighSpeedUART

It should be possible to connect that design to the GPIO pins of the AVR8.

Another approach would be to instantiate a second copy of the AVR8's UART in the user memory space. This tutorial would help with getting started with that approach:

http://www.papilio.cc/index.php?n=Papilio.CustomAVR8UserCore

I'm under the gun right now to get the first RetroCade Synth release completed, once that is done in a couple days, I can help put together an example for you.

Jack.

Share this post


Link to post
Share on other sites

I watched the video, where should i instantiate it ? top level ?

uart_Inst:component uart port map(
-- AVR Control
ireset => core_ireset,
cp2 => core_cp2,
adr => core_adr,
dbus_in => core_dbusout,
dbus_out => uart_dbusout,
iore => core_iore,
iowe => core_iowe,
out_en => uart_out_en,
-- UART
rxd => rxd,
rx_en => open,
txd => txd,
tx_en => open,
-- IRQ
txcirq => core_irqlines(19),
txc_irqack => ind_irq_ack(19),
udreirq => core_irqlines(18),
rxcirq => core_irqlines(17)
);


-- UART connection to the external multiplexer
io_port_out(2) <= uart_dbusout;
io_port_out_en(2) <= uart_out_en;

making another copy of this uart "uart2" will work ?

Or should I write another uart in papilio_core_template?

Thank you.

Share this post


Link to post
Share on other sites

Hello whitewolf,

I haven't forgotten about this, I tried to put together an example this weekend. But I upgraded to Windows 8 and now I'm having all kinds of troubles with the Xilinx tools. So I have to figure out what is going on before I can put the example together for you.

You are heading in the right direction though, the only other thing is that you need to change the register address that the second UART is connected to. So you have to make a copy of the uart.vhdl file and put the register address in the free memory space that the user code examples use.

Jack.

Share this post


Link to post
Share on other sites

let me know if you figure out the windows 8 thing. i am seriously to the point where i am going to make a dedicated xilinx xp or vista VM (vmware does the usb passthru stuff so it should work)

Share this post


Link to post
Share on other sites

Hello whitewolf,

I haven't forgotten about this, I tried to put together an example this weekend. But I upgraded to Windows 8 and now I'm having all kinds of troubles with the Xilinx tools. So I have to figure out what is going on before I can put the example together for you.

You are heading in the right direction though, the only other thing is that you need to change the register address that the second UART is connected to. So you have to make a copy of the uart.vhdl file and put the register address in the free memory space that the user code examples use.

Jack.

I dont understand which register address and where i can find the free memory space that the user code examples use. I will wait for your example.

Thank you.

.

Share this post


Link to post
Share on other sites

let me know if you figure out the windows 8 thing. i am seriously to the point where i am going to make a dedicated xilinx xp or vista VM (vmware does the usb passthru stuff so it should work)

Felix, using the 32-bit version of project navigator seems to clear up my problems under Windows 8.

I dont understand which register address and where i can find the free memory space that the user code examples use. I will wait for your example.

Thank you.

.

Whitewolf,

I've been working on what I'm going to call, "Papilio System on Chip" and made good progress so far this weekend. The goal is to allow you to build up your custom AVR8 using the schematic editor, so you can just drag and drop the peripherals you need and wire them up without touching VHDL or Verilog. I need a couple more days and then I think I should have something for you.

Jack.

Share this post


Link to post
Share on other sites

Hi all,

I am new to the forum, but not to uP's.  I am using a Papilio and trying to add another hardware UART as in the OP.  The VHDL hardware instantiation is not a problem, but where is the Arduino UART code (Serial.xxx) located so I can clone a copy and make Serial2, etc?

Thanks!

Share this post


Link to post
Share on other sites

Hi, even I have the same problem. I want to add additional uarts to my pavilion one fpga running the avr8 soft processor. I basically need one additional UART module to connect it to one of my GPIO pins on the fpga, so please if you do have knowledge about it, do share it with us

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now