pato-z80-home-computer/pat80-io-devices/composite-pal-adapter/software/avr-assembly/README.md

21 lines
700 B
Markdown
Raw Normal View History

2021-01-02 17:02:30 +01:00
# Atmega Microcontroller
## Auto build & flash
Use make to build & flash automatically.
The first time the microcontroller is flashed, is needed to flash fuses:
`make fuses`
Then, every time the asm code is changed, it can be built and flashed with:
`make`
2021-01-02 17:02:30 +01:00
## Build ASM code
`avra filename.asm` (generates *filename.hex*)
## Flash
### Rom
`minipro -w filename.hex -p ATMEGA1284`
### Fuses
Read fuses: `minipro -r -c config -p ATMEGA1284` (`-r -c config` means read configuration (fuses))
Fuses must be written all together, so read the current values, edit the generated file and write it.
The meaning of every bis is in the conf file.
Write fuses: `minipro -w fuses.conf -c config -p ATMEGA1284`