Cant get sketches to upload on custom board...(used optiloader for bootloader)

After a long thread in another section.. that morphed in to help on getting the board to upload a sketch.. I figured move it to here for better coverage and appropriate organization.

Summary.. I have a SCAB board. (Some Custom Arduino Board)....<---wakka wakka wakka.. :slight_smile:

that was designed...

pcb's order..

I got all resources.. assembled using solder paste, paste stencil. and toaster oven to re-flow:

here is finished board:

After re-position a component correctly.. (buffer chip was 180 degree rotated)

I had tried to get a bootloader on it.. (and found I had some bridges).. those were fixed as well..

And I used Optiloader 4.4 (I think) to finally get a bootloader flashed to my chip to be able to upload sketches..

(side question, what is the difference between optiloader & optiboot I see around here?)

Here is my results, from Optiloader 4.4:

OptiLoader Bootstrap programmer.
2011 by Bill Westfield (WestfW)

Target power on! ...Starting Program Mode [OK]

Reading signature:950F
Searching for image...
Found "optiboot_atmega328.hex" for atmega328
Start address at 7E00
Total bytes read: 502

Setting fuses for programming
Lock: 3F FFE000 Low: FF FFA000 High: DE FFA800 Ext: 5 FFA400

Programming bootloader: 512 bytes at 0x3F00
Commit Page: 3F00:3F00
Commit Page: 3F40:3F40
Commit Page: 3F80:3F80
Commit Page: 3FC0:3FC0

Restoring normal fuses
Lock: 2F FFE000

Target power OFF!

Type 'G' or hit RESET for next chip

Which I was told me success. (thank god)..

My SCAB (arduino based circuit).. does NOT have the RESET pin broken out.. only the DTR pin.. (making the bootloader part a bit hard to hold a wire on the REST pin manually)

Anyways.. moving on...

I wanted to use my hacked FTDI cable.. (2302 pro-lific..usb/serial) cable....

Which I cut open.. soldered on new leads... bring out 5v+, GND, RX, TX... (there was no RESET or DTR that I could find to break out/use)

I heatshrunk it all up....etc.. (make a legend/map of the pins/color)...

I have have used it with standalone Arduino circuits in breadboards before.. no problem. however, in those projects.. they all have the RESET switch, that I manually press when the text display in the Arduino IDE.. to reset bootloader and take uploaing sketch.

this SCAB board.. is not a breadboard.. is a pcb.. with no RESET switch.

I feel I have tried almost EVERYTHING I can think of and suggested to reset this board..ad get it to take the sketch appropriately.

I have tried the following:

1.) tried to short/bridge/jumper the DTR pin to GND pin (right next to each other).. using jumper wires.. and a momentary switch.

I have also tried it while shorting/jumpering the cap for DRT/reset as well.

holding the switch DOWN until I see the IDE text display.. and letting go..
as well as just my old approach of hitting the button only when I see the text displayed in the IDE

2.) I have tried installing a switch/jumper wire between the RESET pin directly on the Atmega chip..and GND.. between the reset resistor...

*this at least gives me the 'red light' blinking.. like the board was 'reset' (only blinks like once/twice though..not like uploading a sketch blinking)...etc.. but no sketch gets uploaded..

I am stuck...and am not sure what I can do to either check other aspects.. or alternate approaches to try getting a darn sketch uploaded to this board.

