Hi guys, I'm trying to set up an atmega328p-pu on a breadboard and trying to program it using a FT232R breakout board.
I feel it should be an easy task, but I just cannot figure out a solution.
I bought the MCU which has an UNO bootloader and 16 Mhz crystal.
I have set it up as you can see below:
(Some decoupling caps are missing - would that make a difference?)
When I upload the blink example I can see the heartbeat on the LED and both the TX and RX flashing.
The code "seems" to upload successfully as I get the following output:
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Downloads\arduino-1.8.4-windows\arduino-1.8.4\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM20
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\AppData\Local\Temp\arduino_build_301504/sketch_sep15a.ino.hex"
avrdude: writing flash (1864 bytes):
Writing | ################################################## | 100% 0.72s
avrdude: 1864 bytes of flash written
avrdude: verifying flash memory against C:\Users\AppData\Local\Temp\arduino_build_301504/sketch_sep15a.ino.hex:
avrdude: load data flash data from input file C:\Users\AppData\Local\Temp\arduino_build_301504/sketch_sep15a.ino.hex:
avrdude: input file C:\Users\AppData\Local\Temp\arduino_build_301504/sketch_sep15a.ino.hex contains 1864 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.64s
avrdude: verifying ...
avrdude: 1864 bytes of flash verified
avrdude done. Thank you.
One puzzling thing was that I have set the FT232R on my COM to have a baud rate of 9600, but it seems to be overriden to 115200 when I upload on the arduino IDE.
Trying to see how the code runs, I have added in some serial print statements:
int ledPin = 19;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
Serial.print("setup");
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print("Loops");
digitalWrite(ledPin, HIGH);
delay(10000);
digitalWrite(ledPin, LOW);
delay(10000);
}
By setting the baud rate within the code to 9600, I could see the serial prints whereas I couldn't see anything without it. Monitoring the COM outputs showed an endless print of "setupLoops". It looks like setup() is looping when it shouldn't and loops() is correctly running but the LED isn't blinking.
It appears I'm getting the timing wrong somehow, but I am clueless. Another reason I can think of is not delivering enough power delivered as I am sourcing it from the FT232R.
If you could please help it would be much appreciated!
Thank you in advance.

