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.ucfChange 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.vhdspeed : in std_logic_vector (2 downto 0);
div : IN std_logic_vector(2 downto 0); prescaler.vhddiv : 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") -- 230400DeviceController.javaString[] 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