I hope that I am not repeating the question. I tried Goggling it but can't find the answer. I have seen many tutorials like
but all says that the Arduino on breadboard is not capable of Serial Communication.
What I want to do this that after testing my program on Arduino UNO R3, I want to take out the ATMEGA 328p from the Arduino and want to use it in PCB with working Tx and Rx pins . How can I do it?
Like in the attached picture. If I am able to Provide ATMEGA 328P it's required driver circuit and put the ATMEGA the one that was in My arduino to it. Will the circuit work just like UNO? Will I be able to efficiently use Tx and Rx pins?
(RX & TX could be swapped - check that, I confuse that all the time)
Will you be using the atmega from your UNO or did you buy an extra atmega?
If you are using the one from your UNO it should work. If not, you will have to burn the bootloader to it first.
It is good practice to put a decoupling capacitor between VCC and GND
Thank you so much for your support sir If I want to make a PCB that can have the complete Arduino UNO board in it as a controller, How can I make pin connections of the UNO to the PCB? Should I solder the points at the bottom of the UNO to the PCB?
Serial communication is certainly feasible without an external crystal.
I've tested my software uart at 460,800kbps on an ATtiny85 running off the internal RC oscillator/PLL @16Mhz.
Using the hardware UART and running at 8Mhz, you should have no trouble with 38,400kbps serial communication, and I'd say a good chance you can get error-free 57,600kbps.
Actually I want to keep the cost to the minimum possible so using a extra hardware might not be suitable for me. I will be transferring the circuit later to PCB so kindly suggest me the best possible solution please?
Actually I want to keep the cost to the minimum possible so using a extra hardware might not be suitable for me. I will be transferring the circuit later to PCB so kindly suggest me the best possible solution please?
hbtalvi:
Actually I want to keep the cost to the minimum possible so using a extra hardware might not be suitable for me. I will be transferring the circuit later to PCB so kindly suggest me the best possible solution please?
I'd suggest a breakout for an ICSP header, and four pins for serial - gnd, tx, rx, and vcc. No crystal needed, just set the fuses to use the internal RC oscillator. For serial communications with the hardware USART, play it safe and limit your baud rate to 38,400kbps.
hbtalvi:
I tried Goggling it but can't find the answer. I have seen many tutorials but all says that the Arduino on breadboard is not capable of Serial Communication.
As is so often the case, you are clearly misinterpreting the descriptions. It is perfectly capable. A "breadboard" or custom PCB will be capable of serial communication if you include the serial communication circuitry. Such circuitry is of course included in the UNO and similar, but not in the (Pro) Mini. You build what you need.
The question then, is what "serial" interface do you need? If you need TTL communication, then it is already there on (port) pins 0 and 1. If you need RS-232 levels then you need to include a MAX232. If you want USB functionality, then you need to use an FT232 or CP2102 (or a third option that I do not have on the tip of my tongue).
The thing is though, unless you want to make a number of these, it really is a waste of time and money to (design and) make PCBs; the Chinese modules are essentially as cheap as the chips themselves and perfectly robust. If you need to add extra components, you can use a perfboard (with solder pads, or a "breadboard" version) with the module mounted (soldered by the pins) to it.
If you need the USB interface, you can add one of the cheap modules, or consider buying a "nano" module with it already included - essentially a miniaturised UNO. Or the "pro micro" which is a miniaturised Leonardo.
Paul__B:
The question then, is what "serial" interface do you need? If you need TTL communication, then it is already there on (port) pins 0 and 1. If you need RS-232 levels then you need to include a MAX232. If you want USB functionality, then you need to use an FT232 or CP2102 (or a third option that I do not have on the tip of my tongue).
I think the third option you forgot is the cheapest - the PL2303.
I have a whack of these after I made a deal with Roman at dipmicro to take 70 that he was having problems with for ~25c ea. The first one I tried in my Linux box worked fine. No I use them for a lot more than USB-TTL. Plug one into a USB wall wart and they make a nice 3.3 & 5v supply for breadboarding. Leave one in the front USB port of my linux box for a simple LED indicator - echo < /dev/zero > /dev/ttyUSB0 to light up the tx LED when your kernel rebuild is complete or whatever...
Just recently I've seen USB-TTL adapters for sale with another chip: CH340G.
ralphd:
I think the third option you forgot is the cheapest - the PL2303.
...
I have a whack of these after I made a deal with Roman at dipmicro to take 70 that he was having problems with for ~25c ea.
So - what were these "problems"?
ralphd:
The first one I tried in my Linux box worked fine. No I use them for a lot more than USB-TTL. Plug one into a USB wall wart and they make a nice 3.3 & 5v supply for breadboarding. Leave one in the front USB port of my Linux box for a simple LED indicator
That is priceless. Used as a 3.3V regulator even if the thing is otherwise non-functional.