New answers tagged

0

Is it better to use half-duplex ? When is it necessary to use half-duplex ? It implies enabling receive and driver at a specific timing which can be annoying compared to the full duplex method. It is necessary to use full-duplex when you want to transmit and receive simultaneously. It has nothing to do with the number of slave nodes, which requires ...


0

How many ports do you have on each side? If you have two ports on each device, then it's easiest to just use one for each direction. If you have devices with only one port, you can still talk bidirectionally, but you have to take more care in timing and arbitration to avoid conflicts. If you wanted to avoid all chance of conflict, you'd need 8 ports on ...


2

What are you connecting your UART/serial comms to? The MAX3323 uses external capacitors to generate +5V and -5V, and uses those supplies to convert signals from the low-voltage side into signals which transition between +5V and -5V. It only requires one low-voltage supply to do this. The shield devices you link to require an external supply ( +5V ) to be ...


1

yes, for such slow signals either kind would work. Or you could use resistors for voltage drop and a TTL compatible buffer for the upwards shift. but "rock7" says There are various FTDI USB cables, the precise model used with our products is the TTL-232R-3V3, and it's available to purchase from our shop or from various electronics outlets ...


0

One solution would be to use USB-UART chips. They are not expensive and typically require only a few capacitors and an inexpensive crystal. For example, the FTDI FT232RL or the CH340.


0

You can't connect the TX lines from two modules together. If you want to use your "TTL module" to monitor the communication then you can only connect the RX line. So, you can only monitor one direction of data transmission at a time. Of course, you must also have compatible voltage levels for the serial interfaces in all three devices. You haven't provided ...


0

There is also a chance that the system may not detect it as an error. It will simply further sample the idle line and assume stop condition and stop. The first byte if reported as error, can be cleared in software and the rest of the bytes will be received properly. Hence, in general there will be CRC or error checking mechanism to make sure that the ...


1

If you turn the receiver on after the start of a data word, then of course, the receiver will not interpret it correctly. You could regard this as misusing, rather than using a link. If the word is immediately followed by a further word, then the misalignment can continue. As long as bit 2 is 1 and bit 3 is zero, the RX will 'see' a start edge at the time ...


3

Yes, it will misinterpret things.


0

simulate this circuit – Schematic created using CircuitLab It is common for pins on a chip to be protected with diodes. These diodes clamp the pin to the rails. This way if a voltage transient occurs such as a static discharge the pin is undamaged. The TX and RX lines are pulled up with resistors somewhere. This may be inside the chip or externally. ...


1

First of all, sensor TX pin is transmit output so it must be connected to RasPi RX pin which is a receive input - Connecting TX to TX is usually wrong. But in this case is not that simple, so don't do that just yet. The sensor TX output voltage levels are same as it's supply voltage, so it uses 5V logic levels. RasPi RX pin does not tolerate 5V logic levels,...


3

As mentioned above, setting it to output push-pull mode will solve the problem, however you may also want to check the "Maximum output speed" is set to 'very high', and if your system tolerates it, add the internal pull-up resistors; I know there's various schools of thought on whether USART should have pullups or not, so try it and see if it does what you ...


0

Okay, that was pretty fast. Something wrong with the board definitions/library? dunno. There are several implementations of the board definitions/library available and some are old or incomplete (?). This version works and give you also some nice features as setting the clock speed and internal/external crystal etc. Take a look at: https://github.com/...


7

Do you have a schematic for your circuit? In addition to the misconfigured GPIO pin, another possibility is that you have a capacitor on your UART line, acting as a low-pass filter, and preventing the signal from rising quickly.


54

Check that the GPIO pin for UART TX is configured for alternative output push pull mode. It looks like it is configured for alternative output open drain.


5

Most likely the malloc and free are not thread safe so you can't allocate in interrupt and free in main loop. In general, there should be no dynamic memory allocation in interrupts. At least you should disable receive interrupts when popping a byte from the linked list. And in general rarely there should be need for linked lists using dynamic allocation in ...


Top 50 recent answers are included