Standalone Atmega328P dual use UART

Hi,
I want to design a PCB based on the Atmega328P that uses both the UART and SPI peripheral. Can i somehow programm the chip without UART or is it possible to "dual use" the UART interface? Also is the internal clock enough for 9600 Baud?

Typically (maybe universality) the UART when used for programming will also be available for program use. The caveat is whatever loads are on the UART it must allow the "other" usage to function.

Also is the internal clock enough for 9600 Baud?

YES

BTW you could also program by using the ISP method. Requires another arduino or some external programmer.

Benefits of ISP:

  1. You can make the clock anything within the 328's capability (not just 8Mhz or 16Mhz).
  2. You have the memory used for the bootloader for your program use. This is since the ISP method does not require a bootloader.
  3. Your program will start up faster on reboot since the bootloader is not installed.

Bootloader: A small program running on a microComputer. Every time you power the board the bootloader runs before your program runs. It monitors the UART inputs to see if something is trying to upload a new program.
If not the bootloader passes control to your program.
If so the bootloader loads your program "after" its code and passes control to your program.

Which needs design consideration when using other SPI devices :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.