Who knows the numerical addresses for PB0-PB3 lines of ATtiny44 under ATTinyCore?

I am programming an ATtiny44 using Arduino as ISP Programmer under ATTinyCore. The PA0-PA7 works well as ouput lines with 0 to 7 respectively as their numerical addresses. For example: I can execute digitalWrite(7, HIGH) code.

Unfortunately, I cannot operate PB0, PB1, PB2 as output lines with 8, 9, 10 respectively as their numerical addresses. To activate these lines, I have to use bitSet(PORTB, PB0); and bitClear(PORTB, PB0) instructions instead of digitalWrite(DPin, HIGH/LOW).

Does anyone know the correct numerical addresses for PB0-PB3 lines? Or ATTinyCore has not defined their numerical addesses.

The "official" diagram seems to match what you are using. Not sure what the problem is. Are you using any of the alternate functions for the pins?

Depends which pin mapping you use.

From variants/tinyX4_reverse/pins_arduino.h (pinmapping=anew)

#define PIN_PA0  (0)
#define PIN_PA1  ( 1)
#define PIN_PA2  ( 2)
#define PIN_PA3  ( 3)
#define PIN_PA4  ( 4)
#define PIN_PA5  ( 5)
#define PIN_PA6  ( 6)
#define PIN_PA7  ( 7)
#define PIN_PB0  ( 10)
#define PIN_PB1  ( 9)
#define PIN_PB2  ( 8)
#define PIN_PB3  (11)  /* RESET */

From variants/tinyX4/pins_arduino.h (pinmapping=old)

#define PIN_PA0  (10)
#define PIN_PA1  ( 9)
#define PIN_PA2  ( 8)
#define PIN_PA3  ( 7)
#define PIN_PA4  ( 6)
#define PIN_PA5  ( 5)
#define PIN_PA6  ( 4)
#define PIN_PA7  ( 3)
#define PIN_PB0  ( 0)
#define PIN_PB1  ( 1)
#define PIN_PB2  ( 2)
#define PIN_PB3  (11)  /* RESET */

Note that it’s 10, 9, 8, Not 8, 9, 10…

Tested and works perfect --
10 for PB0,
9 for PB1, and
8 for PB2.

Would 7 11 be the numeric address for PB3 if RESET-pin is ever used as IO line? //Edit

As shown in post #3, it's 11 in both pin mappings.

I will report after testing. Bottom part of your post #3 has reported unacceptable numerical addresses.

Say what? Pin mappings are arbitrary and can be different for the same chip in different "boards." If your board has board-level labels, you need to check which pin mapping is actually in use, assuming it's not some widely standardized board like an Uno or Nano. Any particular list of pin mappings cannot be "unacceptable", because it might be used on SOME board that SOMEONE sells.

In this case, there are two variants defined in ATTinyCore for the ATtinyx4, and they BOTH say PB3 is pin 11.

Also see the comment there: "PIN_Pxn notation is always recommended"

1 Like

As I am using ATTinyCore for my ATtiny44 prototype board (Fig-1), I have understood that the pin mappings are defined there. So, regardless of Manufacturers variants, ATtiny44 should bear unique numerical addresses for the IO pins. For example:

PA0 0
PA1 1
PA2 2
PA3 3
PA4 4
PA5 5
PA6 6
PA7 7

PB0 10
PB1 9
PB2 8
PB3 11   //not yet tested

Figure-1:

Regardless of what you find acceptable, ATTinyCore supports two mappings from logical pin numbers to physical pins for the ATTinyX4.

Option: Pin Mapping                                             pinmapping
        Clockwise (recommended, like damellis core) ✔           pinmapping=anew
        Counterclockwise (like old ATTinyCore and x41-series)   pinmapping=old

I have no idea if there is any ATtiny44 Development Board similar to Digispark ATtiny85 Dev Board.

If there would exist such development boards and they would come from different Manufactuerers, then the pin mapping would be the same like:

PA0 - PA7 = 0 - 7; 
PB0 - PB2 = 10 - 8; 
PB3       = 11.

This conversation no longer serves any useful purpose. Reality is what it is.

1 Like

The reality is --
My prototype ATtiny44 Board of Fig-1 of post #9 agrees with the following pin mappings:

PA0 0
PA1 1
PA2 2
PA3 3
PA4 4
PA5 5
PA6 6
PA7 7

PB0 10
PB1 9
PB2 8
PB3 11   //untested

Apparently I am not getting correct timing from TC1 of ATtiny44. Would appreciate to know the Fuse Bit values after performing "Burn Bootloader" process under ATTinyCore. This is to cross check the operating frequency of the MCU.

Why did you asked the questions rather than see it yourself in the ATTinyCore. source? The same about pin numbers...

1 Like

Arduino Forum is an open source for information and help like Google and debated ChatGPT.

I have asked, becsuse, I have not found the Fuse Bit values in this file:

Why you looking them in that file?

The fuse values depend on clocking and BOD levels, there are 15-20 options of fuse values just for a single Attiny44 chip.
See them in ATTinyCore/avr/boards.txt file. The description of Attiny44 chip with bootloader started from the 2818 line

In my PC?

On AttinyCore github

The Factory Set value of Fuse Bits for ATtiny44 are:

EF = 0xFF
HF = 0xDF
LF = 0x62     //Internal 8 MHz going through divide by eight

What are the corresponding values for the Fuse Bits after "Burn Bootloder" process?

Does your referred link contain the information I am looking for?