RS232 with Arduino

Thread Starter

ChangeIsConstant

Joined Mar 26, 2015
16
The code is -
Code:
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600,SERIAL_8N2);
pinMode(0,INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
while (Serial.available()) {
  Serial.println(Serial.read(),HEX);
  }
}
 

Thread Starter

ChangeIsConstant

Joined Mar 26, 2015
16
When the input is connected to pin 0, I get the following errors while uploading the code -
Code:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x01
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
 

MrChips

Joined Oct 2, 2009
30,806
You have to backup. We cannot see what you are doing.
Do you have a digital camera? Show us a sharp well focused photograph of the cable from the scale to the first circuit that it is connected to.
 

Thread Starter

ChangeIsConstant

Joined Mar 26, 2015
16
You have to backup. We cannot see what you are doing.
Do you have a digital camera? Show us a sharp well focused photograph of the cable from the scale to the first circuit that it is connected to.
I am attaching 2 images (sadly taken only from my mobile phone since that is the only thing available) of the circuit - the cable, MAX232 to arduino.
 

Attachments

MrChips

Joined Oct 2, 2009
30,806
There should be a capacitor +ve lead connected to pin-2. Is the -ve lead connected to GND?

You show a 5th capacitor. Where are its leads connected?
 
Top