I started to think maybe getting a retail FTDI cable would be best...'but' the DTR pin doesnt seem to do ANYTHING when grounded..... and there is no RESET pin broken out (accidental error/oversight on the schematic/pcb developer I guess.. and too late now, cause I already have PCB's made an din hand!) LOL

So if anyone has some suggestions on how I try to over come this obstacle.. I appreciate it.

Thanks

being bored/desperate..

I took out my meter again and started testing the main Atmega chip pins (its sodered to the board) for continuity..

Im not sure if this is a 'real' way to do so?..being as it 'part' of a circuit..

but some pins.. -do- show continuity "IF" I have the probes in a certain order (black on pinA.. red on pinB).. if I flip the probes (black on pinB.... red on pinA..) it shows NO continuity...??

I think Crossroads mentioned something about that being 'normal'.... if it was a 'true' bridge.. it would show either way.

(still dont understand why ONE way out though??)

just trying to talk it out..

anybody around? or got some suggestions?

Thanks

Might make sense if there's a diode in the circuitry between pins.

I'm a little confused by your description. So, you have an FTDI chip on your board...? And you're taking the DTR pin from that to the AVR via a jumper wire between your pull-up resistor and the pin, right?

no FTDI chip on the board...

its on the 'usb/FTDI' cable...

there is a diode. (1)..... at the Vin area

Also.. to be clear.. my cable has NO RESET OR DTR pin/wire to use.. my cable ONLY has 4 wires.

GND
5v+
TX
RX

NO RESET or DTR pin to use on the cable..

I have used this cable many times before.. on a standalone BREADBOARD set-up.. flashes all my DIP style chips fine..

this is my FIRST Atmega 328QTFN chip Ive ever used.. and this is already asemebeld..on a PCB (pictured above.. that IS the board Im using... trying to upload sketches too).

I am taking the DTR pin ON the board... and the GND (on the board.. next I/O pin to the DTR pin).. and have those both going to a mom switch.

but it seems to do NOTHING!..

I then take SAME switch.. using same GND I/O pad..... but using the RESET pin directly on the Atmega chip...

(when I press the button.. I do see red led flash 2 times..etc).. but never accepts the sketch?

sorry.. hope that makes it more clear??

anyone got some suggestions? :slight_smile:

thanks

I think you're confusing people by saying DTR pin on the board. The DTR pin would be on your FTDI cable/board. The DTR pin generates the reset signal which is connected to the reset pin on the Atmega board. If you, in fact, do have a DTR pin on your custom board then you need to tell us what it's connected too. Posting a schematic would make it easier for people to help you.

What I would do, if I were in your shoes, is try and solder a very small wire directly to the Atmega reset pin (it's not that difficult) so you have the reset pin broken out to continue troubleshooting. Also since your Arduino is a 2009 Duem. it's fairly easy to pull the chip out of it's socket. Then simply connect the Rx's, Tx's and RESET'S (along with ground) between the two boards and upload your sketch as you normally would. This would at least tell you if the problem lies within your custom board.

The board has an I/O pin broken out label DTR.. for use with flashing?

which is connected to a cap/resistor/reset pin on Atmega..

and

sorry for confusion.. quite new,, and not sure how to explain it best I guess.

(when i use this same DIY cable with only GND, 5v+, RX, TX).. for breadboard/standalone Arduino for DIP.. it works fine... this is my first time with a custom board like this.)

I can 'tap' the RESET wire directly on the board.. (which gives me the blinking red light like its resetting)..

I have not tried to flash through my Arduino Due 2009! thanks for suggestion another approach to try..

I'll try it in 30 minutes closer to lunch :wink:

Well that makes more sense, the DTR is connected to the Atmega via the cap just like on other boards. Since you're seeing the flashing LED after grounding the DTR pin it's safe to say there are probably no shorts on the reset pin. If connecting the RX, TX and RESET from the Duem don't work then you may want to look for shorts on your Rx and Tx lines.

HI..

I 'do not' get f;lashing lights when grounding the DTR...

only when going to RESET pin directly on chip... (since it isnt broken out.. I use a jumper.. or mom switch...etc)

between the RESET pin and RESISTOR

CRAP!>

I dont know what is going on...

I assembled another board today while at work..LOL (slow day.. brought my toaster oven in and my stencil..etc)

made another board.. might have bake it a 'bit' too long.. as I see some of the silk screen just 'starting' to turn yellow.. (darker than first board a bit).. but still looks good. better than original board I migght even say..

tested continuity around chip.. didnt find anything.

however CAN NOT BURN bootloader..etc..

I found a strange occurrence.. maybe you can help shed some light on..

I made a little header for the pin D11, D12, D13, 5v+ & GND.. I/O pins..

I put all pins in except the GND pin on the custom board ot the Arduino GND... before I do that GND pin.. I already see power lighton my custom board come on?? WTF? how can I be getting power without GND plugged in?

so I tracked it down to PIN D13?? if I take than pin OUT.. power on my custom board goes off.. I plug in GND wire.. power comes back.. I take out GND.. and putin D13 wire again. powr on my custom board come back on?

what is messed up? what is grounding out? on D13 and power on my board??

any ideas?

also.. I tried to remove chip and program custom board #1 directly.. no go.. so I guess I have some physical problems.

anyone wanna try to trouble shoot it?

also any ideas on custom board #2/ why power is on when 5v+ is connected and D13? (but not GND wire?)