I am thinking of using ATmega328P for a project so can I use it without using an Arduino board, just in a breadboard and use other programmers to burn and use Atmel Studio and C to program it.
Is ATmega328P a good choice for this or do I need to use another microcontroller? Please suggest me the name of another microcontroller.
My project needs to use LCD, ADC, and IR sensor circuit. Can you also suggests programming material for ADC and LCD interfacing with ATmega328P in the C language?
-
2\$\begingroup\$ Yes you can. arduino.cc/en/main/standalone \$\endgroup\$Majenko– Majenko2015年03月29日 15:11:33 +00:00Commented Mar 29, 2015 at 15:11
-
\$\begingroup\$ Depending on the amount of memory and GPIO-pins required you could consider using a smaller sized (cheaper) ATmega. For ease of use you should double check if the Arduino IDE supports the chip. \$\endgroup\$jippie– jippie2015年03月29日 15:19:49 +00:00Commented Mar 29, 2015 at 15:19
-
1\$\begingroup\$ You could probably do your project with any modern microcontroller. If you have used the Arduino through the Ardunio SDE you probably haven't learned much about the chip itself, so you could switch if you want. A 32-bit chip would be an obvious 'next step', but the choice in through-hole 32-bit chips is very limited: LPC810, LPC1114 (both Cortex-M0), and the Microchip PIC32 chips. \$\endgroup\$Wouter van Ooijen– Wouter van Ooijen2015年03月29日 15:21:03 +00:00Commented Mar 29, 2015 at 15:21
-
\$\begingroup\$ I suggest you go for the Teensy LC (low cost) or the Teensy 3 or 3.1. You can learn more about them on pjrc.com and you can buy Teensy from a few stores, either directly from pjrc or from places like Sparkfun. You can breadboard these and use the Teensyduino software stack and program in the Arduino IDE just like your old arduinos. \$\endgroup\$KyranF– KyranF2015年03月29日 16:56:40 +00:00Commented Mar 29, 2015 at 16:56
-
\$\begingroup\$ And if you want to know HOW to do this, I'm currently reading through Make: AVR Programming which gives a good step-by-step guide on the entire process, including how you program the various interfaces that Arduino hides from you. \$\endgroup\$Phil B.– Phil B.2015年03月29日 19:05:22 +00:00Commented Mar 29, 2015 at 19:05
2 Answers 2
I'm basically self promoting here but hopefully it'll help.
I actually made a tutorial video that uses the ATmega328P and Atmel Studio 6 to blink an LED wired to the chip.
The video shows the circuit piece by piece. If you go into the description, there's code, a Schematic and a BOM to help you get started. There's some extra code as well for the ADC stuff. Unfortunately I didn't do anything with an LCD interface.
And here's a video that shows the ADC working:
I realize this doesn't answer all your questions, but at least this might help you get started.
Yes, you can use an 328p in a custom board. You have to follow Atmel hardware guidelines (basically: ground, VCC, reset pullup and access to SPI pins for programming).
A popular USB programmer is USBasp (available cheaply everywhere, especially Aliexpress).
Easy to use LCD library (sorry, in Polish). The functions in the .h file are self-explanatory.