Please least best C/C++ libraries that are more familiar and should be able to program all inbuilt modules of AVR along with external modules.
#1 This forum helps those that help themselves
#2 All grounds are not created equal
#3 How have you proved that your chip is running at xxMHz?
#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss
+1 for Arduino but after that
I feel I should point out:
A lot of Arduino code is actually really bad. There's some questionable design choices there, which can result in stuff being orders of magnitude slower than it has any reason to be, and a lot of the libraries for it have atrocious performance with regards to memory or speed. That said, it's also pretty easy to get started with and a whole lot of stuff supports it.
avr-libc has very nice features https://www.nongnu.org/avr-libc/... (such as sunset/sunrise time, moonphase ) which are difficult to find on a PC ... RPi and are not parts of arduino (I tried to find them..).
Avr-libc does not really support ANY of the avr peripherals.
Arduino only suppports some of them, and not all of the avr chips.
Well, a beginner cannot start with all and every avr, all and every module (inside or outside), in the past, present
Maybe understanding one peripheral, with a given avr, is useful (if he has to understand, say, 10 peripherals, time to understand the nine remaining is not 9*time he understood the 1rst).
Arduino have nice examples/demo programs for a limited range of peripherals (and arduino hardware avoids spending a lot of time soldering and veryfying)
avr-libc and its manual are very good, too
Once he has a part working, knowledge he got can make other parts very easy..
He should have a look at avr-freaks tutorials, too...
Oh, Arduino is a fine set of libraries for most applications; not nearly as bad as "the_real_seebs" implies (most code famously "orders of magnitude slower" than bare C is doing orders of magnitude more stuff. (DigitalWrite(), for instance allows both pin and value to be variables; code written on top of digitalWrite() is much more portable than "direct port IO" code. Faster special-cased versions are available, if you don't mind orders-of-magnitude difference in performance depending on the arguments...)
I just didn't think that Arduino meets the query from the original poster. (although, it may be the best alternative, especially if you want those "external modules" supported (in some sense) as well.)
No one has yet mentioned Atmel Software Framework or even the recently renamed Advanced Software Framework http://asf.atmel.com/docs/latest/architecture.html . It has a large set of drivers aimed mostly at XMEGA & UC3 however but there is still a fiar amount of MEGA support.
It doesn't seem to get much traction amoungst posters here so I'll add it at the bottom of the list. I don't have any experience of Fleury, Stang or Martin Thomas to properly rate is against the others.
No one has yet mentioned Atmel Software Framework
(curious that is still "atmel.com" - has not migrated to the microchip.com domain ??)
Like ASF, Start tends to focus on recent/modern silicon so the only coverage for tiny/mega is really these recent "xmega alikes".
So you're actually looking for ones to avoid ... ?
Note that there is no such thing as "C/C++" - so is it C you want, or C++ ?
Note that there is no such thing as "C/C++"?
Directory of C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
18/08/2016 10:24 <DIR> .
18/08/2016 10:24 <DIR> ..
17/08/2016 17:41 1,222 abi.cpp
17/08/2016 17:41 7,286 Arduino.h
17/08/2016 17:41 11,214 binary.h
17/08/2016 17:41 8,078 CDC.cpp
17/08/2016 17:41 1,529 Client.h
17/08/2016 17:41 7,743 HardwareSerial.cpp
17/08/2016 17:41 5,254 HardwareSerial.h
17/08/2016 17:41 2,605 HardwareSerial0.cpp
17/08/2016 17:41 2,315 HardwareSerial1.cpp
17/08/2016 17:41 1,975 HardwareSerial2.cpp
17/08/2016 17:41 1,975 HardwareSerial3.cpp
17/08/2016 17:41 4,469 HardwareSerial_private.h
17/08/2016 17:41 1,142 hooks.c
17/08/2016 17:41 2,909 IPAddress.cpp
17/08/2016 17:41 2,861 IPAddress.h
17/08/2016 17:41 1,372 main.cpp
17/08/2016 17:41 1,027 new.cpp
17/08/2016 17:41 979 new.h
17/08/2016 17:41 2,725 PluggableUSB.cpp
17/08/2016 17:41 2,063 PluggableUSB.h
17/08/2016 17:41 5,442 Print.cpp
17/08/2016 17:41 2,614 Print.h
17/08/2016 17:41 1,335 Printable.h
17/08/2016 17:41 963 Server.h
17/08/2016 17:41 8,800 Stream.cpp
17/08/2016 17:41 6,126 Stream.h
17/08/2016 17:41 15,022 Tone.cpp
17/08/2016 17:41 4,180 Udp.h
17/08/2016 17:41 6,253 USBAPI.h
17/08/2016 17:41 20,227 USBCore.cpp
17/08/2016 17:41 8,435 USBCore.h
17/08/2016 17:41 1,519 USBDesc.h
17/08/2016 17:41 4,576 WCharacter.h
17/08/2016 17:41 9,409 WInterrupts.c
17/08/2016 17:41 12,024 wiring.c
17/08/2016 17:41 7,700 wiring_analog.c
17/08/2016 17:41 4,978 wiring_digital.c
17/08/2016 17:41 2,255 wiring_private.h
17/08/2016 17:41 3,435 wiring_pulse.c
17/08/2016 17:41 6,022 wiring_pulse.S
17/08/2016 17:41 1,550 wiring_shift.c
17/08/2016 17:41 1,641 WMath.cpp
17/08/2016 17:41 16,928 WString.cpp
17/08/2016 17:41 9,880 WString.h
44 File(s) 232,057 bytes
which makes an interesting mix of C, C++ and Asm in fact.
I doubt it very much.
In all newbie-avr's few posts so far; he asks a simple, short and broad question, then makes zero contribution to the rest of the thread. Not even thanking contributors for their replies.
My Troll Alarm has just been triggered.
I didn't say that you can't mix C and C++ in a single project.
But a library is going to be either a "C library", or a "C++ library" (or, more precisely, is going to present either a C or a C++ interface).
But a library is going to be either a "C library", or a "C++ library"
In fact the history of things looks like the original "Wiring" was a C project, then the Arduino folks took that as the basis of a C++ library and wrapped some more C++ around it.
"or, more precisely, is going to present either a C or a C++ interface"
Well, when reading that, I was terrified : would programmers not know the nuance between inclusive or and exclusive or?
In the PC world, such an horrible thing is not likely
sh-4.1$ grep __cplusplus /usr/include/*h |wc
grep: /usr/include/scsh: Is a directory
733 2023 35337
sh-4.1$ ls /usr/include/*h |wc
613 612 14473
Many libraries can be "invoked" from C (, Fortran with restrictions) or C++ programs according to one's tastes, thanks to the programmers logical skills...
BTW : perhaps answer to OP is that libraries that can solve each and every issue can be found in the Vatican or inside Lalesh Temple...
© 2018 Microchip Technology Inc.