Hot answers tagged

31

I'm not an electronics engineer, but I would go for using the TX operation as a software UART. For an RX operation, buffering is needed, and interrupts are needed not to miss information. This is typically handled by a hardware UART. For a TX operation, you only need to send information, which is happening when you want it (for receiving you don't know ...


19

Your uart_rx signal is asynchronous to your clock. However, you have one place in your code where you use it directly in the state machine. This is curious, because in all other cases, you are careful to assign it to rx1 and then test that. IDLERX: begin rx_bitcount <= 4'd0; rx_busy <= 1'b0; if (uart_rx == 1'b0 && rx_err !...


14

It's far simpler to implement a UART transmission in software because you just bit-bang the output port until the bytes are sent. To implement a receiver, you have to do multiple checks on the bits as they arrive (such as waiting for the start bit) and parity checking and usually, you have to run at a much higher processing rate to ensure you can cope with ...


3

Assuming you’d be using an FT232 or equivalent. The answer is no, you cannot directly connect them as they are USB device only and you’d need one of them to be a USB host. I know of no serial to USB host chips. What you could use is on one end is a microcontroller with USB host capabilities. This would, of course, require the appropriate programming to act ...


3

The strategy would indeed be to go to the various manufacturer web sites and use their parametric search engines to narrow down the selection to 4 UARTS. Each manufacturer will have a slightly different search facility so you have adapt to that. One benefit here is that the number of main MCU manufacturers has been reduced in the recent decade due to ...


2

If you have a high enough original clock, you'll be close enough then you divide down even if it's not an exact integer ratio. For example, to divide a 50MHz clock down to 9600Hz, you ideally need a ratio of \$5208.\overline{3}\$. But that's not an integer ratio so I just use 5208 instead. I'm only off by 1/3 of 20ns (period of a 50MHz cycle) every 9600Hz ...


2

There are a number of websites that do what you want; the ones I use most often (no affiliation) are Digi-key and Mouser. Both of these offer parametric search by both functions and footprint. You can also use individual manufacturer's sites, which will likely have more parts available, but distributors like those linked above sell parts from many different ...


1

As long as nothing else is hanging on the lines then it will be fine. When the chip unlocks for programming, all of the PPS selections are unselected. What it will interfere with is if you want to debug using the Pickit3.


1

Do not wire two or more outputs together. That is a standard rule for push-pull type digital outputs. When other drives low while other drives high, abnormally large current flows from pin to pin and may damage one or both output pins. Also, UART needs TX output connected to RX input for communications.


1

It works just as expected from that code that controls the uarts - first there is transmission out on UART3, and after that is fully complete there is reception from UART2. So UART2 does not see any reception as at that time there is no transmission going on UART3.


1

For a project of mine, I first used an ATtiny45 (with 8 pins), but SoftwareSerial (a.k.a. NewSoftSerial) was really unreliable when too many messages arrive at the same time (MIDI messages). So I looked for the smallest (in terms of number of pins) ATtiny, available in DIP package, that has an UART. And the answer is: ATtiny2313 but half program memory ...


Only top voted, non community-wiki answers of a minimum length are eligible