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

De projets-se.plil.fr
Aller à la navigation Aller à la recherche
Aucun résumé des modifications
Ligne 4 : Ligne 4 :


==== Vérification des connecteurs HE-10 ====
==== Vérification des connecteurs HE-10 ====
Nous avons testé un 7-segments sur tous les connceteurs HE-10. Vous pouvez le voir dans la sous-section COMMUNICATION SPI de la section ORDONNANCEUR.


==== Lecture Carte SD ====
==== Lecture Carte SD ====

Version du 13 novembre 2024 à 10:31

Code Source et autre programmes

TESTS PRELIMINAIRES

Vérification des connecteurs HE-10

Nous avons testé un 7-segments sur tous les connceteurs HE-10. Vous pouvez le voir dans la sous-section COMMUNICATION SPI de la section ORDONNANCEUR.

Lecture Carte SD

CarteSD.png

Fonctionnement des LEDs

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


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