Go Down

Topic: Arduino Serial Communication over rx and tx pin ( pins 0 and 1 ) (Read 3466 times) previous topic - next topic

prashanth

Hi,
  Im trying to use the rx and tx pin to simulate and replace the USB port on my arduino UNO.. I am using the rx and tx pin of the arduino with a max232 IC.. Everything seems to work fine as i am able to get serial output from the arduino and even give serial input to the arduino. BUt when i try to upload code to the arduino using the same rx and tx pin , i get the not in sync error and the protocol error from the arduino IDE.
  I am powering the arduino from a 12v adapter and it works fine..The USB port is not used ( there is some problem with it ) . Any way on how to upload code to the arduino via the RX and TX pin?
Thanks..

NI$HANT

You need to Bypass the Firmware Loaded on the UNO's 8u2 Chip as the Loading into the ATmega happen's through it.
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

prashanth

Hi,
thanks for your reply.. Could you please guide me as to how i should go about doing this?

retrolefty

You are fighting an electrical conflict when trying to upload new sketches using the USB 8u2 on board serial converter chip and still being wired to your rs-232 convert chip. They are both wired to pins 0 & 1, thus the electrical conflict. Just disconnet the pins 0 and 1 wiring to your rs-232 chip and you will be able to upload from the PC, then reconnect the pins 0 and 1 wiring when done with the upload.

Lefty

prashanth

Well , its been over a month since my arduino stopped responding over USB for some reason.. I am able to send input to the arduino via USB ( serial connection) but not get output from the arduino. I was also not able to upload code to the arduino.. Im not sure why.. it randomly stopped working.. i guess that part is screwed up.. Which is why i thought i'd try using rx and tx pin to upload..
Thanks..

NI$HANT

#5
Mar 04, 2011, 06:33 pm Last Edit: Mar 04, 2011, 06:35 pm by Nishant Reason: 1
RetroLefty says right prashanth , it's a situation of DEAD-LOCK as it happen's in Software development when same resource is to be used by two elements at the same time.

Do you have a Serial Port on your System?
make a Stand-Alone Atmega circuit ,just get it out of the Arduino board and use the PONY-PROG and you are on, it's definitely going to work, but make a Serial programmer for AVR's first.
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

prashanth

hey..thats something similar to what im trying to do here http://arduino.cc/forum/index.php/topic,54190.0.html .. tried burning the atmega8 hex files on a seperate atmega8.. but i think i screwed up in the lock bits part.. and im not sure if i can burn a atmega168 hex file to an atmega8.im looking for a good tutorial to guide me to burn the RIGHT arduino boot hex file to an atmega8.. with the right lock and fuse bits using avr studio..
Thanks..

NI$HANT

If you are trying to load your Sketch/Software on to the ATmega8 then you can compile the Sketch using the different board setting that uses the ATmega8 Controller and burn it using the Following Fuse Bit's.
ATmega8: Use these fuse-bits and lock-bit.
hfuse = CA
lfuse = DF
unlock = 3F
lock = 0F

and you cannot burn bootloader's swapping them for other chips because the Siganture is Different and i'm not sure that will be accepted by the avr-gcc compiler.

Regards,
Nishant Sood
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

prashanth

thanks for your reply..so the fuse and lock bit settings are the same even if im burning a sketch's hex file or the bootloader's hex file?..the fuse and lock bit settings on this page for the atmega8 seem to be a little different http://www.arduino.cc/playground/Learning/Burn168 ..

Go Up