Eventually, you will have to breadboard up things and try something. The ATtiny13 does not have a uart so you will have to write the code with timing and all anyway. It would be easy to make a simple measurement to find out the bit time and go from there. Incidentally, I haven't had any problem with the internal oscillator running the uart for serial communication at 9600 baud using the 8Mhz internal oscillator. However, maybe you should consider one of the other fine AVR processors that has a uart if you don't want to mess with the bit-bang solution required. Jim ----- Original Message ----- From: "Alexandre Guimaraes" <listas@logikos.com.br> To: <AVR-Chat@yahoogroups.com> Sent: Wednesday, July 06, 2005 8:48 AM Subject: Re: [AVR-Chat] External oscillator for the Tiny13. > Hi, James > > >I still think that you can do it without a crystal or other external > > oscillator. You are going to have to use 2 pins for serial communication > > in > > any case. I assume you want to talk to it in some way. Wake up your unit > > with a few characters that you can measure the bit length like 5s or As or > > whatever you pick, then set you bit time at what you find. Maybe that > > little > > processor doesn't have enough memory for that sort of thing. But it is > > totally doable to have a self adapting serial bit-bang type comm IO. You > > can > > get it real close and each time it will figure out itself what is accurate > > based on the input. > > Usually you do not even need to measure a character time... The start > bit is enough. You are absolutely right about memory... The program to adapt > the timing and that stuff will eat precious program and storage memory. It > all depends on the constraints of the projetct. If memory is not a problem > that is the way to go, if it is a cheap external oscillator may be a better > option. You also need to have the IO pins available.. Like most of the > problems that we deal, there's always many ways that are better at each > project. The best thing is to have the basics well solved in the "bag of > tricks" and ready to work when the next project arrives :-) > > > If you must have an external oscillator, I'd take Dave's advice. That > > oscillator will probably work fine just as it is. The sine wave will also > > most likely run the processor very well or as suggested you can square it > > up > > but it may not be required. Important this is to try it and see what > > happens. > > I am a little worried about getting a sine wave in the clock input.. > There is no detailed especification and I am not even sure if that input has > a schhmit trigger.. It may work erractly.. I am not sure.. I will try it out > anyway and let the list know if it works... > > Best regards, > Alexandre Guimaraes > > > > Good luck, > > > > Jim > > > > ----- Original Message ----- > > From: "Alexandre Guimaraes" <listas@logikos.com.br> > > To: <AVR-Chat@yahoogroups.com> > > Sent: Tuesday, July 05, 2005 1:07 PM > > Subject: Re: [AVR-Chat] External oscillator for the Tiny13. > > > > > >> Hi, James > >> > >> The OSCCAL calibration works really very well if you can guarante the > >> operating temperature.. If temperature varies too much it will not be > > enough > >> for reliable communications.. What makes the Tiny13 even more interesting > > is > >> that the voltage reference is much better than in the Atmega8, for > >> example > >> and the price tag is great for simple applications. It is small but for > > some > >> applications sparing a pin is possible.. > >> > >> The only other way that I can see to make reliable serial comms at > > some > >> speed with it is if we calibrate the timing using the timing of the start > >> bit from the other serial device.. That works great but just under some > >> protocols and it also makes software much more complicated.. > >> > >> If the external oscillator can be made cheaply enough it is a great > >> option for many applications... The sub-dollar price tag with a nice AD > >> converter and voltage reference that works makes the Tiny13 a very, very > >> nice beast to be explored.... > >> > >> Best regards, > >> Alexandre Guimaraes > >> > >> ----- Original Message ----- > >> From: "James Hatley" <james.hatley@comcast.net> > >> To: <AVR-Chat@yahoogroups.com> > >> Sent: Monday, July 04, 2005 11:47 PM > >> Subject: Re: [AVR-Chat] External oscillator for the Tiny13. > >> > >> > >> > Hello, > >> > > >> > Reviewing your original note ... you want to do serial communication > >> > and > >> > you > >> > think you need a crystal oscillator to clock the mpu. > >> > > >> > It seems to me that there is no reason that the internal oscillator and > > a > >> > bit-bang serial comm solution won't work just fine. These type of > > routines > >> > have been through here a number of times and I'm sure that there are a > >> > number of examples around. The internal oscillator, at least in the > > Atmel > >> > mpus that I've used, can be tweeked with OSCCAL to get pretty close, > > like > >> > 2% > >> > or better. That should be quite sufficient to do serial communication. > >> > > >> > That part, the ATtiny13 doesn't have too many pins and we don't know > > what > >> > you want to do but you may want/need to use the pin for something else. > >> > > >> > Jim > >> > > >> > ----- Original Message ----- > >> > From: Alexandre Guimaraes > >> > To: AVR-Chat@yahoogroups.com > >> > Sent: Monday, July 04, 2005 5:21 PM > >> > Subject: [AVR-Chat] External oscillator for the Tiny13. > >> > > >> > > >> > Hi, > >> > > >> > All this talk about crystals got me thinking about a cheap way to > > make > >> > a > >> > external oscillator for the Tiny13.... The only thing bad about this > > part > >> > is > >> > that it can not drive a crystal to make serial comms possible :-( > > Nothing > >> > can be perfect.... > >> > > >> > Does anyone have a handy, small and cheap crystal oscillator circuit > >> > that is reliable and uses low power ??? If it could use a resonator > >> > even > >> > better.... It gets cheaper and is good enough for serial > > communications... > >> > > >> > Best regards, > >> > Alexandre Guimaraes > >> > > >> > > >> > > >> > > >> > YAHOO! GROUPS LINKS > >> > > >> > Visit your group "AVR-Chat" on the web. > >> > > >> > To unsubscribe from this group, send an email to: > >> > AVR-Chat-unsubscribe@yahoogroups.com > >> > > >> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > >> > > >> > > >> > > >> > > >> > > >> > Yahoo! Groups Links > >> > > >> > > >> > > >> > > >> > > >> > > >> > >> > >> > >> > >> Yahoo! Groups Links > >> > >> > >> > >> > >> > >> > >> > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > >
Message
Re: [AVR-Chat] External oscillator for the Tiny13.
2005-07-06 by James Hatley
Attachments
- No local attachments were found for this message.