Arduino: w5100 Ethernet Shield DHCP fails - arduino-uno

I am new to arduino, I have an Arduino Uno and an Ethernet shield w5100.
I am trying an example sketche on the Ethernet library from this link.
Ethernet Tutorial from Arduino website
I used the DhcpAddressPrinter example sketch. but it returns Failed to configure Ethernet using DHCP on the serial monitor.
The Arduino is connected to the router with DHCP enable. My laptop is connected to the same router and was able to acquire IP with no problems.

Have you seen this thread:
https://forum.arduino.cc/index.php?topic=351477.15
unfortunately it requires use of a soldering iron....
I have confirmed myself: a cheap 'no-name' board I had exhibited the same problem you describe above. I bought one from "JayCar" (in Australia) and the same program rang perfectly.
The resistor on the cheap "no-name" board was the wrong value. Although the cheap and JayCar board looked almost identical, the resistor soldered on the JarCar board was a different resistance to the resistor soldered on the cheap board.
This causes the cheap board to not work reliably.

Related

applying stimulus to FPGA using PC

Is there any way I can apply stimulus signals on my FPGA board from my PC itself, and view the output of hardware in any simulation software? I am working on Spartan 3A development board provided by numato labs (elbert V2)
https://numato.com/product/elbert-v2-spartan-3a-fpga-development-board/
It is a relatively small board with few peripherals, so the number of LEDs for output and push-buttons for input is quite less.
I am a newbie to FPGAs but have sound knowledge on verilog. Please help me out with this
Thanks
The board does not have an physical interface intended for use as wired connection/communications (no ethernet, no usb, no uart, etc) to a PC.
These are the easiest ways I can think of for an 'elbert V2' board to communicate with a PC:
The board has a micro SD connector to access files on the micro SD interface. Those files could be accessed by a Verilog simulation.
A USB to UART adapter could be used with the boards GPIO interface.
Here is an example:
https://www.amazon.com/3-3V-UART-Serial-Cable-TTL-232R-3V3/dp/B078GMQPLT
The cable provides 3.3V TTL and the board has 3.3V gpio ports so that is encouraging. Probably just need to connect 3 wires tx/rx/ground.
You would need to design or find UART RTL IP for the FPGA.
Designing the UART would be a good intermediate level Verilog project.
Use procom or similar software on the PC to communicate with the USB/UART com port on the PC and a file. Verilog simulations can access the data in the file.

Connecting the STM32 blue pill to the serial monitor of the Arduino IDE (macOS)

I am using the Arduino IDE to program a STM32 blue pill using a St-link v2. To configure everithing I follwed few guides like this one and eventually I could get a successful upload and get the blinking pin c13 example running.
My problem is that enven I am able to compile and upload, the Arduino IDE does not detect any port, so I cant use the Serial Monitor as it shows
Not conected. Select a board and a port to connect automatically.
And indeed, the IDE does not recognise a port for any configuration...
but it does show the stlinkv2 in the macOS system report
Does anybody know what Im missing here? Theres maybe other alternative to see code-promts?
The ST-LINK probe you have doesn't provide a virtual serial port functionality. It's a debugger/programmer using the SWD protocol.
I'm not familiar with using STM32 with Arduino framework, but in order to use Serial class of the Arduino framework, you probably need to access one of the hardware serial ports of STM32F103.
In this case, you need an external USB - Serial converter which works with 3.3 volts logic levels and connect it to the relevant serial port pins of your Blue Pill board.
Some ST-LINK models also provide embedded USB - Serial converter interface along with the SWD functionality. But even if you have one of those, you still need to physically connect ST-LINK serial pins into the Blue Pill serial pins.

USB Host Controller for DE10-Standard FPGA (Altera Cyclone V SoC)

