# Existing UART libraries on pic/atmega/

I am still new on electronics (my background is software), I played around a bit with Arduino, and I am trying to advance on other microcontrollers like PIC, ARM, etc.

Can I rely on existing libraries to use peripherals like UART, I2C, SPI as I am used to with Arduino?

I googled around for a bit, and pages like this detail how I can implement UART on a PIC16. So I was wondering, does microchip (or any other microcontroller vendor) have libraries readily available which I can simply include as I was used to with Arduino? Or am I supposed to learn all the low level registers and implement them myself? (because that sounds quite challenging for a beginner like me).

Hope I won't get burned over this question, but couldn't find the answer googling...

• Yes, they have libraries and drivers, although using them isn't as "easy" as Arduino. Take a look at MPLab X, Code Configurator and Harmony (for 32-bit MPU's). – Ron Beyer Jul 29 '19 at 14:02
• This question is really too broad and at least potentially a prohibited search for off-site resources like libraries. But yes, many MCU vendors publish libraries for basic peripherals and in at least some cases these are fairly popular. There are also various other multi-platform frameworks beyond Arduino, each having its own compromises. – Chris Stratton Jul 29 '19 at 14:03
• Thanks for commenting, and sorry for the poor question. I am looking for a microcontroller that supports (the infamous?) 9 bit uart. And I was hoping that I could also rely on an existing library that allows me to configure 9 bit uart. But the amount of microcontrollers is quite overwhelming and I have no idea which vendor would be my safest bet for this specific requirement. Is the best way forward to just 'buy a bunch and try it out'? I mean, the fact that a microcontroller supports 9 bit uart doesn't mean that the library allows me to configure it (as I found out with arduino) – bas Jul 29 '19 at 14:15
• You can bit-bang a 9-bit UART protocol if you wanted to using a uC, and that would work with pretty much any microcontroller depending on the timing (rate) you need, including Arduino (would require a small modification to the SoftwareSerial library). – Ron Beyer Jul 29 '19 at 14:22
• Wouldn't bit banging be less robust than using the actual hardware peripheral? – bas Jul 29 '19 at 14:48