After intensive googling I am turning to you for help.
Is there a microcontroller that can:
Load an Arduino bootloader and work with Arduino IDE and libraries
Do concurrent UART read and write at 38400 baud
Operate at 3.3V TTL logic
Be found in DIP (through-hole) physical format
The project application is a kind of telemetry where a source sends serial data packets of 4-12 bytes over 38400 baud, 3.3v TTL. It has no flow control. Packets arrive randomly, typically in bursts of high intensity. These packets should then be forwarded by this microcontroller to a Tinymesh radio module for wireless transmission. The Tinymesh module can not read serial data while it is transmitting and thus asserts CTS. Therefore this microcontroller is needed to buffer data between the source module and the Tinymesh.
An attiny is not available with 2 uart and in DIP format.
An atmega328p only has 1 uart and thus cannot reliably send and receive at the same time, even with the AltSoftSerial library. The 8MHz clock fq limit when operating at 3.3V most likely is not enough to do 38400 baud. Quote: "AltSoftSerial is capable of running up to 31250 baud on 16 MHz AVR".
Are there xmegas or other atmegas available with Arduino bootloader and Arduino IDE compatibility? Or with an uncomplicated way to burn an Arduino bootloader myself?
Is two uarts enough? The 1284p is an 8 bit avr like the 328, largest dip avr, with 2 uarts and 128k flash, 16k ram
Burn bootloader just requires an isp programmer or arduino running arduino as isp. I use the USBAsp programmers - $3 each on ebay. Buy extras, they are masters of disguise, I've lost several...
Thanks DrAzzy, 1284p looks like a nice chip!
Well, I think 2 uarts will be enough, but ofc having 1-2 more would be great for debugging or adding more sources - which could be a nifty evolution come to think of it.
Super input, thanks!
Yes @mrburnette the Teensy is an alternative but the circuit will be cleaner especially with regards to power supply with a standalone MCU. Then I can have one 3.3v regulator powering the source module, the MCU and the Tinymesh.
@Graynomad: The DIP requirement is due to my inexperience with reflow soldering and PCB design. I guess I could hand solder an smd chip to a breakout board but it would mean and extra possibility for error.
I couldn't find any Atmel SAM21 chip. The SAM D21 seems not to come in DIP form.
plengqui:
Super input, thanks! Yes @mrburnette the Teensy is an alternative but the circuit will be cleaner especially with regards to power supply with a standalone MCU. Then I can have one 3.3v regulator powering the source module, the MCU and the Tinymesh.
<...>
Since the uC modules have on-board regulators BUT the output 3.3V Vcc does appear on header pins, so the on-board regulator is easily not utilized if one desires! But there for USB testing. I rarely use the onboard regulator except during the programming phase of the module or for USB diagnostic use in a running system.
IMO, unplugging a $4 32-bit STM32F103 module @72MHz is far better than unplugging an 8-bit Atmel DIP running at 16MHz Atmega1284 @ $6.29 (QTY 100 price) ... that is, if one is looking to the future and want to build in non-obsolesce and plenty of additional capabilities! But, we all know about opinions.
The really nice thing about using a uC module is that the tech that changes out the module can unplug it, connect a USB cable to her/his notebook, and verify that the module is correctly programmed and running a self-test. Also very easy to reprogram over USB.