Author Topic: ATmega8 with arduino as ISP programming issues...  (Read 72475 times)

0 Members and 1 Guest are viewing this topic.

Offline GabYoung92Topic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: au
Re: ATmega8 with arduino as ISP programming issues...
« Reply #100 on: July 20, 2012, 11:24:41 am »
Cool! Thanks!  No probs wiring up an external source.

Bummer!  I'll have to pick up some more 1k resistors at work tomorrow.  And hopefully I can use a 2n3904 instead of the 2n3903.

Readinghttp://denki.world3.net/avr_rescue.html I will make sure I connect everything up, and I'll probably make a shield.
 

Offline LEECH666

  • Frequent Contributor
  • **
  • Posts: 398
  • Country: de
Re: ATmega8 with arduino as ISP programming issues...
« Reply #101 on: July 20, 2012, 11:36:24 am »
I think that transistor is just there to switch on/off the 12V volts, so probably any small signal jelly bean NPN transistor will do. The 2N3904 seems to belong to the same family of transistor as the 2N3903, so it should be fine.

Those 1K resistors are most likely there for protection (current limit) of the connected device and the Arduino. In the later versions of the HV shield those resistors are omitted. I think he even said so in his blog. Can't be bothered to look where he wrote that tho. ;)

In general I'd say you can omit them too or replace them with a similar value (470R to 3K or smth like that). It probably doesn't really matter.

Also take note that this is not a fully fledged programmer, it's just there to fix bad fuses. It doesn't seem to support writing to the flash memory, just the lfuse, hfuse and efuse area. I don't know if efuse memory area is included in the older version of the shield.

Cheers, Florian
 

Offline LEECH666

  • Frequent Contributor
  • **
  • Posts: 398
  • Country: de
Re: ATmega8 with arduino as ISP programming issues...
« Reply #102 on: July 20, 2012, 12:26:30 pm »
I really really like this programmer because it can programm a lot of AVRs and a lot of PICs too. I plan to build it some day. But so far I haven't found the time to do so, as I plan to do my own PCB of this programmer.

http://home.arcor.de/bernhard.michelis/index.html

Cheers,
Florian
 

Offline bsiswoyo

  • Newbie
  • Posts: 7
  • Country: id
    • Bambang Siswoyo
Re: ATmega8 with arduino as ISP programming issues...
« Reply #103 on: July 23, 2012, 04:16:38 pm »
Dear,
I have had success using the ATmega 8 as the Handmade Arduino. However, the program can succesfully be uploaded using ISP with the Arduino IDE ver. 0.22.

Also if you make the ATmega 328 Arduino is uploaded using a USB-Serial-to-TTL in the Arduino 1.0.1 environment. You must modify the boards.txt file with nano328.upload.protocol=stk500.

The completely informations visit:
http://bsiswoyo.lecture.ub.ac.id/2012/07/arduino-1-0-1-serial-upload-using-with-handmade-board-of-atmega328/

best regard
bambang siswoyo
Bambang Siswoyo
 

Offline GabYoung92Topic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: au
Re: ATmega8 with arduino as ISP programming issues...
« Reply #104 on: July 28, 2012, 11:48:02 am »
Great success! 

The 16MHz crystals arrived, and now I can read the signature no problem.  I can't reprogram the chip once I've programmed it.  However, if I use avrdude to erase the chip I can reprogram the device. 

Program using arduino --> Erase using avrdude --> reprogram using arduino.   No problems!

My DSO also arrived so checking a 500Hz output pulse is spot on, and a 100KHz shows 100.038KHz on the ds1052e counter. 

 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: ATmega8 with arduino as ISP programming issues...
« Reply #105 on: July 28, 2012, 06:17:30 pm »
It sounds like something is wrong with the fuse settings still since you have to erase before programming.

I just looked at the fuse settings again from your earlier post and notice something interesting.

Here's the fuse settings you seem to be using...

Quote
atmega8u.bootloader.low_fuses=0xe4
atmega8u.bootloader.high_fuses=0xc2

The CKSEL[3..0] bits are set to 0100, which selects the internal 8 MHz oscillator.  However, the CKOPT fuse is programmed (set to 0.)

The datasheet (page 30) has this to say about that particular combination...

Quote
The calibrated internal RC Oscillator provides a fixed 1.0MHz, 2.0MHz, 4.0MHz, or 8.0MHz clock. All frequencies are nominal values at 5V and 25°C. This clock may be selected as the system clock by programming the CKSEL Fuses as shown in Table 9. If selected, it will operate with no external components. The CKOPT Fuse should always be unprogrammed when using this clock option.

Take special note of that last sentence.

I wonder if that's causing the problem?
 

Offline GabYoung92Topic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: au
Re: ATmega8 with arduino as ISP programming issues...
« Reply #106 on: July 28, 2012, 11:38:14 pm »
Before the previous post, I wrote new fuse settings using avrdude which worked, and I had modified my boards.txt file to include the new fuse settings

Code: [Select]
atmega8u.name=ATmega8 - External 16MHz crystal

atmega8u.upload.protocol=arduino
atmega8u.upload.maximum_size=7168
atmega8u.upload.speed=19200

atmega8u.bootloader.low_fuses=0xFF
atmega8u.bootloader.high_fuses=0xC9
atmega8u.bootloader.path=atmega8_noxtal
atmega8u.bootloader.file=ATmegaBOOT.hex
atmega8u.bootloader.unlock_bits=0x3F
atmega8u.bootloader.lock_bits=0x0F

atmega8u.build.mcu=atmega8
atmega8u.build.f_cpu=16000000L
atmega8u.build.core=arduino
atmega8u.build.variant=standard

I was using the website to 'calculate' the fuse settings, plus I was reading up on threads where atmega8's fuse settings were the topic. 

I don't mind having to erase the chip, as once I get my pcb made, the chip will be placed in and left in.   I'm making a volt meter for a linear psu I've built. 
« Last Edit: July 28, 2012, 11:44:23 pm by GabYoung92 »
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: ATmega8 with arduino as ISP programming issues...
« Reply #107 on: July 29, 2012, 12:06:27 am »
Yep, I hear you.  I'm sure you're happy to have it working again and glad you didn't completely brick the MCU.
 

Offline GabYoung92Topic starter

  • Regular Contributor
  • *
  • Posts: 138
  • Country: au
Re: ATmega8 with arduino as ISP programming issues...
« Reply #108 on: July 29, 2012, 12:15:51 am »
Yep, I hear you.  I'm sure you're happy to have it working again and glad you didn't completely brick the MCU.

Yup, this shows me how arduino has simplified microcontrollers.  Thanks for all of your help.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf