Compare commits
3 commits
5010e84e06
...
446dad0242
Author | SHA1 | Date | |
---|---|---|---|
![]() |
446dad0242 | ||
![]() |
353e7cadae | ||
![]() |
99f21a1796 |
3 changed files with 21 additions and 3 deletions
|
@ -5,7 +5,11 @@
|
|||
|
||||
// MPU-6050 register addresses
|
||||
#define MPU6050_REG_ACCEL_XOUT_H 0x3B
|
||||
#define MPU6050_REG_ACCEL_XOUT_L 0x3C
|
||||
#define MPU6050_REG_GYRO_XOUT_H 0x43
|
||||
#define MPU6050_REG_GYRO_XOUT_L 0x44
|
||||
#define MPU6050_TEMP_OUT_H 0x41
|
||||
#define MPU6050_TEMP_OUT_L 0x42
|
||||
#define MPU6050_REG_PWR_MGMT_1 0x6B
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
# AVR Playground
|
||||
|
||||
See [AVR i2c library](https://github.com/Sovichea/avr-i2c-library).
|
||||
See:
|
||||
|
||||
[QEMU AVR Docs](https://www.qemu.org/docs/master/system/target-avr.html)
|
||||
- [AVR i2c library](https://github.com/Sovichea/avr-i2c-library).
|
||||
- [MPU-6000/6050 Datasheet](https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf)
|
||||
- [MPU-6000/6050 Register Map](https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf)
|
||||
- [QEMU AVR Docs](https://www.qemu.org/docs/master/system/target-avr.html)
|
||||
|
||||
```bash
|
||||
sudo dnf install avr-binutils avr-libc avr-gcc avr-gcc-c++ avrdude qemu-system-avr
|
||||
|
|
13
makefile
13
makefile
|
@ -70,4 +70,15 @@ size: $(TARGET).hex
|
|||
|
||||
# Reset target
|
||||
reset:
|
||||
avrdude -p $(MCU) -c $(PROGRAMMER) -E reset
|
||||
avrdude -p $(MCU) -c $(PROGRAMMER) -E reset
|
||||
|
||||
read-flash:
|
||||
avrdude -p $(MCU) -c $(PROGRAMMER) -U flash:r:flash.hex:i
|
||||
|
||||
read-eeprom:
|
||||
avrdude -p $(MCU) -c $(PROGRAMMER) -U eeprom:r:eeprom.hex:i
|
||||
|
||||
read-fuses:
|
||||
avrdude -p $(MCU) -c $(PROGRAMMER) -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h
|
||||
|
||||
.PHONY: all clean flash qemu asm serial reset read-flash read-eeprom size
|
Loading…
Reference in a new issue