new factory atmega 328p programming over serial

hello friends !!!

i provided a few bluetooth articles related to linvor based bt-modules :slight_smile:

now i need your help ... i'm and arm7 hw / fw guy and new to the atmega328p TQFP32

i have designed a custom avr board and 3rd party firmware for it and try to load it using the serial channel with a provided bootloader GUI. the tool times out. i verified that the RxD signal reaches the CPU. the design does not have a designated debug connection setup like spi and reset sigs.

now i have the following questions.

i used a PBRC14.74MR50X000 ceramic resonator as the clock source, but see no clock signal on either clock pins upon power-up of a non programmed (new blank) cpu. am i supposed to see my 14.74 MHz clock signal even a blank cpu is on the board, assumed to run off the internal 8 MHz / 8 RC clock and maybe the ext osc is still disabled. sorry, i didn't read all the 100s of avr user manual pages.

does a, from digikey or mouser bought, atmega 328p contain any sort of factory bootloader.

if yes, what bootloader GUI front-end for either windows or linux is available to download the hex image. (i do not need to change fuses, the hex file works on an original board, not the one with my additional I/O hardware).

if any of the above failed, what's the Atmel approved sequence to get a hex image loaded into a new atmega 328p-au. regular production style firmware image load.

i really appreciate any help and will contribute again, once i get this board running with the bluetooth module and a simple android spp app ... more bluetooth docs and android source code samples to follow, but i need to get the image into this lovely cpu :slight_smile:

tx, tx, tx and cheers blue2u

p.s i feel pretty blue right now :frowning:

blue2u:
does a, from digikey or mouser bought, atmega 328p contain any sort of factory bootloader.

No. You should have an ICSP connector in your circuit. Use an ISP device to burn the bootloader and upload sketches.

The default clock is the internal calibrated 8MHz RC oscillator with a pre-scale of 8 giving you a factory clock of 1 MHz. The Burn Bootloader process sets the configuration fuses to select an external crystal oscillator.

The Arduino libraries only work properly with 8 MHz and 16 MHz (and close with 20 MHz) system clocks. Don't expect Serial I/O to work with a 14.74 MHz clock.

You need to be able to connect to the SPI pins to load anything to start (SCK, MISO, MOSI, Reset, and power/gnd).

Take a look at this part - it adapts an AVR ISP into a socket that slips over the TQFP microcontroller for programming it.

thanks guys ... this answered some of my important questions ... tx, tx, tx ...

i ordered the hobbyking part ... seems like i will need it ...

also ordered a USBASP USB AVR Programmer ... could get it from hongkong as well, but can't wait ... Illinois is closer than china in every respect.

http://stores.ebay.com/NooElec/_i.html?_nkw=USBASP+USB+AVR+Programmer&submit=Search&_sid=32165772

got an arduino osepp uno 3+ to play with in the meantime

now i'm back to my original still unanswered questions if allowed

  1. i used a PBRC14.74MR50X000 ceramic resonator as the clock source, but see no clock signal on either clock pins upon power-up of a non programmed (new blank) cpu. am i supposed to see my 14.74 MHz clock signal even a blank cpu is on the board, assumed to run off the internal 8 MHz / 8 RC clock and maybe the ext osc is still disabled. sorry, i didn't read all the 100s of avr user manual pages.

the firmware i have to load on this custom board has only the atmel328p-au chip in common with the adruino and the firmware works on the original board (non arduino). i'm puzzled that i do not see a clock on the clock pins on a new blank cpu chip ... is this correct since, what i assume, the cpu clock being driven by the internal rc oscillator ???

  1. the clock frequency being 14.74 MHz is not arduino standard, but so is the firmware and the custom board, so this should be a no issue.

more new questions, since i'm used to micro-controller firmware from scratch without "sketches"

how can i look at the flash (pgm and boot), ee-mem and fuses within the arduino ide environment, the light green framed window.

  1. i also loaded 2 USBASP gui apps ...

http://khazama.com/project/programmer/

and

they do not talk to my arduino :frowning:

i assume these programs only talk to the USBASP hardware or more precise firmware inside ... i have to wait until i get it in the mail ... is there a similar functionality available for the "uno" board including GUI.

4a) is there anything similar to the usbasp including the GUI available for the uno board to look at the on the uno board (on itself so to speak) memory ranges and maybe change it, except the bootloader

4b) is there anything similar to the usbasp including the GUI available for the uno board to look at a spi connected external atmega 328 board and to examine the mem sections and re-program

thanks in advance for more help ... as i said ... i'm new to the AVRs, and the program loading feels a lot different to what i was used to

cheers, blue2u

efiHacks.com and wiki.efiHacks.com

Until you program the fuses to use the external crystal, I don't think you will see any clock action.

Nick Gammon has neat tool for reading the fuses, check here.

other topics here