OK... I used the arduino mega as a base board on a one off job. So far, its killer! But, in life, you always get a curve ball. I need to get my water tank temperature back on a remote arduino "pro micro" based tank transmitter which is set up as three wire transmitter. Soooooooo the only way to do this is to "inject" temp data on the analog output signal line which is an analog current traveling over a single wire. As this is my personal water system, I am not concerned about meeting all the requirements for a 4-20 mA transmitter.
The main level data is an analog signal created by a DAC. Temperature data needs to be HART like which means the 0s and 1s are travelling as two superimposed frequencies on the main analog current line. This is done using a AD5700 HART modem chip in conjunction with an AD5410 DAC.
The DAC is interfaced to the AT32U4 Atmel processor using the SPI bus. THe AD5700 HART chip has an old school UART interface. Last time I used it, I had a dedicated 16550 UART available.
In going over the Atmel spec sheet, I find what appears to be a single USART chip built into the processor.
Qustion #1: Does the USB controller on the 32U4 utilize this USART?
Question #2: Do the Tx and Rx lines on the Arduino "track" the USB input/ouput or is this a separate function allowing us to hook the arduino up to a dumb terminal in conjuction with our ability to use the USB port for loading and debugging use?
HART is a classic Master Slave protocol which remains idle until the master makes a request to the slave. The amount of bandwidth is actually small and my implementation is a tiny subset of the whole HART protocol. My master (aruduino mega) simply makes requests for status every once in a while and updates tank temperature data once in a while. If the temp data is updated every 5 minutes, that is more than adequate. USB connectivity to the tank transmitter is only for updateing software and for debugging use during development.
If the USART on the 32U4 is already in use for the DAC (SPI interface) and for the USB, then I may be adding a third com function to the USART, namely the HART modem chip. Do we need to reconfigure the USART each and every time we use it for these functions or are there provisions within the arduino serial lib for allowing this? It strikes me as odd that with an SPI interface to other chips, for example, that we would need to do this. Adding a dedicated UART would be hard in lieu of the pin requirements for this.
Any assistance in understanding what I can do and cannot do with the built in USART would be appreciated. Thanks. Dev