« SE4Binome2024-7 » : différence entre les versions

De projets-se.plil.fr
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Ligne 92 : Ligne 92 :
|Le shield soudée avec juste le BootLoader dans le microP
|Le shield soudée avec juste le BootLoader dans le microP
|}
|}
[[Fichier:CarteSD.png|vignette]]


==== Carte RNDIS ====
==== Carte RNDIS ====

Version du 13 novembre 2024 à 10:22

Code Source et autre programmes

Ordonnanceur

SQUELETTE BASIQUE DE L'ORDONNANCEUR

STRUCTURE DES TÂCHES

CLIGNOTEMENT DES LEDs

COMMUNICATION SERIE

Minicom démontrant le bon fonctionnement du code à gauche

COMMUNICATION SPI

7SegmentPicture.jpg

FONCTION SLEEP

Makefile

export CC = avr-gcc

export MCU = atmega328p
export TARGET_ARCH = -mmcu=$(MCU)

export CFLAGS =  -Wall -I. -DF_CPU=16000000 -Os #-g
export LDFLAGS = -g $(TARGET_ARCH) -lm -Wl,--gc-sections #	-Os


TARGET = ordonnanceur1
#TERM = /dev/ttyUSB0
TERM = /dev/ttyACM0
CPPFLAGS = -mmcu=$(MCU)
PGMER = -c arduino -b 115200 -P $(TERM)
PGMERISP = -c arduino -b 115200 -P $(TERM)
ARVDUDECONF= -C /usr/local/arduino/arduino-0021/hardware/tools/avrdude.conf
export DUDE = /usr/bin/avrdude -F -v -p $(MCU) $(AVRDUDECONF)

C_SRC = $(wildcard *.c)
OBJS = $(C_SRC:.c=.o)


all: $(TARGET).hex

ass:$(C_SRC)
	$(CC) -S $(CPPFLAGS) $(CFLAGS) $< -o $@

clean:
	rm -f *.o

%.o:%.c
	$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@


$(TARGET).elf: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS)

$(TARGET).hex: $(TARGET).elf
	avr-objcopy -j .text -j .data -O ihex $(TARGET).elf $(TARGET).hex
	avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex $(TARGET).elf eeprom.hex

upload: $(TARGET).hex
	stty -F $(TERM) hupcl # reset
	$(DUDE) $(PGMER) -U flash:w:$(TARGET).hex
#	$(DUDE) $(PGMERISP) -U flash:w:$(TARGET).hex

size: $(TARGET).elf
	avr-size --format=avr --mcu=$(MCU) $(TARGET).elf

Communication Série

Schéma, PCB & KiCAD

Shield

Photos et vidéos description
Carte-mère soudée.jpg
Le shield soudée avec juste le BootLoader dans le microP
CarteSD.png

Carte RNDIS

NOTES

deux ports USB pour la carte fille : un pour la connexion en ISP/Réseau à l'ordinateur et un pour la programmation. Possibilité de faire une connexion SPI avec un câble RJ45

Ressources & Sources

Lien Git : https://gitea.plil.fr/rboursau/S8-Pico-Binome-7