Skip to content

Commit 3e4a8bc

Browse files
authored
Merge pull request #15 from Baterka/main
Added support for ATmega328PB
2 parents 67c51c7 + 2a5f2ba commit 3e4a8bc

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ For controlling the MCP2515 a modified version of the [Arduino MCP2515 CAN inter
2929

3030
* [ATmega32](http://ww1.microchip.com/downloads/en/devicedoc/doc2503.pdf)
3131
* [ATmega328P](http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf)
32+
* [ATmega328PB](https://ww1.microchip.com/downloads/en/DeviceDoc/40001906A.pdf)
3233
* [ATmega32U4](https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf)
3334
* [ATmega64](http://ww1.microchip.com/downloads/en/DeviceDoc/atmel-2490-8-bit-avr-microcontroller-atmega64-l_datasheet.pdf)
3435
* [ATmega644P](https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42744-ATmega644P_Datasheet.pdf)
@@ -361,6 +362,10 @@ Additionally a *start app* command may be send at any time by the flash applicat
361362
362363
## Changelog
363364
365+
## 1.4.1 (2024-08-12)
366+
367+
* Added support for _ATmega328PB_
368+
364369
## 1.4.0 (2023-06-12)
365370
366371
* Added support for _ATmega32U4_

platformio.ini

+9
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ build_flags =
6969
;board_fuses.hfuse = 0xD8
7070
;board_fuses.efuse = 0xFC
7171

72+
[env:ATmega328PB]
73+
board = ATmega328PB
74+
build_flags =
75+
${env.build_flags}
76+
-Wl,--section-start=.text=0x7000 ; 2048 words bootloader, 0x3800 * 2
77+
78+
;board_fuses.lfuse = 0xFF
79+
;board_fuses.hfuse = 0xD8
80+
;board_fuses.efuse = 0xFC
7281

7382
[env:ATmega64]
7483
board = ATmega64

src/controllers.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#define SPI_MISO 3
4949
#define SPI_SCK 1
5050

51-
#elif defined(__AVR_ATmega328P__)
51+
#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328PB__)
5252
#define IV_REG MCUCR
5353

5454
#define SPI_DDR DDRB

0 commit comments

Comments
 (0)