While looking for a source for an obsolete timer/counter (MC6840) it occurred to me that I could probably duplicate all the functions I wanted with one ore two ATTinys or at the worst an ATmega8 and not use the board space that the old chip would.
AVRs are so cheap now, it makes sense to use them to replace other chips.. Even if it is an underuse of an avr by our standards.When using 16x2 LCD's, I hate wasting all those pins. Atmega8 costs $1.20, two caps costs a dime, internal oscillator is fine.... And makes an awesome serial and I2C interface chip. For a buck thirty, you can build character sets, handle sprites... Etc..I am also going to do something similar with a 328 and the TVOUT lib.All of a sudden, using a "whole" avr doesn't seem like such a waste...
Quote from: PapaG on Dec 13, 2012, 06:28 amWhile looking for a source for an obsolete timer/counter (MC6840) it occurred to me that I could probably duplicate all the functions I wanted with one ore two ATTinys or at the worst an ATmega8 and not use the board space that the old chip would.I suspect that is true; that duplicating the functionality is possible. It does look like a lot of work.But, I believe the bus timing is going to be the hitch-in-your-get-along. Assuming I'm reading that datasheet correctly, the MC6840 is expected to have data available on the bus within a small number of nanoseconds of the control line(s) being asserted. Even clocked at 20 MHz and staging everything in anticipation of the control line being asserted, I don't think you will be able to meet the deadline.
Ah. So not a drop-in replacement.Some general information that may help...• Timer 0 on most (possibly all) of the processors is identical.• More recently introduced ATtiny processors typically have two timers.• The second timer on ATtiny processors can be very unique. Timer 1 on the ATtiny85 is a good example. There is nothing else like it in the AVR product line.• The second timer on ATtiny processors can be very similar. Timer 1 on the ATtiny84 is a good example. It is identical to timer 1 on ATmega processors.• If accuracy is not very important, the internal oscillator works a treat (±1% after tuning).
Thanks, that is helpful information.
I was looking up all those facts and you've summarized them nicely for me.
As for accuracy, one could probably drive them with a precise clock already available because of the other MPU.
You could even use the crystal on the AVR and scale that clock down to drive the MPU clock input as I think the prescaler scales clock out on some AVRs.
You can but the AVR will also run scaled-down.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16