I'm Looking for a USB Host Control to connect a USB Keyboard and PS gaming controller to control program functionallity (a game) done on FPGA.
I have built a simple game in VHDL on the DE10 platform, currently controllerd using a keboard connected to the PS/2 interface (and a VHDL controller I have found on-line). Looking to expand the gaming control by connecting a USB keyboard and PS gaming controller, but I can't figure out how to build to the USB host controller in VHDL/find an existing one.
Would appriciate to know if there are exiting USB host controllers in VHDL/BSF/BDF formarts I can use to connect USB devices and get decoded information, or am I in over my head.
Thanks!
You are not only far, far in over your head, but any USB interface will need an analogue section which your FPGA does not** have.
I know from experience that USB PHY-only chips are (almost?) impossible to get.
Also where would you run the USB protocol on? And are you planning to write a USB software stack? Unfortunately these things are not that simple.
I would guess the best option would be to make a VHDL UART interface connected to a USB <=> RS323 converter cable and plug that in a PC/Raspberry-Pi or something else with a keyboard.
**There are FPGAs with a USB PHY but they have the USB digital section too, as well as an on-chip processor.

Lattice iCE40 JTAG

I am new to FPGA and I am trying to get a working JTAG setup on Lattice iCE40 FPGA.
The board I'm using is from Olimex and has iCE40-HX8K FPGA.
I'm using urjtag as PC application and tried with DirtJTAG and USB Blaster clones as programmer (flashed onto STM32 BluePill board).
Olimex board didn't have populated pull-up resistors for JTAG so I soldered them (10k for TMS, TDI and TCK).
But the end result is the same: I cannot get jtag to recognize FPGA, the error is:
jtag> cable UsbBlaster
Connected to libftdi driver.
jtag> detect
warning: TDO seems to be stuck at 1
Checked pinout of the JTAG connector and it's correct. Multimeter tests show that there is no short-circuit, no solder bridges, pullups are correct value and working and as expceted.
Tried my setup with Altera FPGA board and it's working, it will detect the FPGA.
Also, tried eBay UsbBlaster clone and it's not working on iCE40, but works for Altera FPGA.
I can flash the external flash (with other tools and programmer), but I want to be able to use JTAG so I can flash onboard SRAM instead.
Any ideas/hints what might be wrong/what to try next?
iCE40 FPGAs do not have a JTAG interface.

USB Debugging

I'm looking for a very specific USB device for debugging systems that may use USB but not with a regular computer (proprietary hardware). I want a device that has a USB host controller and two USB device connections. The device to be debugged is connected to the USB host controller and one of the device connections is connected to another device with it's own host controller on it. The the other device connection is connected to a pc. The point being that all USB data travelling through the device (from the device connected to the host controller to the device connected to the first device connection) is reported to the pc.
I'll happily write software to do the logging (in fact I want to) but I can't seem to find a board like this anywhere. Can anyone help?
I have an Ellisys USB analyser, which isn't exactly what you describe internally, but does sit between a peripheral and a host and use a separate PC to collect the data.
(i.e. it has two 'B' and one 'A' connectors on it.)
Excellent product, and very helpful company.
Sniffing the USB shouldn't be too hard if you have the right hardware. And that is the tricky question. I haven't seen anything that describes the USB breakout box that you want. However I can say that this is in the realm of the following two magazines:
Nuts and Volts
Circuit Cellar
If they don't have a USB breakout box project in their archives, then at least they will have advertisements for small cheap single board computers that would have multiple USB ports that you can use for buffering the signals and reporting it back to your PC.
Alternatively is it possible to just wire your PC up to the middle of your two devices and write a custom drive that echos data back and forth while sniffing off a stream for you?
Sorry for the long delay in my reply -- I checked out one of our USB developer's toolchain, and he uses a Beagle USB Sniffer. He seems happy with it.
You're looking for a USB device with two upstream outputs. I think according to the USB spec, this is not possible. You will have two USB hosts trying to send messages and control the USB devices at the same time.
What if you were to look for a device which allowed you to view the data going through a hub via something other than a usb output?
If you're building something custom, take a look at this USB chip site. The chips are programmable via a windows application. Once you define how you want it to operate, it's saved on an EPROM on the dev board ($30-$50).
Sorry if this isn't helpful!

Resources