The ISP function requires 3.3v logic levels for serial transmit, receive, reset (active low), and the P0.14 line that enables the boot loader when held low for a few ms after a reset.
This can be wired up to a PC RS232 port, with appropriate level shifting. For those who don't want to include an RS232/line driver in their board, it makes sense to have a little header where one can plug in a small adapter that has the line drivers for connection to a PC.
We've tentatively agreed upon using a 0.1" male header of 8 pins in two rows, with the following layout (when viewed from above):
| 1 | n/c | 0v | 2 |
| 3 | /RST | RxD | 4 |
| 5 | /ISP | TxD | 6 |
| 7 | 3.3v | key | 8 |
The 'key' is a missing pin on the header - and a corresponding filled in hole in the female plug, to make sure one cannot insert it wrongly and unleash the magic smoke from within one's circuit.
Notes:
I don't want to kibitz, but wouldn't it be useful to give the pins numbers? I know it is polarized, but if you don't give numbers in your standard, people are likely to number it themselves and end up with different numbering. It won't affect the connections electrially, but it can create some confusion. My suggestion would be to make n/c pin 1, the key pin 8 and to number 1, 2, 3... in a zigzag pattern, not like a DIP. That matches wires in a ribbon cable. rickman
Agreed! Then when a ribbon cable is connected, one can use the nice red strip to align the connector to the board rather than having to look for the key, too. Alaric
As long as we are making suggestions :) I would move the 3.3 volt power from pin 7 to pin 1. That way if you do accidently connect the plug backwards (no stuffed hole on the connector and you don't look at the pin 1 mark) you won't get smoke, since the power will be connected to the key pin which is missing! rickman
I thought about his a bit more and realized that some people might not like having 3.3 volts next to gnd in the cable and on the header pins. So maybe it would be better to move 3.3 volts to pin 1, but move gnd (0v) to pin 7. You could still apply power reversed, but you would have to have the connector backwards *and* plug it on one row offset! Any thoughts? rickman
So We end up with
| 1 | 3.3V | n/c | 2 |
| 3 | /RST | RxD | 4 |
| 5 | /ISP | TxD | 6 |
| 7 | 0v | key | 8 |
I gave it some more thought and I realized the some people who design very small and crowded boards (like me) might want to forgo the key and go for a 6 pin connector. To make the pinout compatible with the safer, 8 pin keyed version, I came up with this.
| 1 | 3.3V | /RST | 2 |
| 3 | /ISP | RxD | 4 |
| 5 | 0v | TxD | 6 |
| 7 | n/c | key | 8 |
This is my final suggestion, I promise!
But please, I would like to hear from the rest of you. Anyone else have any ideas on what pinout is best?
rickman (the compulsive poster)