Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
kylee14
PostPosted: Jul 29, 2009 - 07:59 PM
Newbie


Joined: May 08, 2009
Posts: 6
Location: vancouver island, BC

hmm..im looking on the scope and when I increase the isp freq to 56kHz, I can see sclk (which is at 56k, as it should) and miso is outputting data, but it still gives me this error. I am wondering why the data is going into the uC at the correct freq. but I still get this error. I only have one gnd on my board, which I am powering separately from the stk 500. There could very well be a noise problem but I am not sure, my signals are a bit noisy, but im not sure if its too noisy. Grr frustrating! Why doesnt it allow programming under 5kHz!

Edit: The error message doesnt show up until after the data has been, could this mean the uC is not sending back a command that says "got the data" on mosi.. this could mean the uC is fried..?
 
 View user's profile Send private message  
Reply with quote Back to top
Donald.Nagy
PostPosted: Nov 01, 2009 - 05:41 AM
Newbie


Joined: Jun 30, 2009
Posts: 3


ISP Program 1 FLASH byte in assembly code Atmel 328

Is there such a thing?

for the Atmel 328 Product
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Nov 01, 2009 - 04:20 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62299
Location: (using avr-gcc in) Finchingfield, Essex, England

You appear to be talking about SPM being used for "bootloader" programming rather than a physical ISP device (the subject of this thread)

BTW it's not possible to update a single byte as programming can only switch 1 bits to 0 bits and to switch any bits from 0 to 1 an entire page (typically 32, 64 or 128 bytes) must be erased and reprogrammed. So if only a single byte is to be changed the other 31, 63 or 127 must be read first and programmed back afterwards.

Each page has a 10,000 erase cycle limit.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
octavio.vega
PostPosted: Apr 16, 2010 - 04:20 PM
Wannabe


Joined: Apr 16, 2010
Posts: 84
Location: Spain

Hello,some chips like the AT90USB82 have a usb interface and a boot loader program preloaded in factory.does this solves the "chicken and egg" problem?
From the docs it seems that it uses by default the internal clock that is not valid for the 48MHz pll clock signal required by the usb module.
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
clawson
PostPosted: Apr 16, 2010 - 04:49 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62299
Location: (using avr-gcc in) Finchingfield, Essex, England

Quote:

does this solves the "chicken and egg" problem?

Yes it does (a pre-loaded bootloader always will).

But I think you are wrong about "internal clock". I'd be guided by Dean (abcminiuser) if I was you but as far as I know, for USB timing accuracy, the chip must have a 12MHz crystal that the internal PLL then winds up to 48MHz

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Apr 16, 2010 - 06:03 PM
Moderator


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway

The USB AVRs need an external 8MHz or 16MHz crystal source. The U4s at least can also run in a limited manner in Low Speed USB mode on the internal 8MHz RC oscillator, but I can't remember if the others support that.

Atmel ships the USB AVRs from the factory with a bootloader installed and the fuses set for an external crystal, from what I've seen.

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
octavio.vega
PostPosted: Apr 16, 2010 - 06:14 PM
Wannabe


Joined: Apr 16, 2010
Posts: 84
Location: Spain

In the documentation says:
The device is shipped with internal RC oscillator at 8.0 MHz and with the fuse CKDIV8 programmed,
In the AT90USB82/162 product, the Clock Multiplexer and the System Clock Prescaler can be
modified by software.

Does this means that the boot loader can program the chip to use a external clock source (crystal)of any valid frecuency and setup it correctly?
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Koshchi
PostPosted: Apr 16, 2010 - 06:24 PM
10k+ Postman


Joined: Nov 17, 2004
Posts: 13840
Location: Vancouver, BC

Quote:
Does this means that the boot loader can program the chip to use a external clock source (crystal)of any valid frecuency and setup it correctly?

There are no AVRs in which you can switch between internal and external clock sources in code. But you can change the pre-scaler in code to affect whatever clock is selected.

_________________
Regards,
Steve A.

The Board helps those that help themselves.
 
 View user's profile Send private message  
Reply with quote Back to top
S-Sohn
PostPosted: Apr 16, 2010 - 07:30 PM
Posting Freak


Joined: Aug 22, 2004
Posts: 1624
Location: Germany

Quote:
There are no AVRs in which you can switch between internal and external clock sources in code.

Well, the new ATtiny4/5/9/10 have the CLKMSR (Clock Main Settings Register) for this purpose:
Quote:
These bits select the main clock source of the system. The bits can be written at run-time to
switch the source of the main clock. The clock system ensures glitch free switching of the main
clock source.


And of course there is the xmega.

Regards
Sebastian
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Apr 17, 2010 - 01:31 AM
Moderator


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway

Quote:

In the documentation says:
The device is shipped with internal RC oscillator at 8.0 MHz and with the fuse CKDIV8 programmed,
In the AT90USB82/162 product, the Clock Multiplexer and the System Clock Prescaler can be
modified by software.


I'm 90% certain that paragraph is incorrect, and I think I remember going over this before here with someone else asking the same question. I'm sure at the factory they're set like that, but when they load the DFU bootloader onto each one they switch it to use an external crystal instead - at least, that's how the one I placed on a board myself was configured.

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
sonhai
PostPosted: May 16, 2010 - 04:43 AM
Newbie


