Compare commits

...

3 commits

Author SHA1 Message Date
Imbus
446dad0242 Makefile targets related to various readouts 2024-03-24 06:12:01 +01:00
Imbus
353e7cadae Links to datasheet/register map 2024-03-24 06:11:41 +01:00
Imbus
99f21a1796 Some more registers 2024-03-24 06:11:27 +01:00
3 changed files with 21 additions and 3 deletions

View file

@ -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>

View file

@ -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

View file

@ -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