Sunday, 20 May 2012
 
 
A+ | A- | Reset
Forums Support omla32 Interface Card Sump LA Serial speed increase (0 viewing) 
Go to bottom Post Reply
TOPIC: Sump LA Serial speed increase
#156
xar
Posts: 9
graphgraph
User Offline
Sump LA Serial speed increase 3 Years ago  
Hi all,
does anybody know if is it possible to fiddle with VHDL and the java GUI to increase the maximum serial speed, assuming the serial port on the pc could go past 115200bps?
TIA,

Giuseppe Marullo
  The administrator has disabled public write access.
#159
spamiam
Posts: 33
graphgraph
User Offline
Re:Sump LA Serial speed increase 3 Years ago  
Yes, it is quite possible to increase the serial speed:

1)It would require a change to the FPGA firmware to support the speed, including the configuration to interpret the setup commands coming over the serial port.

2) The Java PC software would need the serial port driver to be set up to support the new speed, and then the speed selection combo box would need the appropriate entry, then the FPGA interface driver would need to know what command arg to send to the FPGA to select the faster speed.

Some of this will be obviated when the software is upgraded (in progress) to support Run Length Encoding. While this will not incrfease the actal data transfer rate, you will get an lot more clocks transferred per second of serial communication.

-Tony
 
Last Edit: 2009/04/27 21:34 By spamiam.
  The administrator has disabled public write access.
#162
xar
Posts: 9
graphgraph
User Offline
Re:Sump LA Serial speed increase 3 Years ago  
Tony,
thanks for your answer.
Do you know where I could get more information about the RLE implementation and the gui that supports it?

In the meantime, I will try to look at the VHDL and the Java code, do you know which could it be a practical limit, could it go up to 920k?

TIA,

Giuseppe
  The administrator has disabled public write access.
#164
Mike
Posts: 82
graph
User Online Now
Re:Sump LA Serial speed increase 3 Years ago  
I have made the necessary changes to the VHDL and Java code to support 230,400 baud. I did try 460,800 but the communication only worked for very small data uploads. My guess is that the baud rate error is too high for 460,800 baud.

To make it work at 230,400 baud I had to use a FTDI-based USB->Serial breakout board such as the one from Elba Corporation. Most PC serial ports and serial cards are limited to 115,200 baud and probably will not work.

You connect the TTL output from the breakout board to the J1 auxiliary header using some female to female jumpers. The TXD output on the brreakout board connects to the RXD-A input (N10) and the TXD-A output (T14) connects to the RXD input on the breakout board. Note there is a header J12 for a ground connection that is also needed.

The new upload speed of 230,400 baud is selected by using SW2 in the "H" position. LD2 will light when this is selected. Note that I also moved the LEDS so that LDO and LD1 light when the existing baud rate selectors (SW0 and SW1) are in the "H" position. It seemed more natural to me that the LED positions should match the switches. The Java GUI is also modified to indicate the switch positions for the new baud rate selection.

I have attached a ZIP file (la-081a.zip) with the updated binaries (FGPA and Java GUI) that you can use to test this feature.

The actual changes to the VHDL and Java source are fairly straightforward and are listed below:

la.ucf
Change these two lines (changes in red)
NET "rx" LOC = "n10" | IOSTANDARD = LVTTL ;
NET "tx" LOC = "t14" | IOSTANDARD = LVTTL ;
Add this line
NET "switch (2)" LOC = "h14" | IOSTANDARD = LVTTL ;

la.vdhswitch : in std_logic_vector(2 downto 0);
speed : IN std_logic_vector(2 downto 0);
constant TRXSCALE : integer := 14; -- 100M / 14 / 230400 = 31 (5bit)
constant RATE : integer := 230400; -- maximum & base rate
led(7 downto 0) (= exClock & "0000" & switch;

eia232.vhd
speed : in std_logic_vector (2 downto 0);
div : IN std_logic_vector(2 downto 0);

prescaler.vhd
div : in std_logic_vector(2 downto 0);
signal counter : integer range 0 to (12 * SCALE) - 1;
(counter = 2 * SCALE - 1 and div = "000") -- 115200
or (counter = 4 * SCALE - 1 and div = "001") -- 57600
or (counter = 6 * SCALE - 1 and div = "010") -- 38400
or (counter = 12 * SCALE - 1 and div = "011") -- 19200
or (counter = SCALE - 1 and div = "100") -- 230400

DeviceController.java
String[] portRates = {
"230400bps (HLL)",
"115200bps (LLL)",
"57600bps (LLH)",
"38400bps (LHL)",
"19200bps (LHH)"
};
portRateSelect = new JComboBox(portRates);
connectionPane.add(new JLabel("Speed (SW2-SW0):"));

Assuming these changes work fine for people, then they can be incorporated into a new version which uses a switch to select with the DSUB9 RS232 serial connection or the J1 auxiliary header.

Mike
oakmicros.com
File Attachment:
File Name: la_0.81a.zip
File Size: 165336
 
Last Edit: 2009/04/28 13:01 By Mike.
  The administrator has disabled public write access.
#167
Mike
Posts: 82
graph
User Online Now
Re:Sump LA Serial speed increase 3 Years ago  
During my testing of the 230,400 baud support I found that it is necessary to have the correct settings for the USB serial port. The Latency Timer should be set to 1 msec. I only discovered this by accident when all the faster speeds stop working, even with the older code. Below is screen capture that shows the settings for the Advanced dialog in the serial port configuration. This can found in the DeviceManager and by selecting on the USB serial port (COM3 in this case).



Mike
oakmicros.com
 
Last Edit: 2009/04/28 13:31 By Mike.
  The administrator has disabled public write access.
#168
xar
Posts: 9
graphgraph
User Offline
Re:Sump LA Serial speed increase 3 Years ago  
Mike,
I would like to test your mod with the normal DE9 connector, so I cannot use your bitfile (you changed it for the 3.3V one). I tried to follow your instructions to modify the original files but:

- the bitfile I create does respond to the switch configuration (the 3 leds follow the switch configuration) but the gui does not see the fpga, probably an error in doing the changes by my side. I have already changed the timeout in the serial port configuration, no dice even at the lowest speed.

- I am unable to create a working la.mcs file

Would you mind posting the complete modified source project? I am WebISE 11.1 version, just installed.

Thanks in advance,

Giuseppe
  The administrator has disabled public write access.
Go to top Post Reply
All Content Copyright 2005-2011 Oak Micros. All Rights Reserved. See Terms and Conditions.
Powered by Joomla and osCommerce.