Good morning
I have a little issue with Serial comms using a MAX232CPE thats driving me nuts
I've etched a Arduino runtime board and tested the functionality over the last few days (Digital IO, ADC, Power, etc) and is quite happy with it. At the moment, I upload sketches by removing the Atmega328 and putting it in a proper arduino.
I do not have a FTDI cable, nor do I plan on buying one.
Instead, I want to use a 9 pin serial cable to a MAX232CPE to do the level shifting to D0 and D1.
I purchased the required components and built the circuit shown at http://www.urbanraven.com/pictures/sa/circuit_232.jpg
Initially, I could net get a Serial Echo sketch nor the serial Hello World to respond back to a terminal via the MAX232 (working fine when the same chip is in the proper arduino)
I made up a serial cable connecting PIN1 on PC side to PIN1 on DB9 at MAX232 side, PIN2 to PIN2, etc to PIN9 to PIN9. Ie straight serial cable.
From the diagram, Pin 2 and Pin 3 on the DB9 at the MAX232 side should be TX and RX.
Testing Loopback, I found that only once I short ping 3 and 4 do the loopback test work. So on the breadboard with the MAX232 I wired pin Pin4 on the DB9 to Pin 14 on the MAX232, and Pin 3 on the DB9 to Pin 13 on the MAX232
Arduino D0 goes to pin 12 and D1 to pin 11 on the MAX232.
At last, serial echo sketch sends back my keystrokes to 'gnu screen' and the Hello World and ADC test sketches send the data back over the MAX232 just fine.
Now the remaining problem is Uploading sketches - as removing the chip each time is not ideal:
Since my serial ports (on two different PCs now working with DB9 Serial port pin3/4 as TX/RW - so it's not the PC) pinout seems to not be per standard, I do not know which pin to use as DTR to wire the cap for auto reset.
-
Any ideas on why my serial port pinout differs? Wiring verified with DMM - no shorts, and pin1=pin1, pin2=pin2 etc. Or should I use some other cabling order at the other end of the serial cable?
-
Without Autoreset, manual reset should still work? I've tried several combinations of timing the press of the reset, but I either get Programmer is not responding or I get Protocol Error (not in Sync or something to that wording)
I have done all I can think of, and several hours on google for Serial Cable Pinout seems to indicate pin by pin matches on both ends except if you need to make a null modem cable (which swops pin 2 and 3 - so still not explaining why pin 3/4 works for me)
All wiring has been verified and as the sketches can talk serial back to the PC and PC can send serial to the Arduino it does verify the MAX232CPE wiring.
Any ideas? Would like the pinouts standardised before etching the MAX232 PCB and also would love to be able to upload sketches...
Regards
Peter
www.Itux.co.za