Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for ATmega328PB #15

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ For controlling the MCP2515 a modified version of the [Arduino MCP2515 CAN inter

* [ATmega32](http://ww1.microchip.com/downloads/en/devicedoc/doc2503.pdf)
* [ATmega328P](http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf)
* [ATmega328PB](https://ww1.microchip.com/downloads/en/DeviceDoc/40001906A.pdf)
* [ATmega32U4](https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf)
* [ATmega64](http://ww1.microchip.com/downloads/en/DeviceDoc/atmel-2490-8-bit-avr-microcontroller-atmega64-l_datasheet.pdf)
* [ATmega644P](https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42744-ATmega644P_Datasheet.pdf)
Expand Down Expand Up @@ -361,6 +362,10 @@ Additionally a *start app* command may be send at any time by the flash applicat

## Changelog

## 1.4.1 (2024-08-12)

* Added support for _ATmega328PB_

## 1.4.0 (2023-06-12)

* Added support for _ATmega32U4_
Expand Down
9 changes: 9 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ build_flags =
;board_fuses.hfuse = 0xD8
;board_fuses.efuse = 0xFC

[env:ATmega328PB]
board = ATmega328PB
build_flags =
${env.build_flags}
-Wl,--section-start=.text=0x7000 ; 2048 words bootloader, 0x3800 * 2

;board_fuses.lfuse = 0xFF
;board_fuses.hfuse = 0xD8
;board_fuses.efuse = 0xFC

[env:ATmega64]
board = ATmega64
Expand Down
2 changes: 1 addition & 1 deletion src/controllers.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define SPI_MISO 3
#define SPI_SCK 1

#elif defined(__AVR_ATmega328P__)
#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328PB__)
#define IV_REG MCUCR

#define SPI_DDR DDRB
Expand Down
Loading