Using arduino as isp

Hello, I just completed building my severino and need to program it. But for some time I want to use it without the bootloader. I there some way I can use my existing arduino as ISP but to load normal programs and not the bootloader.

All the info I could find to use arduino as ISP was about loading the bootloader.

Create a 'boards.txt' entry for your board and add the line severino.upload.using=arduinoisp (the default upload.using=bootloader is in preferences.txt).

Ok. I will just try that out. Thanks :slight_smile:

You might want to look at my blog entry Prototyping small embedded projects with Arduino | David Crocker's Solutions blog and treat your Severino as the target hardware.

dc42:
You might want to look at my blog entry Prototyping small embedded projects with Arduino | David Crocker's Solutions blog and treat your Severino as the target hardware.

Thanks a ton.. All the details that I needed :slight_smile: :slight_smile: :slight_smile:

Many many thanks to both of you my severino is up and running :slight_smile:

dc42, I want to specially thank you for answering all my questions in different threads.

One last thing, First I programmed the bootlaoder in the severino using my UNO, then because I didn't have a serial cable I burned "blinky" using the ICSP pins with the same configuration as for installing the bootloader.

I suppose this would have overwritten the bootloader and I will have to write it again. Am I right?

mohitdaksh:
Many many thanks to both of you my severino is up and running :slight_smile:

dc42, I want to specially thank you for answering all my questions in different threads.

I'm glad I was able to help.

mohitdaksh:
One last thing, First I programmed the bootlaoder in the severino using my UNO, then because I didn't have a serial cable I burned "blinky" using the ICSP pins with the same configuration as for installing the bootloader.

I suppose this would have overwritten the bootloader and I will have to write it again. Am I right?

Yes, I believe that is the case.

Ok. This is embarrassing but it seems like my troubles have not yet ended. I burned the bootloader again. Then I tried to upload a sketch with a serial cable and the following error was recieved

avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Uploading with UNO is working fine but serial upload isn't

  1. Did you remember to revert the "upload.using=" line to "bootloader", change the board type to "severino", and change the com port number?

[EDIT: also to set JP0 and JP4 to enable serial comms and auto-reset]

  1. Making sense of avrdude output can be difficult. I'd test the serial port first. Write a sketch that writes data to the serial port and program it into the Severino, and use the serial monitor to check you can read the data correctly. Then try reading and echoing data as well in your sketch.
  1. Instead of changing the preferences file I created two entries in the boards.txt, One to use UNO as ISP where in upload.using parameter as arduinoisp, and another to use bootloader where upload.using has bootloader. I used the board while programming accordingly.

  2. I will do that. I also doubt my serial port as I have never used it before.

The jumpers are in correct position.

I will update you as soon as I try it. :slight_smile:

Still no luck, I tried programs which transmit and receive but non worked.
But I noticed a few things.
First, the Tx and power LED turn on whenever I connect to the serial port without any other power supply. This means it are not completely broke.
After connecting to one of the two serial ports when I try to see the serial monitor output of the corresponding port nothing shows up but as soon as I close the serial monitor the power and Tx LEDs turn off. When I again click on serial monitor they glow again and so on.

Can it happen due to using two back to back polar electrolytics instead of the non polar 10uF capacitor that was used in the RS232 to TTL conversion circuit?

The back-to-back electrolytics should not be causing that problem, however if you have a multimeter, check the voltage on the non-ground side of that capacitor. It should be about -10v when you have a serial cable connecting the severino to a PC. If it isn't, check the cable. I don't know whether the Severino is designed to be used with a straight-through cable or a null modem cable, but the manual should tell you.

Remember to set the baud rate of the serial monitor to match your Serial.begin() call.

Like I said earlier TX and power LED turn on when serial monitor is active and turn off when inactive.

So, when the serial monitor is ON and the LEDs are glowing the potential difference between the non ground cap leg and ground comes around -12.85V and when the serial monitor and the LEDs are OFF the voltage is around -7.4V. I am going through the board again to see if any wrong connections have been made by mistake.

I checked the cable yesterday to see if its at fault but all the connections are working fine and there are no shorts.
And the serial rate is same is as the rate in serial monitor.

One more thing I will try to see now, I will find some friends computer and see if it works there although I suspect now that serial port is fine because of LEDs glowing when I ope the serial monitor.

One more thing that may be relevant, I uploaded the bootloader that was designed for NG as I am using atmega8. Do I need to ( or Can I ) load optiboot?

Dont worry about whether you have the right bootloader until you have the serial port working.

Confirm you are powering the board with +5v? (or more via the regulator). You can't power the board through the serial cable - it's not like the USB port of the Uno. The fact that the power led comes on if you connect the serial port with no other power applied is just an artefact of the design (you'll find it is not full brightness) - it doesn't mean that the mcu is getting enough power to run. The Tx led should be off when you apply +5v to the board, except when the mcu is sending data. Try uploading a program that transmits a few characters every second or two, to see if you get regular flashes.

If you try to use the serial monitor to send data to the board, does the Rx led flash?

I can't see any reason why it should make any difference to the leds and voltage whether the serial monitor is active or not, unless you have a short between some of the connector pins or in the cable, or the cable is incorrectly wired, or C4 is shorted.

I feel like slapping myself but the orientation in which I kept the serial cable while soldering was such that I connected wires in the opposite order.
I am very embarrassed that I waste so much of your time because of my stupidity.

Now that error has gone and this has come avrdude: stk500_recv(): programmer is not responding

progress..uh?

So you have tested the serial port and it works in both directions? Do you have the auto reset enabled?

Its not exactly working. When I tried to run a sketch that was supposed to transmitted Hello World I got "He" and some gibberish. Rx hasn't worked till now. Auto Reset jumper is in place.

This is my severino's boards.txt portion that should work with bootloader. If it has something to do with it.

severinoboot.name=Severino S3V3 using bootloader
severinoboot.upload.using=bootloader
severinoboot.upload.protocol=stk500
severinoboot.upload.maximum_size=32256
severinoboot.upload.speed=19200

severinoboot.bootloader.low_fuses=0xdf
severinoboot.bootloader.high_fuses=0xca

severinoboot.bootloader.path=atmega8
severinoboot.bootloader.file=ATmegaBOOT.hex
severinoboot.bootloader.unlock_bits=0x3F
severinoboot.bootloader.lock_bits=0x0F
severinoboot.build.mcu=atmega8
severinoboot.build.f_cpu=16000000L
severinoboot.build.core=arduino

Does the "Severino S3V3" mean that it's running on 3.3 Volts? If so you probably shouldn't be running it at 16 MHz. You need at about 3.8 Volts to run at 16 MHz. You can easily run at 8 MHz which only requires about 2.4 Volts.

To determine required voltage: Take the desired clock speed (between 4 and 20 MHz), add 6.665 MHz and divide by 5.925 MHz/Volt to get Volts.

No it was written just like that. I am running on 9 V.
s3v3 == serial single sided board version 3