AVR tiny13 ADC0 syntax problem

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

Reply to
Martin Griffith
Loading thread data ...

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

Reply to
linnix

I don't have a HV programmer (yet)

martin

Reply to
Martin Griffith

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.

Reply to
linnix

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

Reply to
Martin Griffith

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.

Reply to
linnix

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

Reply to
Frank-Christian Kruegel

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

Reply to
Martin Griffith

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

Reply to
Martin Griffith

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

Reply to
Jim Granville

Frank-Christian Kruegel ha scritto:

even with AVRisp for first programming time only

and resuming reset pin for successive AVRisp programming.

regards

Reply to
lowcost

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

Reply to
Frank-Christian Kruegel

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.