Joined: Dec 23, 2008
Posts: 1


would hex code written and compiled for at90s2313 work on attiny2313 if not please explain thanks alot
sonhai
 
 View user's profile Send private message  
Reply with quote Back to top
Koshchi
PostPosted: May 16, 2010 - 05:15 AM
10k+ Postman


Joined: Nov 17, 2004
Posts: 13840
Location: Vancouver, BC

Please post this question in the proper forum rather than hijacking someone else's thread.

_________________
Regards,
Steve A.

The Board helps those that help themselves.
 
 View user's profile Send private message  
Reply with quote Back to top
GerhardKreuzer
PostPosted: Jun 26, 2011 - 03:55 PM
Newbie


Joined: Jun 26, 2011
Posts: 16


Hi Dean,
I am new to ATMEL AVRs and I found SPI-programming, which is a nice idea, but can't find it in your list ...
I have to use the ATiny167 chip and I want to buy the AVRONE, so can I program my chip (in circuit on my board) with this tool or not?
Where can I get information about neccessary hardware requirements of my target board to savly using one of this programming modes, preverable the modes my ATiny167 and the AVRONE will have in commen.

Thanks for helping

Gerhard
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jun 26, 2011 - 04:05 PM
Moderator


Joined: Jan 23, 2004
Posts: 9826
Location: Trondheim, Norway

SPI is the physical transport, but that kind of programming is called ISP, which pretty much every programmer can do.

For a list of supported devices for each interface on each programmerr, check the Tools guide in AVRStudio's help menu.

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
david.prentice
PostPosted: Jun 26, 2011 - 04:08 PM
10k+ Postman


Joined: Feb 12, 2005
Posts: 16308
Location: Wormshill, England

The ATtiny167 is a very unusual choice of AVR.
You might find a ATmeg328P to be suitable for most applications.

Yes, The AVRONE will program any chip.
It is a very expensive device.

Download the data sheet and manual. You will need them anyway.

Once you have those documents, you can quote the paragraphs that you do not understand.

David.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
GerhardKreuzer
PostPosted: Jun 26, 2011 - 04:19 PM
Newbie


Joined: Jun 26, 2011
Posts: 16


Hi David,
ok, I need a device which has a I2C interface to read out some sensors and a LIN interface for longer distance communication and it has to be cheap.
Any idea?

Thanks a lot

Gerhard
 
 View user's profile Send private message  
Reply with quote Back to top
GerhardKreuzer
PostPosted: Jun 26, 2011 - 05:14 PM
Newbie


Joined: Jun 26, 2011
Posts: 16


Hi David,

found now ATmega16/32/64/M1 but seems a little bit like shooting with a canon for little birds ...

Thanks a lot

With best regards

Gerhard
 
 View user's profile Send private message  
Reply with quote Back to top
ottoragam
PostPosted: Jul 30, 2011 - 02:45 AM
Rookie


Joined: Dec 01, 2010
Posts: 25


Hi, I still have a doubt about programming. I can power my system from some programmers, some programmers from my system or power them seprately. What happens if i use a 5V powered programmer (USB?) on a 3V3 system or vice versa? I think there are programmers that can detect system's voltage and scale the programming signal accordingly, What programmer should I choose to work with various designs running at different voltage levels?

GMM
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jul 30, 2011 - 12:10 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62299
Location: (using avr-gcc in) Finchingfield, Essex, England

Quote:

What happens if i use a 5V powered programmer (USB?) on a 3V3 system or vice versa? I think there are programmers that can detect system's voltage and scale the programming signal accordingly, What programmer should I choose to work with various designs running at different voltage levels?


All the Atmel programmers listed in the first post of this thread have voltage level adaptation circuitry so can program targets whether they are 3.3V or 5.0V powered. Most of the devices here will NOT power the target - you must do that separately - their headers only have "VTG" in order to sense the target voltage so they can adapt.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
billgw
PostPosted: Aug 02, 2011 - 01:02 AM
Newbie


Joined: Jul 30, 2011
Posts: 4


Hello, I'm little confused. Let's say for USBtinyISP AVR Programmer (http://www.micro4you.com/store/programmers/avr/usbtinyisp-avr-programmer.html). Product's description refers to (http://dicks.home.xs4all.nl/avr/usbtiny/)
So my question is:

Besides,
(1) burning the bootloader in an AVR that supports bootloader, by connecting USBtinyISP AVR Programmer to (e.g.) Arduino board, and
(2) Parallel Programming of an AVR using USBtinyISP AVR Programmer and a Parallel Programmer,
(3) Can we use USBtinyISP AVR Programmer to Serial Programmming an ATmega328P (without bootloader) as described in "http://www.atmel.com/dyn/resources/prod_documents/doc8025.pdf" page 304, par. 28.8 (figure 28-7)
and to Low-Voltage Serial Programming an ATtiny15L as descrided in "http://www.atmel.com/dyn/resources/prod_documents/doc1187.pdf" page 59, (figure 33) ???
If yes, do we need something else, too? (except the USBtinyISP AVR Programmer)
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits