avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] ATMEGA FRIED!!!! HELP!!!!!


From: Shadab Ansari
Subject: [avr-gcc-list] ATMEGA FRIED!!!! HELP!!!!!
Date: Thu, 18 Dec 2003 18:22:46 +0000 (GMT)

hi...
 i was workin with atmega128 trying to connect it to an lcd. maybe there was a 
short or something-- the atmega got warm(not hot though). i disconnected the 
power supply asap.now its dead. is this device this much delicate that an 
accidental short of pins for just a few seconds can destroy it?? please tell me 
if there is anyway to repair it or something....it costed me a whole lot of 
money..
thanks

address@hidden wrote:
Send avr-gcc-list mailing list submissions to
address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
http://www.avr1.org/mailman/listinfo/avr-gcc-list
or, via email, send a message with subject or body 'help' to
address@hidden

You can reach the person managing the list at
address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of avr-gcc-list digest..."


Today's Topics:

1. ATMega128 RAMPZ behaviour changed ? (Simon Eatough)
2. Re: ATMega128 RAMPZ behaviour changed ? (E. Weddington)
3. RE: ATMega128 RAMPZ behaviour changed ? (Simon Eatough)
4. Re: RE: ATMega128 RAMPZ behaviour changed ? (Erik Christiansen)
5. SPI (D I Freeman)
6. =?EUC-KR?B?yLi9xTpbYXZyLWdjYy1saXN0XSBTUEk=?=
(=?EUC-KR?B?udq/tcHY?=)
7. Future of WINAVR (Steven Chang-Lin Yu)
8. OSXAVR? :) RE: [avr-gcc-list] Future of WINAVR (Asko Kauppi)
9. Re: OSXAVR? :) RE: [avr-gcc-list] Future of WINAVR
(Neil Johnson)
10. Re: Future of WINAVR (E. Weddington)
11. Re: RE: ATMega128 RAMPZ behaviour changed ? (E. Weddington)
12. 
Size of generated ihex file: WinAVR Makefile vs. custom shell
script (Christian Neumair)
13. Re: Size of generated ihex file: WinAVR Makefile vs.
custom shell script (E. Weddington)
14. Re: Size of generated ihex file: WinAVR Makefile
vs. custom shell script (Christian Neumair)
15. Re: OSXAVR? :) RE: [avr-gcc-list] Future of WINAVR
(John Butera)


----------------------------------------------------------------------

Date: Tue, 16 Dec 2003 13:06:30 +0000
From: Simon Eatough 
To: address@hidden
Subject: [avr-gcc-list] ATMega128 RAMPZ behaviour changed ?
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Precedence: list
Message: 1

Hi
According to the ATMega128 documentation, bit 0 of RAMPZ selects the high or 
low page access of Z pointer, with the other bits of RAMPZ unused. However 
it appears that setting RAMPZ to 3 causes elpm return garbage. This behaviour 
seems to break pgm_read_byte_far(). Anybody else noticed this ?. 
Cheers
Simon Eatough


------------------------------

Date: Mon, 15 Dec 2003 17:26:34 -0700
From: "E. Weddington" 
To: address@hidden, Simon Eatough 
Subject: Re: [avr-gcc-list] ATMega128 RAMPZ behaviour changed ?
Message-ID: <address@hidden>
In-Reply-To: <address@hidden>
Content-Type: text/plain; charset=US-ASCII
MIME-Version: 1.0
Content-Transfer-Encoding: 7BIT
Precedence: list
Message: 2

On 16 Dec 2003 at 13:06, Simon Eatough wrote:

> Hi
> According to the ATMega128 documentation, bit 0 of RAMPZ selects the high or
> low page access of Z pointer, with the other bits of RAMPZ unused. However
> it appears that setting RAMPZ to 3 causes elpm return garbage. This
> behaviour seems to break pgm_read_byte_far(). Anybody else noticed this ?.

pgm_read_byte_far() accepts a uint32_t, which of course can be a value that 
extends beyond the flash address range of a mega128.

The disadvantage to limiting the allowable range of addresses in 
pgm_read_byte_far to those of the mega128 is that when the mega256 is 
released, then pgm_read_byte_far will no longer work. And, yes, I've heard 
that there will be such a beast as the mega256.

So the current response is: don't do that. Test your addresses before you 
use them as a parameter to pgm_read_byte_far().



------------------------------

Date: Tue, 16 Dec 2003 14:01:34 +0000
From: Simon Eatough 
To: address@hidden
Subject: [avr-gcc-list] RE: ATMega128 RAMPZ behaviour changed ?
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Precedence: list
Message: 3

Hi Eric 
Thanks for your reply, looking into it a bit further maybe its a compiler 
problem then:-

below is listing of code.
// snip
SamplePtr is unsigned long.
alarm is at 0xc7e1 

SamplePtr = &alarm;
143e8: 81 ee ldi r24, 0xE1 ; 225
143ea: 97 ec ldi r25, 0xC7 ; 199
143ec: aa 27 eor r26, r26
143ee: 97 fd sbrc r25, 7
143f0: a0 95 com r26 << breaks here.. 
143f2: ba 2f mov r27, r26
143f4: 80 93 18 01 sts 0x0118, r24
143f8: 90 93 19 01 sts 0x0119, r25
143fc: a0 93 1a 01 sts 0x011A, r26
14400: b0 93 1b 01 sts 0x011B, r27
temp_value = pgm_read_byte_far(SamplePtr);
14404: ab bf out 0x3b, r26 ; 59 << RAMPZ loaded with 0x FF here
14406: fc 01 movw r30, r24
14408: 87 91 elpm r24, Z+
1440a: 80 93 26 01 sts 0x0126, r24

// snip 

GCC 3.3.1

Any comments ? cheers 
Simon. 


------------------------------

Date: Tue, 16 Dec 2003 12:23:30 +1100
From: Erik Christiansen 
To: Simon Eatough 
Cc: address@hidden
Subject: Re: [avr-gcc-list] RE: ATMega128 RAMPZ behaviour changed ?
Message-ID: <address@hidden>
In-Reply-To: <address@hidden>
References: <address@hidden>
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Precedence: list
Message: 4

On Tue, Dec 16, 2003 at 02:01:34PM +0000, Simon Eatough wrote:
> SamplePtr is unsigned long.

Are you sure that it is unsigned? (See below)

> alarm is at 0xc7e1 
> 
> SamplePtr = &alarm;
> 143e8: 81 ee ldi r24, 0xE1 ; 225
> 143ea: 97 ec ldi r25, 0xC7 ; 199
> 143ec: aa 27 eor r26, r26
> 143ee: 97 fd sbrc r25, 7
> 143f0: a0 95 com r26 << breaks here.. 
> 143f2: ba 2f mov r27, r26

Looks like sign extension to this untrained eye.

> 143f4: 80 93 18 01 sts 0x0118, r24
> 143f8: 90 93 19 01 sts 0x0119, r25
> 143fc: a0 93 1a 01 sts 0x011A, r26
> 14400: b0 93 1b 01 sts 0x011B, r27
> temp_value = pgm_read_byte_far(SamplePtr);
> 14404: ab bf out 0x3b, r26 ; 59 << RAMPZ loaded with 0x FF here
> 14406: fc 01 movw r30, r24
> 14408: 87 91 elpm r24, Z+
> 1440a: 80 93 26 01 sts 0x0126, r24

HTH,
Erik

------------------------------

Date: Tue, 16 Dec 2003 02:25:36 +0000
From: D I Freeman 
To: address@hidden
Subject: [avr-gcc-list] SPI
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Precedence: list
Message: 5


Hi,

Can someone point me towards the documentation on how to use the SPI port with
avr-gcc please? I am either blind or stupid as of yet I have ben unable to
find any info on it.

Thanks

D

------------------------------

Date: Tue, 16 Dec 2003 15:30:26 +0900 (added by address@hidden)
From: =?EUC-KR?B?udq/tcHY?= 
To: D I Freeman 
Cc: address@hidden
Subject: =?EUC-KR?B?yLi9xTpbYXZyLWdjYy1saXN0XSBTUEk=?=
Message-ID: <address@hidden> (added by
address@hidden)
In-Reply-To: <address@hidden>
Content-Type: text/plain;
charset="EUC-KR"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Precedence: list
Reply-To: =?EUC-KR?B?udq/tcHY?= 
Message: 6

