Serial communication

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everyone,

 

Im programming my atmega328 using USBasp (ISP). I want to start programming using serial comunications with FT232RL. How can i upload the code with USB serie? (Right now i only have TX RX pins from arduino UNO to simulate with my micro on breadboard) later ll recive the ftdi chip.

 

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you just mean "how do I use the UART" start with the tutorial forum here. Articles on both synchronous and asynchronous (interrupt) use of the UART. Or if you want something "ready made" then google "UART fleury avr"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think he means, "How do I load my code into the AVR via the UART" ?

 

To which the answer would be, "you need a bootloader" ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Ah the multi-faceted "programming" word!
.
If you have a 328, an FT232 and you want to start programming it via CDC-ACM aren't you perilously close to reinventing Arduino?

Last Edited: Tue. Jun 12, 2018 - 05:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Download a copy of the Arduino Uno schematic, and build your circuit to match.  Then use the Arduino IDE to "burn bootloader" to your new device.

But I have to ask, why not use a Arduino nano or Pro-mini or Pro-micro, all of them would have the basic circuit and bootloader already loaded and are cheaper then a bare bone chip and needed external components!!!

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, thansk all for the answer. Ki0bk i want only the microcontroller and the serial comunication. 

I think i found the right way. Using FT232RL.

 

Thanks everyone

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As Andy said in #3 it looks like you are needing a bootloader. If so then for 328 the obvious choice these days is "Optitboot" which will, in effect, make your 328 set up an "Arduino" and can therefore be programmed in the same way that other Arduino boards are.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

"Ki0bk i want only the microcontroller and the serial comunication. "

What is the price of a controller? a Ftdi? the PCB? The Xal-s-? the capacitors? the plugs?

 

what is the price of an arduino (clone)?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

For reliable serial comms, you need an external xtal on your M328, so by the time you add xtal, caps, and usb-serial-ttl chip (which may also need a xtal) and min necessary bypass caps, you will exceed the cost of a Arduino nano board! 

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dbrion price its not problem. This is just the serial communications to other components.

 

Thanks everyone , tomorrow i recive the ftdi chip to try.