Optiboot with FTDI breakout removed

Can you provide a link to this Arduino-type board? Or if you built it, a schematic?

Reply to TIM7

I am using SoftwareSerial to connect to a serial LCD (PHA #117). RX=2, TX=3

  1. Digital pins 0,1 free
  2. Version of optiboot. Used ArduinoISP and set board to UNO on Arduino IDE 1.0 (Optiboot 4.4?)
  3. Blink download works with FTDI breakout removed. Breakout is BUB2 from Modern Device.
  4. Back to serial LCD. Fail after power on
  5. Fail after reset
  6. Fail with pin 0 grounded
  7. On reset or power on,led on 13 blinks three times always

As to the board, it is my design for use with a solderless breadboard. It is identical to Arduino, but with a removable FTDI breakout. It is similar to BBB from Modern Device. Nothing magic. I will upload images once I figure out how on this forum.

So does the Blink sketch run properly after reset with the FTDI removed?

One more note.

I switched to hardware serial. Connected serial LCD to pin 1. Failed in same way.

Blink works fine with FTDI removed. No problem.

I have another project using a LCD and DS1307. Code uses LiquidCrystal library, but no serial libraries. This works fine with FTDI removed.

Schematic

The problem is fixed. Why it works I do not know. I decided that the serial code, whether hard or soft, must be interfering with the boot code. I added a half second delay right at the beginning of the code and now it works from reset or power on reset.

I do not know how Optiboot works; though, I do know how Tinyboot for the PIC works. After reset,the boot waits for serial download code for a second or so and if there is none it jumps to the code already in memory.

It does sound more like the hang is happening in your code, and not in Optiboot. If you'd care to post it somebody might be able to find the reason.

Hi,
I have a similar problem, but with a different board. [arduino mini 04 with atmega 328]. pls chk this post and let me know if someone has a solution. thank you.

http://arduino.cc/forum/index.php/topic,117632.0.html [chk the last post]

Here is the code. It sends "Temperature" and then "76.8" repeatedly to a serial LCD display. This code was simply to test the serial LCD (PH Anderson #117) which I found erratic. I am now using a design of my own using a PIC 18F886 which works. As I said the initial delay(500) works.

#include <SoftwareSerial.h>
#define txPin 3
SoftwareSerial SLCD = SoftwareSerial(2,txPin); //
int bauderate=9600;

void setup() {
delay(500);
pinMode(txPin,OUTPUT);
SLCD.begin(bauderate);
SLCD.print("?f"); //clear screen
SLCD.print("Temperature");
}

void loop() {
SLCD.print("?y1");
SLCD.print("?x05"); //position cursor to x=4 y=0
SLCD.print("76.8"); //display temperature
delay(5000);
}

I took your sketch, commented out the initial delay, and put it on a 16MHz Arduino Pro (essentially just an ATmega328 with a crystal and power supply). With the FTDI interface connected or disconnected I couldn't get the sketch to fail -- it ran fine after a power-on reset or an external reset. So I'm afraid I don't know what was causing the symptoms you describe.

What happens if you add a pullup (or pulldown) resistor to D0 ?

after a timeout period, if [optiboot] sees none, it should jump to the already loaded code.

That's how it's supposed to work. That's how it DOES work, for the vast majority of cases. Actually, on powerup it shouldn't even look for serial traffic ("adaboot fast start" hack.) I am not able to come up with a hypothesis on why your board is behaving differently :frowning:

We'll leave it for now. I will shorten the delay and find minimum.

I worked on old mainframes and way back to 8085s and I have chased many, what we called, gremlins that made no sense. Maybe others will see a similar problem and in time it will make sense.

Thanks for taking a look at the problem.

I see that the Arduino Pro uses a resonator and mine a crystal. The frequency difference may make it work. I have several unpopulated pcbs so I may assemble one and use a resonator.

A delay of 110 milliseconds resulted in failure. I have set it to delay(150).

TIM7, without a serial LCD how did you know the code was working on the Arduino Pro?

Oscilloscope on pin 3

OK, I'm an idiot.

It is not the Optiboot that is the problem but the serial LCD. The LCD on power up or reset goes thru a startup sequence. Sending characters to it before the sequence completes ends in hangup. I need the delay for that reason. I should have known that because I wrote the serial LCD code, though it was 2 years ago.

The Optiboot is fine.

Ah hah! Thanks for the update...

Doesn't the PHA LCD#117 serial display 'backpack' use a PIC16F1827? I have several of the kits, unused because I found a Much better one from Liudr here in the forum. Liudr's "Backpack" will handle a 4 X 4 Keypad, and a sounder or buzzer too any configuration of LCD can be handled too I've used them on 2 X 16 to 4 X 20 and a few odd ones too. Much better product. I have 2 or 3 of the PCB's and 3 Kits, all unused that I will never use as they really don't give much "Bang for the Buck". I'll probably donate them to a tech school that can use them.

Doc

The #117 has a beeper connection and a command that works.

I have found that the #117 is erratic at 9600 baude and a emulation I wrote for the PIC 16F886 works fine. I expect the Atmega328P should work also.

Ultimately, I will use this serialLCD in a process controller.

I have looked at the product you mentioned, but the info he provides is sketchy and I don't wish to buy one to determine how well it works.