SGkuLg0KDQpIb3cgYWJvdXQgdGhlIGRhdGFzaGVldCBvZiBBVlI/IEZvciBleGFtcGxlLCB0aGUg
ZGF0YXNoZWV0IG9mIEFUbWVnYTEyOCBoYXMgc29tZSBzYW1wbGUgc291cmNlIGNvZGUgd3JpdHRl
biBpbiBDIGFuZCBBU00uDQoNClRoYW5rcy4uLg0Kamp1bmVAbmV0aWFuLmNvbQ0KDQotLS0tLSBP
cmlnaW5hbCBNZXNzYWdlIC0tLS0tIA0KRnJvbTogRCBJIEZyZWVtYW4gDQpUbzogYXZyLWdjYy1s
aXN0QGF2cjEub3JnIA0KU2VudDogMjAwM7PiIDEyv/kxNsDPIDExOjI1KMitKQ0KU3ViamVjdDog
W2F2ci1nY2MtbGlzdF0gU1BJIA0KDQoNCg0KDQoNCkhpLA0KDQpDYW4gc29tZW9uZSBwb2ludCBt
ZSB0b3dhcmRzIHRoZSBkb2N1bWVudGF0aW9uIG9uIGhvdyB0byB1c2UgdGhlIFNQSSBwb3J0IHdp
dGgNCmF2ci1nY2MgcGxlYXNlPyBJIGFtIGVpdGhlciBibGluZCBvciBzdHVwaWQgYXMgb2YgeWV0
IEkgaGF2ZSBiZW4gdW5hYmxlIHRvDQpmaW5kIGFueSBpbmZvIG9uIGl0Lg0KDQpUaGFua3MNCg0K
RA0KDQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KYXZy
LWdjYy1saXN0IG1haWxpbmcgbGlzdA0KYXZyLWdjYy1saXN0QGF2cjEub3JnDQpodHRwOi8vd3d3
LmF2cjEub3JnL21haWxtYW4vbGlzdGluZm8vYXZyLWdjYy1saXN0From address@hidden Tue Dec 
16 20:24:32 2003
Received: from [64.175.21.250] (helo=nanocluster.net)
by s1.avr1.org with esmtp (Exim 3.35 #1 (Debian))
id 1AW9Yx-00078C-00
for ; Tue, 16 Dec 2003 20:24:12 +1300
Received: from zyon [192.168.1.44] by nanocluster.net with ESMTP
(SMTPD32-7.13) id A36FD600DE; Mon, 15 Dec 2003 23:25:35 -0800
From: "Leonard Tsai" 
To: "'D I Freeman'" 
Subject: RE: [avr-gcc-list] SPI
Date: Mon, 15 Dec 2003 23:23:20 -0800
Organization: TSAI Co
MIME-Version: 1.0
Content-Type: text/plain;
charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
In-Reply-To: <address@hidden> (added
address@hidden)
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Thread-Index: AcPDoOwck0WL0bNPSWSVfcC65n36hAABCuOg
Message-Id: <address@hidden>
cc: address@hidden
X-BeenThere: address@hidden
X-Mailman-Version: 2.1
Precedence: list
Reply-To: address@hidden
List-Id: avr-gcc mailing list 
List-Help: 
List-Post: 
List-Subscribe: ,

List-Archive: 
List-Unsubscribe: ,


to setup the SPI:

DDR_SPI =3D (1<
   
SPCR =3D (1< SPSR =3D 0x01;

// Send 16 bits

Void send16(u16 data) {
int r;
SS_lo; // Slave Select

SPDR =3D (data>>8);
while (!(SPSR & (1< SPDR =3D (data&0xff);
while (!(SPSR & (1<
SS_hi;
}

Here is the result from the code:=20

http://www.nanocluster.net/Leonard/album03/HTML/p120303.htm

Hope this help

-----Original Message-----
From: address@hidden =
[mailto:address@hidden On Behalf Of ???
Sent: Monday, December 15, 2003 10:30 PM
To: D I Freeman
Cc: address@hidden
Subject: =ED=9A=8C=EC=8B=A0:[avr-gcc-list] SPI

Hi..

How about the datasheet of AVR? For example, the datasheet of ATmega128 =
has some sample source code written in C and ASM.

Thanks...
address@hidden

----- Original Message -----
From: D I Freeman
To: address@hidden
Sent: 2003=EB=85=84 12=EC=9B=9416=EC=9D=BC 11:25(=ED=99=94)
Subject: [avr-gcc-list] SPI=20





Hi,

Can someone point me towards the documentation on how to use the SPI =
port with avr-gcc please? I am either blind or stupid as of yet I have =
ben unable to find any info on it.

Thanks

D

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


------------------------------

Date: Tue, 16 Dec 2003 19:55:11 +1000
From: "Steven Chang-Lin Yu" 
To: "'AVR-GCC'" ,
"'AVR-Chat'" ,
"'AVRCLUB'" 
Subject: [avr-gcc-list] Future of WINAVR
Message-ID: 
Content-Type: text/plain;
charset="Windows-1252"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Precedence: list
Message: 7

Just went to the newly design WINAVR webpage, and I found that Eric have
decide to have other people to continue on the development of the WINAVR
project, what happen Eric? And what will be the future of all the =
developer
using WINAVR for design AVR based embedded system??? Does this mean
everyone will need to shift to the Linux environment for the continue
support of GCC AVR library???

=20

Steve


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 15/12/2003
=20
------------------------------

Date: Tue, 16 Dec 2003 12:33:55 +0200
From: Asko Kauppi 
To: "'address@hidden'" 
Subject: OSXAVR? :) RE: [avr-gcc-list] Future of WINAVR
Message-ID: <address@hidden>
Content-Type: text/plain;
charset="iso-8859-1"
MIME-Version: 1.0
Precedence: list
Message: 8


I for one would be interested in an OS X version of WinAVR. Anyone else?

-ak

-----Original Message-----
From: Steven Chang-Lin Yu [mailto:address@hidden
Sent: 16. joulukuuta 2003 11:55
To: 'AVR-GCC'; 'AVR-Chat'; 'AVRCLUB'
Subject: [avr-gcc-list] Future of WINAVR


Just went to the newly design WINAVR webpage, and I found that Eric have
decide to have other people to continue on the development of the WINAVR
project, what happen Eric? And what will be the future of all the developer
using WINAVR for design AVR based embedded system??? Does this mean
everyone will need to shift to the Linux environment for the continue
support of GCC AVR library???



Steve


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.552 / Virus Database: 344 - Release Date: 15/12/2003

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.


------------------------------

Date: Tue, 16 Dec 2003 11:23:03 +0000 (GMT)
From: Neil Johnson 
To: Asko Kauppi 
Cc: "'address@hidden'" 
Subject: Re: OSXAVR? :) RE: [avr-gcc-list] Future of WINAVR
Message-ID: 

In-Reply-To: <address@hidden>
References: <address@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII
MIME-Version: 1.0
Precedence: list
Message: 9

Hi,

Well, GCC for AVR almost compiles out of the box for OSX, which is UNIX
underneath. From what I remember of WinAVR (its been a while since I last
used it), a lot of the additional stuff was supporting GCC in a Windows
environment (make, shell scripts, etc), which you already get for free in
OSX.

Of course, the other main advantage of WinAVR is the install-and-go
package which Eric has wonderfully put together.

Personally, I prefer to compile my own tools so that I can place them in
my own user directories, and not polute the main system directories with
files not directly related to the operating system of the host. This is
generally done with something like:

./configure --prefix=/Users/neiljohnson/Applications/usr ... etc ...

Cheers,
Neil

--
Neil Johnson :: Computer Laboratory :: University of Cambridge ::
http://www.njohnson.co.uk http://www.cl.cam.ac.uk/~nej22
---- IEE Cambridge Branch: http://www.iee-cambridge.org.uk ----

------------------------------

Date: Tue, 16 Dec 2003 09:34:26 -0700
From: "E. Weddington" 
To: "'AVR-GCC'" ,
"'AVR-Chat'" ,
"'AVRCLUB'" ,
"Steven Chang-Lin Yu" 
Subject: Re: [avr-gcc-list] Future of WINAVR
Message-ID: <address@hidden>
In-Reply-To: 
Content-Type: text/plain; charset=US-ASCII
MIME-Version: 1.0
Content-Transfer-Encoding: 7BIT
Precedence: list
Message: 10

On 16 Dec 2003 at 19:55, Steven Chang-Lin Yu wrote:

> Just went to the newly design WINAVR webpage, and I found that Eric have
> decide to have other people to continue on the development of the WINAVR
> project, what happen Eric? 

I'd rather not go into it on a list. Thanks. :-)

> And what will be the future of all the developer
> using WINAVR for design AVR based embedded system??? 

I'd very much like to continue to build WinAVR. However, I can't do this at 
this time. I'm currently looking for someone else to admin the project.

> Does this mean
> everyone will need to shift to the Linux environment for the continue
> support of GCC AVR library???

Of course not. All the various open source AVR projects build on Linux, 
FreeBSD, Windows (via Cygwin or MinGW), and there are reports of a complete 
toolchain on Mac OSX, and it's known to build on Solaris. This is quite a 
feat!

If you look at the various project's web sites, you'll find documentation 
on how to build the software. You'll find that the documentation is for 
mainly for *nix, but a lot of time those directions will work for building 
for Windows using Cygwin or MinGW/MSYS. Many of the projects also have 
specific directions for building for Windows (Cygwin/MinGW). One just has 
to be prepared to download most of Cygwin...
So, really, you can build the projects (including avr-libc) yourself....
WinAVR just provided the tools pre-built and all in one installation 
package.

Eric

------------------------------

Date: Tue, 16 Dec 2003 09:37:51 -0700
From: "E. Weddington" 
To: address@hidden, Simon Eatough 
Subject: Re: [avr-gcc-list] RE: ATMega128 RAMPZ behaviour changed ?
Message-ID: <address@hidden>
In-Reply-To: <address@hidden>
Content-Type: text/plain; charset=US-ASCII
MIME-Version: 1.0
Content-Transfer-Encoding: 7BIT
Precedence: list
Message: 11

On 16 Dec 2003 at 14:01, Simon Eatough wrote:

> Hi Eric 
> Thanks for your reply, looking into it a bit further maybe its a compiler
> problem then:-
> 
> below is listing of code.
> // snip
> SamplePtr is unsigned long.
> alarm is at 0xc7e1 
> 
> SamplePtr = &alarm;
> 143e8: 81 ee ldi r24, 0xE1 ; 225
> 143ea: 97 ec ldi r25, 0xC7 ; 199
> 143ec: aa 27 eor r26, r26
> 143ee: 97 fd sbrc r25, 7
> 143f0: a0 95 com r26 << breaks here.. 
> 143f2: ba 2f mov r27, r26
> 143f4: 80 93 18 01 sts 0x0118, r24
> 143f8: 90 93 19 01 sts 0x0119, r25
> 143fc: a0 93 1a 01 sts 0x011A, r26
> 14400: b0 93 1b 01 sts 0x011B, r27
> temp_value = pgm_read_byte_far(SamplePtr);
> 14404: ab bf out 0x3b, r26 ; 59 << RAMPZ loaded with 0x FF here
> 14406: fc 01 movw r30, r24 14408: 87 91 elpm r24, Z+
> 1440a: 80 93 26 01 sts 0x0126, r24
> 

What assembly do you get if you do this?:

#include 
uint32_t SamplePtr;

SamplePtr = (uint32_t)&alarm;
temp_value = pgm_read_byte_far(SamplePtr);



------------------------------

Date: Tue, 16 Dec 2003 19:11:06 +0100
From: Christian Neumair 
To: address@hidden
Subject: [avr-gcc-list] 
Size of generated ihex file: WinAVR Makefile vs. custom shell
script
Message-ID: <address@hidden>
Content-Type: multipart/mixed; boundary="=-lrsXYJ7GC7sqRI5mSrjL"
MIME-Version: 1.0
Precedence: list
Message: 12


--=-lrsXYJ7GC7sqRI5mSrjL
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I'm trying to simplify the weird makefile bundled with WinAVR I used to
use by writing a simple shell script that takes one .c input file and
links it against a library I installed. While the WinAVR file first
links the .o files into a final elf binary and does some mapping magic,
I just compiled and linked the .c file and used avr-objcopy. For some
reason the size of my file is way bigger and it doesn't fit onto the MCU
I'm trying to flash.
Could somebody please have a look at the attached file and tell me
what's wrong with it.
Maybe I could be some more verbose, I just haven't got any more
information at the moment. Maybe one of you could instruct me on how to
gain more information.


=== message truncated ===
Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download 
now.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]