Pages: [1]   Go Down
Author Topic: Programming an arduino breadboard with rs232 module  (Read 796 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone, I'm new to this community and electronics.

I made, following this tutorial (http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard), a standalone arduino but I'm stuck in the programming part. I've got this module and connector:



My computer (Windows 7) recognizes the serial-usb connector as COM13, so when I make these connections:



VCC(module) - VCC(breadboard)
RX(module) - TX(pin 3 atmega8)
TX(module) - RX(pin 2 atmega8)
GND(module) - GND(breadboard)

And upload a blink sketch with the arduino IDE, it shows up this message: avrdude: stk500_getsync(): not in sync: resp=0xcc

[Arduino IDE board: Arduino NG, Serial Port: COM13]

How do I upload the code to the arduino breadboard(atmega8 with bootloader)?

Cheers.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Before you can upload a program via serial, you need to have a bootloader on the mcu and have the fuses correctly set. You can either buy an mcu with the bootloader already installed, or use the mcu removed from a working Arduino, or you can program a bootloader on to a blank mcu using an ICSP (in-circuit serial programmer). You can use an Arduino as an ICSP.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Full Member
***
Karma: 0
Posts: 109
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have an Arduino Uno you can use it as programmer for your blank AVR:
see this tutorial: http://pdp11.byethost12.com/AVR/ArduinoAsProgrammer.htm
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17253
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First thing to do is a simple loop-back test of the RS-232 module to see if it's functioning. Disconnect it from your arduino pins and jumper the TX and RX pins on the module. Open the arduino IDE, select com port 13, and then open the serial monitor on the IDE. Anything you type on the serial monitor and send should echo back the same. If that works then it's probably just a naming convention that is tripping you up. Sometime a serial converter modules names it's signals from the users point of view not it's own point of view.

This of course assumes you have a bootloader on your AVR chip, and that you know how to properly time a manual reset button on your breadboard when you attempt to upload to it. If not ask how.

So instead of this:

Quote
VCC(module) - VCC(breadboard)
RX(module) - TX(pin 3 atmega8)
TX(module) - RX(pin 2 atmega8)
GND(module) - GND(breadboard)

Do this:

Quote
VCC(module) - VCC(breadboard)
RX(module) - RX(pin 2 atmega8)
TX(module) - TX(pin 3 atmega8)
GND(module) - GND(breadboard)

Report back, and good luck.

Lefty
« Last Edit: December 12, 2012, 08:36:33 pm by retrolefty » Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 65
Posts: 2442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The picture is small and hard to see but assuming your MCU has a bootloader and the fuses are set right, do you have a pull-up resistor connected between reset pin (1) and VCC. Do you use auto reset feature for uploading sketches? If so then do you have a small capacitor connected between reset pin and the RS232 DTR pin. If your not using auto reset then you need to press the reset button at just the right time to invoke the bootloader while uploading your sketch.
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1024
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

WHen first working with a device like the serial board you show it is convenient to have a program preloded in the 328 chip that constantly outputs to the serial port. That way when you hook it up you have a way to get the transmit and recieve wires sorted out. If you hook it up and the PC is able to recieve data you probably have things hooked up correctly.
Logged

Pages: [1]   Go Up
Jump to: