Replies: 3 comments
-
Well yeah of course it's pin compatible with that part. Not an accident. People will use parts for nutty lengths of time, regardless of the consequences. I mean, look how much an ATmega2560 - no, 1281, keep it apples to apples, that's a 128k flash 64 pin chip, $11 in TQFP package. Top speed is 16 MHz for the 4.5v min version 8 MHz for the 2.7v version . Those are still for sale, still an active product. People are STILL BUYING THEM. Right next to them is an AVR128DB64, it's also a 64 pin TQFP package with 128k flash, AVR architecture (except several of the most popular opcodes run 1 clock cycle faster now), AVR peripherals (no, not the ones your used to like the 4313 has, the good versions - they still show some of their heritage, but they're considerably more capable). The power consumption is lower, the clock is in spec at 24 MHz across the whole 1.8-5.5v range, and it's got a boatload of features that put the 1281 to shame, and it's like $2. And yet, the 1281's are still an active product. People are still buying them at eleven bucks each. During the chip shortage, they were not one of the few AVRs that wasn't out of stock (the ATtiny828 was usually available though! That part is really really sad ) So yes, I am aware of how sticky pinouts are. (I think there's another AT89C something that has the same pinout, but who the hell cares. One should try to travel only through time in the forwards direction, and the AT89's are quite a ways back). Anyway, as to the task at hand:
|
Beta Was this translation helpful? Give feedback.
-
OK, I see. For development/test purposes I can just connect the existing sockets with a few wires to some other small board like Nano. The device is a simple ATS controller working with a small (5 kW, 1-cylinder air-cooled) diesel generator, basically it has 3 digital inputs (power fail, engine running signal from flywheel alternator, auto/manual mode button) and 8 outputs (fuel valve, start relay, mains/generator power relay, beeper, 4 status LEDs). What makes me a bit nervous is lack of WDT or brown-out reset, so bad things might happen if it hangs while cranking the engine with weak battery. Not to mention poorly written firmware, like handing the button (simple toggle between auto/manual modes) in a busy loop (ignoring any other inputs while waiting for button release). Some features could also be added, like auto-test (simulate power failure if there wasn't one for more than a week) as it already happened to find out the battery is bad only after power failed. BTW, nice to see the AVR lives on after so many years. I was hacking on AVR-GCC in early 2000s, like adding support for some new opcodes that were not supported by the very first AT90Sxxxx chips. |
Beta Was this translation helpful? Give feedback.
-
As for the "warning" gcc function attribute - not sure if I fully understand the question, but could "deprecated" do what you expect? |
Beta Was this translation helpful? Give feedback.
-
Yes I know there are better parts but I happen to have an odd use case for it. I have an existing device with AT89C2051 in DIL20 socket, and would like to replace it with ATtiny4313 with my own firmware to fix some bugs in the original. It's an one-off thing, not worth making a new board, and the x313 seem to be unique in being pin-compatible (except RESET pin inverted, but that board has only a simple RC delay circuit, easy to modify) with the even older but once popular AT89C2051. Thanks to the small size of urboot I think it makes sense to add bootloader support for the ATtiny4313.
Beta Was this translation helpful? Give feedback.
All reactions