I checked the pins of the chips using a continuity tester, and the relevant voltages with a voltmeter.
I have connected it like this:
Arduino Pro Mini F232R chip
Vcc (on end connector) Vcc (5V confirmed with meter)
GND GND
GND /CTS pin 11 on the chip
"GRN" (reset via 100nF) /DTR pin 2 on chip
TXO (pin 31) RX on board pin 5 on chip
RXI (pin 30) TX on board pin 1 on chip
The board comes alive and the red LED is steady. The green LED flashes about 1/sec. This shows the firmware is loaded.
I then connect the USB to my Windows 7 machine. The FTDI drivers have been installed, and the com port is detected (COM11).
In the Arudino IDE (version 1.6.12) I select "Arduino Pro or Pro Mini" "ATMEGA 328 5V 16MHz". COM11 for port.
Nothing else is connected to the Pro Mini.
I compile, no errors. Then I try to upload. Eventually I get the error:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
I have tried the following tests:
Loopback test: Disconnected the Arduino. Connected Tx to Rx together from FTDI board. Used a terminal emulator with no flow control. Characters are returned back on the screen. So COMs are working.
Checked all connections with multimeter. Checked right up to chip pin, not just the boards.
Checked suppply voltages. Both boards are at 5V.
Tried different boards (I have 2 pros and 4 FTDI breakouts). All combinations show the same error.
Tried swapping RX and TX (arduino green LED flashes rapidly and outputs go crazy)
Monitored TX of FTDI board with AC voltmeter. Definitely a signal during programming.
Tried disconnecting DTR and CTS wires in various combinations.
Tried manually resetting board whilst programming
Tested program on Arduino Uno (no problems with program or IDE)
Thanks ballscrewbob for replying and trying to help, but I don't think you read the message carefully.
It is com port 11 (eleven)
I also gave details of my machine (Windows 7, IDE version). What else do you need to know?
I also told you I did a loop back test, therefore it can not be a driver issue.
Please read my original post carefully, it contains a lot of useful information. If you have a specific question I can supply more specific information.
I tried changing baud rate, but no luck. I also checked the lines with an oscilloscope. I can see AVRdude sending a character, but the DTR line is not changing. This works, because I can set it using the DOS command :
mode com11 dtr=on and see the change on the oscilloscope. Any reason why this isn't being asserted from avrdude?
"I tried changing baud rate, but no luck. I also checked the lines with an oscilloscope. I can see AVRdude sending a character, but the DTR line is not changing."
I'm not using Windows, but have you tried this?
"If using the FTDI cable on Windows, you'll need to make one configuration change to enable the auto-reset. With the board connected, open the Device Manager (in Control Panels > System > Hardware), and find the USB Serial Port under Ports. Right-click and select properties, then go to Port Settings > Advanced and check Set RTS on Close under Miscellaneous Options. "
avr_fred:
It sounds like there is no boot loader on the '328.
Is the an official Arduino or a clone?
It's not possible to tell if there is a bootloader based on what he's posted. See response #5 - the DTR line is not changing when it tries to upload, so the chip won't be reset, and hence the bootloader, if present, wouldn't be running....
kprims:
"I tried changing baud rate, but no luck. I also checked the lines with an oscilloscope. I can see AVRdude sending a character, but the DTR line is not changing."
"If using the FTDI cable on Windows, you'll need to make one configuration change to enable the auto-reset. With the board connected, open the Device Manager (in Control Panels > System > Hardware), and find the USB Serial Port under Ports. Right-click and select properties, then go to Port Settings > Advanced and check Set RTS on Close under Miscellaneous Options. "
kprims, thank you for this, it was one bit of information I missed. I have tried it, but no difference I am afraid. I also tried using Linux. Thanks anyway.
avr_fred:
It sounds like there is no boot loader on the '328.
I have come to the same conclusion. However, in my original post I mention the LED is flashing, is that not a sign the bootloader is on there? A blank AVR chip would not flash an LED, but maybe it is a corrupt/old bootloader?
avr_fred:
Is the an official Arduino or a clone?
As far as I know it was purchased from Adafruit who are normally very reliable, but it was a long time ago. How can I check looking at the PCB?
Either way, I am on a research station in Antarctica and it is mid-winter so I won't be ordering a new one! I have been using a PIC and completed the project now, but thanks for your help. The F232R is being used to connect to the PIC, so I know that works and is good.
The LED may blink if there the blink sketch was uploaded with a Programmer (using the ICSP pins), and that wipes the bootloader, vs being loaded via the FTDI (using the serial pins). I have received boards that were set up that way.
I have an AVRISP mkII programmer and Atmel studio installed. I set this up on the ISP pins. The Atmel Studio Device Programmer verified it was a ATmega168P and that the voltage was 5V.
First I checked, is there a bootloader? Yes, there was one, but it is different from the new one. So I uploaded this bootloader:
Atmel studio programmed the new bootloader successfully.
So I went back to Arduino IDE and tried again!
avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM11
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xad
Same error!
I tried swapping Rx and Tx pins and played around with baud rate (can someone confirm that 57600 is correct? There seems to be discussion about this changing on the avrdudes forum)
No luck!! What is going on?
[The board is from Spark Fun not Adafruit as I previously said. It is clearly printed on the back and I normally order from them.]
I am thinking baud rate or some other serial comms problem.
Baud rate should fit to bootloader. It is hard coded. If the bootloader was build 115200, you should use the same otherwise you can have such problem with similar symptoms.
You wrote that loopback test had passed but not clear for me about RESET signal (DTR). It must be. It is measurable with any DMM and also observable on the LED as flickering at bootloader start.
OK, to respond to @Budvar10 (with pictures this time to make it really clear)
The first picture is ascii lower case 'a' (01100001) being transmitted from a terminal emulator (no handshaking) at 57600 baud (T=17us). Everything works.
YES Budvar10, the CTS line is being set, but nearly a 1s before I see data. The second trace captures this.
The third picture shows the first two characters that the Arduino sends (very close together). It is 0010 0000 0011 0000 in binary or 20 30 in HEX.
I did notice something on this board. The voltage regulator is burnt out. If I put 4.1V into RAW pin I get 4.1 V at Vcc. I am now running it on a bench supply at Vcc = 3.3V but I guess the AVR's UART could have been damaged. ... IT'S A 5V board! Upping my input voltage to 6V gives 5V at Vcc as expected, so the board is not damaged. Exactly the same results are obtained.
My next test will be to program the UART via Atmel studio.
Finally, I do realise the firmware sets the baud rate. But this is not documented consistently. In the boards file supplied with Arduino IDE it is 57600 but you (Budvar10) say it should be 115200, as do others on the AVR forum. Anyone know what the current firmware actually is?
I have a Pro Mini 3.3V atmega168 that I just bootloaded and then loaded a Blink Sketch using an FTDI Basic-1
No problems using (3.3V, 8 MHz) w/ ATmega168.
Selected Arduino Pro or Pro Mini.
#include <asf.h>
#include <usart_mega.h>
#include <stdio.h>
int main (void)
{
/* Insert system clock initialization code here (sysclk_init()). */
uint32_t ch;
const usart_rs232_options_t usart_serial_options = {
.baudrate = USART_BAUD_9600,
.charlength = USART_CHSIZE_8BIT_gc,
.paritytype = USART_PMODE_DISABLED_gc,
.stopbits = false
};
sysclk_init();
/* Initialize the board. The board-specific conf_board.h file contains
* the configuration of the board initialization.
*/
board_init();
// Initialize Serial Interface using Stdio Library
usart_init_rs232(&USART0, &usart_serial_options);
usart_tx_enable(&USART0);
usart_rx_enable(&USART0);
// Print welcome message
//printf("\n\rHello ATMEL World!\n\r");
while(usart_putchar(&USART0, 'H') != STATUS_OK){}
// Get and echo a character forever.
while (true) {
ch = usart_get(&USART0);
//scanf("%c",(char*)&ch);
if (ch) {
while(usart_putchar(&USART0, 'R') != STATUS_OK) {};while(usart_putchar(&USART0, ch) != STATUS_OK) {};
//printf("RX:%c",(char)ch);
}
}
}
ASF is configured to use the UART. I tried both STDIO methods and raw char puts. Nothing is coming out the UART. I can only assume the UART is broken, or miswired.