Atmega32a interrupt capabilities

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been comparing Atmega32a to Atmega328pu. From the datasheet info it seems the former has far fewer external interrupt capabilities, with only 3 interrupt pins on 32a but every pin being capable of pin-change interrupt on 328pu.

 

Could someone confirm this? Just to make sure I haven't missed some crucial info on interrupts in 32a datasheet, since I've always imagined 32a to be a superior in any way to 328pu.

This topic has a solution.
Last Edited: Mon. Dec 9, 2019 - 06:50 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Confirmed.   The "pin change interrupt" is a newer feature, and the really old chips (ATmega8, ATmega32) don't have it; they only have the "external interrupt" feature (which is per-pin rather than per-port) on a couple of pins.)

 

since I've always imagined 32a to be a superior in any way to 328pu.

the 32 also has fewer PWM outputs, since Timer0 and Timer2 each only have a single Output Compare Register.

 

Now, the ATmega1284 or ATmega4809, in DIP... Those are sweet chips!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guess I've put a bit too much faith into the bigger chips. Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


totesnochill wrote:
Guess I've put a bit too much faith into the bigger chips.

Ummm---why don't you have your cake and eat it too?  Mega32 was released circa 2002.  Sure, the Mega88 generation has more "stuff" -- compare to Mega8 or Mega8A.  So simply use the '324 generation.  Probably less expensive than your '32A.  [I lied -- see below]  More toyz, including pin-change.  Less power.  Faster max clock rate.  Shall I go on?

 

I don't know what you are getting at about the religious beliefs of the bigger chips.

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(Thus my mentioning the 4809.  Which is currently cheaper ($2.22 for 1.  Even cheaper for the SMT packages) than either the 324 or 32.  Though I guess you lose the crystal oscillator...)

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to point out that INT0 / INT1 are a "bit different" to PCINTs (328 only). The INTn pins each have a completely separate interrupt and can be configured to trigger for varying events (high/low/rising/falling). The PCINTs on the other had are in groups of 8 pins per interrupt (so you then need to read PIN and compare to previous to find out which pin actually changed) and the interrupts are only for a change of state, you cannot specify things like rising/falling so have to do that manually in the software if you want to look for specific events like a 1 to 0 or a 0 to 1 change.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:

(Thus my mentioning the 4809.  Which is currently cheaper ($2.22 for 1.  Even cheaper for the SMT packages) than either the 324 or 32.  Though I guess you lose the crystal oscillator...)

 

 


At some point comparisons across generations are a bit ridiculous. As is complaints about the feature set in a model several generations back. Ya know my'63 Chevy doesn't have disc brakes.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

INT0 / INT1 are a "bit different" to PCINTs (328 only). The INTn pins each have a completely separate interrupt and can be configured to trigger for varying events (high/low/rising/falling).

The 4809 (and other mega0/xTiny chips) have an interesting "merge" of the two feature sets.  You can set the varying events on a per-pin basis, but there's only one interrupt per port.  If you only use one imterupt per port, you can get behavior equivalent the the INT0/INT1 pins, but if you want to have all the pins interrupt, you'll need to check which pin a actually changed.   There should be varying optimizations "in between."

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great to know, thanks! Gonna give those a try as well.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

totesnochill wrote:

Great to know, thanks! Gonna give those a try as well.

Note the new generation of chips also have a different method to program, so you will need all new programming hardware, the good news is it too is cheaper.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...