Go Down

Topic: ArduinoISP on serial rs232 (Read 2 times) previous topic - next topic

FigZ

I want to build my own programmer using a 328P running the arduinoISP sketch, and rs232 to hook it up to the computer
I want to use the arduino IDE to program the target (using the menu entry "upload with programmer")

I gave this idea a try on a breadboard and it doesnt seem to work - "avrdude: usbdev_open(): did not find any USB device "usb"

Did anyone try this idea, and get good results? Or does the arduinoISP sketch only work via usb?

Some more details for those that are still reading:
Mac Running IDE 103, arduinoISP sketch is the adafruit version (works on an Uno board)
selected the correct board, selected the correct serial port, selected arduinoISP
I verified the serial communication is working (9600 baud with another sketch)
Hardware is shown on http://avrprogrammers.com/bld-avr-arduino-isp-232.php

Why do I want to do this?
rs232 allows for longer cables than usb, and you can easely solder the connectors yourself. I need to bridge some distance between the computer and the arduino/328P modules i want to (re)program

johnwasser

Very strange.  From the error message it appears that programmer selected is one with ".communication=usb" and not the "Arduino as ISP" which has "arduinoisp.communication=serial".  I don't know how to explain that.  Perhaps you should try turning on verbose uploading messages and posting the messages you get.  That would show the full command line presented to avrdude.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Nick Gammon

What you could do is get a FTDI cable, plug that into your Mac, and then take the (TTL level) RS232 output, and run that down to your board's Tx/Rx pins (and reset, etc.). For a really long cable run, put some RS485 chips at each end to convert the signal to balanced (one each for Tx/Rx and probably Reset as well).

Nick Gammon

Like this, except with a longer cable run:


FigZ

I think my setup is not too far off from this ...

On the mac side I use a usb to serial converter based on the prolific 2303 chipset - this is true rs232

On the arduino programmer side I use a max232 chip to convert to ttl level

So far I have not figured out the reset trick with rts - (My max232 chip doesnt have the connection for that) - but I don't think I need to in my case?

As the arduino/328p modules are low level battery powered, and I don't want to risk damaging components (nRF24l01 wireless module - to name one) that are not meant for 5v, I want to use a programmer to (re)program. I plan to make the programmer battery powered and switchable between 3,3v and 5v. This way I can have a long cable run. (tested 20m between this pl2303 and a siemens logo and that worked flawless)

There is more coming, but for now, I want to get the basics working.
I am going to go over everything again, double check connections, probably some minor detail.

But from what I read here, I'm pretty certain my idea is feasable
thank you for the feedback

If anyone is interested in my progress, I'm happy to share

Go Up