Hi,
I have used the Atmega328P in the PDIP package. But recently I needed an SMD solution, so I ordered some PCBs with the Atmega328P 32MLF assumming that the microcontrollers were exactly the same except for the SMD package and the extra 4 pins.
I am able to program the 32mlf microcontroller via an ISP programmer. However, the program doesn't seem to run. For instance, I am trying to output a high voltage (3.3V) at one pin, but when I measure the voltage in that pin the tester just says 0V.
This is the code:
#define F_CPU 14745600 #include#include #include #include #include #include #include #include "io_328p.h" int main() { DDRB |= (1<<PB2); // set PB2 as output PORTB |= (1<<PB2); // set PB2 high while(1) { } return 0; }
Why is it not working? What are the differences between the Atmega328p in the 32Mlf and the PDIP packages?
Thanks in advance