Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

AVR BASCOM ISP, Arduino vs breadboard, chip identify, desper

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
IGNACE

Bascom Member



Joined: 11 Sep 2014
Posts: 2

PostPosted: Sun Oct 26, 2014 10:51 am    Post subject: AVR BASCOM ISP, Arduino vs breadboard, chip identify, desper Reply with quote

DUTCH:
Ik gebruik een hardware ISP programmer (Diamex prog-S) en AVR BASOM om een Atmega te programmeren.
Wanneer ik een Arduino Uno (via ISP connenctor) gebruik, werkte alles perfect.
Wanneer ik een breadboard gebruik EN ik gebruik de originele Atmega328P van het Arduino board, dan werkt alles eveneens perfect.
Als ik op Identify Chip klik in het programmeervenster, dan krijg ik te zien:

Atmega 328P, Flash : 32768, EPROM: 1024
Chip ID : 1E950F
STK500V2 detected
MAAR, wanneer ik een nieuwe microcontroller gebruik, dan kan AVR BASCOM de nieuwe chip niet identificeren !!
Als ik dan op 'Identify Chip' klik krijg ik te lezen:

Chip ID: FFFFFF
STK500V2 detected

Ik kan dan geen contact maken met de chip.

Ook de Atmega 644P20PU kan ik niet herkennen.
ISP is correct verbonden!!

Ik ga ervan uit dat dit niets te maken heeft met een bootloader omdat ik een hardware ISP programmer gebruik. Klopt dit?

Wat doe ik verkeerd?

Op voorhand bedankt om me te helpen.

Ignace Lepage

ENGLISH
I use a hardware ISP programmer (Diamex prog-S) and AVR BASCOM to program an Atmega chip.
When I use an Arduino Uno ( via ISP-connector), everything works perfectly.
When I use a breadboard with the original Atmega 328P of the Arduino board on it, everything works perfectly.
When I click 'Identify Chip' , BASCOM gives the following message:
Atmega 328P, Flash : 32768, EPROM: 1024
Chip ID : 1E950F
STK500V2 detected

BUT, when I use a new controller, and I click 'Identify Chip', BASCOM gives this message:
Chip ID: FFFFFF
STK500V2 detected

Then, I can not make contact with the chip.

Also the Atmega 644P20PU can not be recognized.

ISP is connected correctly.

I assume that this problem has nothing to do with a BOOTLOADER, because I use a hardware programmer. Am I right?

What do I do wrong???

Thanks beforehand to help me!!!

Ignace Lepage

(BASCOM-AVR version : 2.0.7.5 , Latest : 2.0.7.7 )
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1915

blank.gif
PostPosted: Sun Oct 26, 2014 11:19 am    Post subject: Re: AVR BASCOM ISP, Arduino vs breadboard, chip identify, de Reply with quote

IGNACE wrote:
DUTCH
ENGLISH

English is sufficient here.
Quote:
I use a hardware ISP programmer (Diamex prog-S) and AVR BASCOM to program an Atmega chip.
When I use an Arduino Uno ( via ISP-connector), everything works perfectly.
When I use a breadboard with the original Atmega 328P of the Arduino board on it, everything works perfectly.
When I click 'Identify Chip' , BASCOM gives the following message:
Atmega 328P, Flash : 32768, EPROM: 1024
Chip ID : 1E950F
STK500V2 detected

BUT, when I use a new controller, and I click 'Identify Chip', BASCOM gives this message:
Chip ID: FFFFFF
STK500V2 detected

Likely the ISP-clock of your ISP-programmer is too high, it has to be not more than one quart of the system clock.
A new ATM328 out of the box works with internal RC-oscillator 8MHz and CKDIV8 fuse set, effectively giving 1MHz system clock, so the ISP-clock has to be same, or lower than 250kHz.
The Arduino Uno's fuses are set to run full speed with 16MHz, good for up to 4MHz ISP-clock.
Lower the ISP-clock of your programmer and you should be ok.
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 981
Location: France

france.gif
PostPosted: Sun Oct 26, 2014 12:22 pm    Post subject: Reply with quote

Hello,
if you use Arduino uno rev 3 and Mega 2560 rev 3 or others using AVR Maga ship, you need to follow the explanation gives in the Basom Arduino forumhttp://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=12472 or samples of Bascom

It use bootloader of arduino and the special programer option arduino and arduino STK500V2

If you use the ISP pin you need to use the option of your programmer
example : to program an ATMEGA644 I use ISP-USB programmer option

bon courage Wink
Back to top
View user's profile Visit poster's website
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1915

blank.gif
PostPosted: Sun Oct 26, 2014 1:08 pm    Post subject: Reply with quote

Duval JP wrote:
Hello,
if you use Arduino uno rev 3 and Mega 2560 rev 3 or others using AVR Maga ship, you need to follow the explanation gives in the Basom Arduino forumhttp://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=12472 or samples of Bascom

It use bootloader of arduino and the special programer option arduino and arduino STK500V2

Hm, do you actually read the TO's question, before answering?
The TO has problems to ISP-program naked ATM328's.
Neither he needs an introduction to Arduino's, nor the advice to use an ISP-programmer in case of using the ISP interface.
The latter is quite obvious, isn't it? LOL
He uses ISP and it works with an Arduino with ATM328 chip, but it works not with a new controller.
Back to top
View user's profile
IGNACE

Bascom Member



Joined: 11 Sep 2014
Posts: 2

PostPosted: Sun Oct 26, 2014 1:55 pm    Post subject: Reply with quote

Whenever you use the 6-pin ISP header of your Arduino, you destroy the bootloader.
However, you don't destroy the fuses. Make sure that you remove the BOOTRST fuse since you are not using the bootloader.

New virgin AVRs from the factory run on their internal RC clock @ 1MHz.
An Arduino AVR will run on the crystal / ceramic resonator.

Make sure that you have a clock. Make sure that your ISP programmer runs at 125kHz.

David.


problem solved !!!!!!!!

I could change fuse-bits afterwards to use 11111111 external oscillator.

Thanks a lot David !!!!!!!
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1915

blank.gif
PostPosted: Sun Oct 26, 2014 3:08 pm    Post subject: Reply with quote

IGNACE wrote:
Whenever you use the 6-pin ISP header of your Arduino, you destroy the bootloader.

That's not correct, you can read the flash, read and write the fuses. Only programming the flash via ISP destroys the BL.
Quote:
New virgin AVRs from the factory run on their internal RC clock @ 1MHz.
Make sure that your ISP programmer runs at 125kHz.

You've obfuscated in your post somehow the true solution, which was actually described by the last sentence.
Just to make that clear, in case another user has a similar problem and will find that topic.
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum