cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
19,374 Views
Registered: ‎09-27-2009

Interface RS232

Hi,

I want to interface RS232 between PC and Spartan 3. What should I do?

Thanks for reading.

best regards

0 Kudos
16 Replies
Highlighted
Historian
Historian
19,353 Views
Registered: ‎02-25-2008


daitribk wrote:

Hi,

I want to interface RS232 between PC and Spartan 3. What should I do?

Thanks for reading.

best regards


1) Write some code.

2) ???

3) Profit!

 

----------------------------Yes, I do this for a living.
0 Kudos
Highlighted
Observer
Observer
19,328 Views
Registered: ‎09-27-2009

I have written top module and include picoblze   kcpsm3 but it is not working.
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
19,316 Views
Registered: ‎09-05-2007

Take a look at the reference designs for the Spartan Starter Kits…..

 

http://www.xilinx.com/products/boards/s3estarter/reference_designs.htm 

 

http://www.xilinx.com/products/boards/s3astarter/reference_designs.htm 

 

Look down the ‘Features Used’ column and you will see a number of them list RS232.

 

Regards,

 

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
Highlighted
Adventurer
Adventurer
19,180 Views
Registered: ‎09-16-2009

Im using one of the reference designs for the spartan 3e starter kit.  The one in particular that I'm using is the pluse width monitor reference project.  I would like the program to print not only and ok when when the value is excepted but also print out all of the duty cycle values for the 12 channels.  Some pointers would be greatly appreciated to help give me a point to start.  At this time I'm at a lost do to it only printing static letters and not varriable data.

 

Thank you in advance for your help.

 

Another question,  can you have the LCD print information as well as data sent via RS232 and print on the hyperTerminal screen?

Message Edited by ntropy on 01-27-2010 03:11 PM
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
19,167 Views
Registered: ‎09-05-2007

So take a look at the various reference designs and you will see examples of all the things you want to do.

 

On the Spartan-3E board the ‘PicoBlaze Processor Amplifier and A/D Converter Controller’ design displays data on the LCD and ‘Implementing and Testing Efficient Video Line Stores’ is one of several designs that use the RS232 interface to send and receive variable data.

 

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
Highlighted
Anonymous
Not applicable
17,866 Views

Till now no XILINX FPGA/CPLD does not support RS232 IO standards directly

 

•As per RS232 standard the RS232 transmitter ‘0’ bit state = +5 to +15V and ‘1’ bit state = -5 to -15V. Where as RS232 Receiver capable of ‘0’ bit state = +3 to +25V and ‘1’ bit state = --3 to -25V. sea below table  


• So we should not interface RS232 signals directly to FPGA.  If we do that there is possibility of damaging FPGA

Work around: There are lots of RS232 transceivers  which converts LVTTL, LVCMOS etc to RS 232 standards. User can use those transceivers to communicate with FPGA LVTTL/LVCMOS  

Tags (1)
0 Kudos
Highlighted
Anonymous
Not applicable
17,866 Views

You have to use RS232 converter IC (Like 1488 & 1489 or MAX23X ) externally along with FPGA on your board.

 

Till now no XILINX FPGA/CPLD does not support RS232 IO standards directly

 

•As per RS232 standard the RS232 transmitter ‘0’ bit state = +5 to +15V and ‘1’ bit state = -5 to -15V. Where as RS232 Receiver capable of ‘0’ bit state = +3 to +25V and ‘1’ bit state = --3 to -25V. Sea below table  


• So we should not interface RS232 signals directly to FPGA.  

Work around: There are lots of RS232 transceivers  which converts LVTTL, LVCMOS etc to RS 232 standards. User can use those transceivers to communicate with FPGA LVTTL/LVCMOS  

Tags (1)
0 Kudos
Highlighted
Instructor
Instructor
17,844 Views
Registered: ‎07-21-2009

OK, I call time-out, start over!

 

Original poster want RS-232 interface to Spartan 3 FPGA.  Wants help.  What kind of help?

1.  understanding async serial? ==> learn about UARTs

2.  understanding RS-232? ==> learn RS-232 levels, level converters, connector pinouts, handshaking

3.  how to design (code) async serial interface in FPGA?  ==> learn about UARTs, HDL coding, example designs

4.  how to design PicoBlaze async serial I/F?  ==> learn PicoBlaze

5.  how to design PicoBlaze async serial I/F?  ==> point to example PicoBlaze+UART designs

 

And let me add a shameless plug for one of my favourite topics:  Is the OP interested in RS-232 (specifically), or serial interface (generically), or easy/cheap data transfer and control between PC and FPGA?  Unless you are bound to async serial as a PC interface, or RS-232 interface, the optimal solution in many (most!) cases is neither.  The optimal interface might be USB from the PC (because it's cheap and widely supported) and LVTTL async serial to the FPGA (cheap, simple to code).

 

Which leads you all to this type of solution or onboard equivalent solution (and no, I'm not an investor!).  There are other USB/serial adapters, cables, ICs, etc...  but the FTDI products (in my limited testing) seem to have rock-solid USB driver support for a broad number of platforms (I've tested 32bit windows and 64bit windows, and FTDI was the only set of drivers which 'passed') (survey of web geek sites suggests that FTDI does well on Mac and *nix platforms as well).

 

In sum:

 - what sort of assistance(s) does OP need/want?

 - and why don't you agree with me on using USB<=>serial ? :smileyhappy:

 

- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
Highlighted
Historian
Historian
17,838 Views
Registered: ‎02-25-2008

 


@eteam00 wrote:

OK, I call time-out, start over!


 

 

ZOMBIE THREAD!

 

----------------------------Yes, I do this for a living.
Highlighted
Instructor
Instructor
10,471 Views
Registered: ‎07-21-2009

 


@bassman59 wrote:

ZOMBIE THREAD!


Busted, got sucked into that one....  Thanks for the wakeup.

 

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
Highlighted
Explorer
Explorer
10,304 Views
Registered: ‎08-13-2010

im a beginer in edk,i want to show the status of dip switch by rs232,

in that case i use XStatus XGpio_Initialize (XGpio *InstancePtr, Xuint16 DeviceId) and  XGpio_DiscreteRead (XGpio *InstancePtr, unsigned Channel).

and sotre the return value of function '  XGpio_DiscreteRead' in unsigned 32 bit register,

and then use XStatus XUartLite_Initialize (XUartLite *InstancePtr, Xuint16 DeviceId),

now what function i have to use?

if i use ' XUartLite_Send (XUartLite *InstancePtr, Xuint8 *DataBufferPtr, unsigned int
NumBytes)' then

qstn no1.

what is "Xuint8 *DataBufferPtr",and whats the DataBufferPtr actually ??

qstn no2.

what is "unsigned int NumBytes" ??is it the number of byte that we passed by uarlite??

 

 

 

 

Tags (1)
0 Kudos
Highlighted
Instructor
Instructor
10,302 Views
Registered: ‎07-21-2009

 rourabpaul,

 

Please start a new thread.

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
Highlighted
Visitor
Visitor
8,324 Views
Registered: ‎03-26-2014

Hi

I use the evaluation platform  L507VHDL virtex5 for the XC5VFX70T FPGA,  I want comunicate  withe UART RS232 and PC

thanks for reply 

PhD student wish you good work
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,320 Views
Registered: ‎09-05-2007

Well if you go to the PicoBlaze Lounge....

 

http://www.xilinx.com/ipcenter/processor_central/picoblaze/member/

 

... you can download...

 

PicoBlaze for Virtex-5 FPGAs

 

... which includes UART macros and documentation.

 

 

UCF pin constraints for UART (RS232 port) on the ML507 board...

 

# ML507 board with XC5VFX70T-FFG1136 Device

#

#

# UART connections to RS232 port

#

NET "rs232_tx" LOC = "AG20" | IOSTANDARD = LVCMOS33 | SLEW = SLOW | DRIVE = 4;

NET "rs232_rx" LOC = "AG15" | IOSTANDARD = LVCMOS33;

 

 

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
Highlighted
Visitor
Visitor
8,274 Views
Registered: ‎03-26-2014

Hi

I Work with the card containing the ML507 evaluation Virtex5 I want to know how to use differential inputs J4 connector for a differential input. Is that with the progrom, I made the subtraction HDR2_4 (L34) and HDR2_2 (K34) for example

PhD student wish you good work
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,265 Views
Registered: ‎09-05-2007

PicoBlaze does not define how the physical I/O pins of the device are configured. Your hardware design (e.g. VHDL) and the constraints file (UCF) define which pins are used and how they are configured. If you decide to have a differential input or output connected to PicoBlaze then internally it is a single signal and the conversion to or from a differential standard occurs at the I/O pins.

 

This is not a PicoBlaze specific topic and it isn’t immediately obvious how it relates a forum thread called ‘Interface RS232’. In the future, please select an appropriate forum for your subjects and remember to start a new thread for a new issue.  

 

For now I will leave you with ‘IBUFDS’ and user guide ‘UG190’ as clues for you to follow.

Ken Chapman
Principal Engineer, Xilinx UK