| Author |
Message |
|
|
Posted: Jul 29, 2009 - 07:59 PM |
|

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..? |
|
|
| |
|
|
|
|
|
Posted: Nov 01, 2009 - 05:41 AM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Nov 01, 2009 - 04:20 PM |
|


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. |
_________________
|
| |
|
|
|
|
|
Posted: Apr 16, 2010 - 04:20 PM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: Apr 16, 2010 - 04:49 PM |
|


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 |
_________________
|
| |
|
|
|
|
|
Posted: Apr 16, 2010 - 06:03 PM |
|


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  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Apr 16, 2010 - 06:14 PM |
|

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? |
|
|
| |
|
|
|
|
|
Posted: Apr 16, 2010 - 06:24 PM |
|

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.
|
| |
|
|
|
|
|
Posted: Apr 16, 2010 - 07:30 PM |
|


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 |
|
|
| |
|
|
|
|
|
Posted: Apr 17, 2010 - 01:31 AM |
|


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  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: May 16, 2010 - 04:43 AM |
|

Joined: Dec 23, 2008
Posts: 1
|
|
would hex code written and compiled for at90s2313 work on attiny2313 if not please explain thanks alot
sonhai |
|
|
| |
|
|
|
|
|
Posted: May 16, 2010 - 05:15 AM |
|

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.
|
| |
|
|
|
|
|
Posted: Jun 26, 2011 - 03:55 PM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Jun 26, 2011 - 04:05 PM |
|


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  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Jun 26, 2011 - 04:08 PM |
|

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. |
|
|
| |
|
|
|
|
|
Posted: Jun 26, 2011 - 04:19 PM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Jun 26, 2011 - 05:14 PM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Jul 30, 2011 - 02:45 AM |
|

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 |
|
|
| |
|
|
|
|
|
Posted: Jul 30, 2011 - 12:10 PM |
|


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. |
_________________
|
| |
|
|
|
|
|
Posted: Aug 02, 2011 - 01:02 AM |
|

Joined: Jul 30, 2011
Posts: 4
|
|
|
|
|
|
|