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

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

[avr-gcc-list] Stuckness with ATTiny15 program and avr-gcc


From: Ned Konz
Subject: [avr-gcc-list] Stuckness with ATTiny15 program and avr-gcc
Date: Fri, 7 Jan 2005 15:11:59 -0800
User-agent: KMail/1.7.1

Hi folks,

I'm trying to get my workflow, header files, etc. set up for programming the 
ATTiny15L using avr-gcc. I'm going to publish a HOWTO on my site once I get 
things working fairly well.

So far, the code generation looks good, and I'm using Bruce Lightner's Perl 
program to help look for potential problems (like use of RAM). I've written 
several header files for the attiny15; I'm only using the inttypes.h header 
from avr-libc (this will go away as well when I put those definitions into my 
headers).

However, I'm stuck on this project, unable to get my code working properly on 
a real device. I've run other code compiled from avr-gcc and programmed into 
the device the same way without problems on the same hardware.

The programming works fine, complete with verification.
I'm setting the fuses so that RSTDISABL is programmed (I'm using the RESET/PB5 
line to drive a LED). I have tried both settings of the BOD fuse.

I'm not using the watchdog.

It works fine in the simulator, doing just what I expect it to.

It does not work just fine in the real device.

In fact, it's not even getting to the point where the LED is turned on (in the
initialization in main()), or where the ADC reference voltage is connected to
the external capacitor.

If I look at the pins on the device (which programs and verifies just fine
using AvrStudio4 and an STK500 board), I see Vcc and pin 1 (RESET/PB5) going
high. Of course, they're both pulled up by external circuitry.  The AREF pin
stays hi-Z, as do all the other pins.

So I figure that rules out (say) going excessively deep in the stack. Not that
that should happen; the maximum call depth is 2, leaving 1 for the interrupt
handler.

I've read over the listing and I don't see anything strange.

I've put a zip on my site, with the C code, the headers, and a listing file.

There is a schematic in PNG form in the zip too.

If you're interested in looking at this, my code and schematic is available at
http://bike-nomad.com/misc/tiny15Regulator.zip

If you can figure out why it doesn't work, I'd appreciate it.
I'd be glad to trade my time analyzing your programming problem later on.

Thanks,
-- 
Ned Konz
http://bike-nomad.com



reply via email to

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