Cours:Multimetre : Différence entre versions

De troyesGEII
Aller à : navigation, rechercher
Ligne 10 : Ligne 10 :
 
**[[Media:VoltmetreRoutageEtudiants.sch]]
 
**[[Media:VoltmetreRoutageEtudiants.sch]]
 
**[[Media:VoltmetreRoutageEtudiants.brd]]
 
**[[Media:VoltmetreRoutageEtudiants.brd]]
 +
 +
=Programmation=
 +
 +
==Fonction affiche==
 +
 +
<source lang=cpp>
 +
void affiche7sgt(uint8_t n)
 +
{
 +
  PORTB=(PORTB&0xf0)|(n&0x0f);
 +
}
 +
</source>

Version du 10 novembre 2021 à 09:07

Fichiers

Programmation

Fonction affiche

void affiche7sgt(uint8_t n)
{
  PORTB=(PORTB&0xf0)|(n&0x0f);
}