AVR tiny13 ADC0 syntax problem

Sep 13, 2008 11 Replies

The ADC0 is shared with the external reset pin, and I'm utterly confused by atmels documentation on now to change it over from rst to ADC function.



I don't want to set the no external reset fuse



I'm using GCC + studio4. Been to avrfreaks, I found nothing there.



Any hints, anyone?



martin


Why not? As long as you use high voltage programmer (12V to reset), you can still reprogram it.

I don't have a HV programmer (yet)

martin

Buy or build one. We will be using the reset pin for ADC or I/O as well. I know for sure that the core cannot block reset in software and low voltage ISP needs it to work. So, only HV prog. can work.

I've been reading the tiny13 datasheet for hours, and it keeps mentioning DIEOE,DIEOV etc to change the port function.

I can't see how to set them in any registers, the compiler just fllags errors when I try and use them.

My gut feeling is that setting the reset fuse wont help one little bit

martin

That's an internal signal derived from ADC port enable and DDRB5 direction. It will not override the reset signal.

The fuses are controlling the core hardware. I believe it is the first step for using alternate functions of pin 1.

These are internal bits explained on figure 24. They are not softwware accessible.

For using the reset pin for something else then reset you MUST burn the fuse, and you MUST have a HV programmer for reprogramming.

I'll never understand why people hesitate buying proper tools. The STK500 is just 80¤.

Mit freundlichen Grüßen

Frank-Christian Krügel

Thanks linnix, I'll disorganise a HV programmer, I just wish the whole thing was better documented, or even documented in the first place.

Alf....?

I really would have liked to get that ADC0 up and running by dawn

Frustatredly (I'm only trying to do a 555++) yours.. etc.etc

martin

Hi, I was just trying to replace a 555 with an AVR controlled by a 89s52 for more flexibility, and was utterly confused by the documentation, which would not have been resolved by having "proper tools".

I did get a proper tool once , the Atmel 89s51 programmer, the software crashes about 3 times a day

And it is great if you can build proper tools yourself, which is essential with the spanish postal system.

My AVR programmer, with Lancos/ponyprog software is less than a 0.50 Euro, absolutely perfect for my needs, I put it on the final PCB's

martin

Choose a part with more pins :)

Having realised the jump to 8 pins was not super-clever, the industry is seeing more 14/16 pin SO/TSSOP controllers.

In your case, that means tiny24/44/84 choices.

-jg

Frank-Christian Kruegel ha scritto:

even with AVRisp for first programming time only

and resuming reset pin for successive AVRisp programming.

regards

That's for the 89xx series, not for the AVRs.

-v packet loss? long rtt?

Indeed, it's ok for most needs. But not for yours, obviously.

BTW: High voltage serial programming is not that difficult. You surely can build a hv serial programmer yourself. 4 digital i/o, a switchable Vcc, and a circuit to apply Gnd/Vcc/Vpp (12V) to the reset pin is all you need. It's all in the data sheet (page 112ff in my revision 10/2007 or page 109ff in the current Attiny13A data sheet). Please note that the AtMegas use High Voltage Parallel(!) Programming, which is different.

Mit freundlichen Grüßen

Frank-Christian Krügel

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required