à quoi sert le logiciel REALTERM

ANNA -  
 makaay20 -
Bonjour,

Pourriez vous me dire à quoi sert le logiciel REALTERM il est affiché sur mon bureau mais je ne sais pâs à quoi il sert .
Pourriez vous me répondre merci

1 réponse

Avelino
 
Slt,
RealTerm sert à envoyer ou recevoir des message . C'est comme l'hyperterminal de microsoft mais avec plus de détails sur la config du port, les modes d'affichage etc... Moi je l'utilise par exemple pour communiquer avec une carte d'acquisition ou bien pour charger du programme sur la carte.
-2
makaay20
 
Bonjour,
je travaille sur un projet de fin d'etude intitulé mesure du niveau d'un liquide dans une cuve par
ultrason le capteur utilisé et le ping #28015 de la société parallax.com
en fait mon problème se trouve au niveau de l'usart de l'atmega 168 .arrete moi
si je me trompe . je dois recevoir le résultat de la mesure sur l'écran de pc
à travers le logiciel réalterm que je ne parviens pas à configurer . J'ai chargé le
programme dans le microcontroleur et utilisé realterm pour envoyer un caractère à travers
le clavier pour mesure la distance qui se trouve entre l'obstacle et le capteur
mais ne se passe .
voici mon code


#include <inttypes.h>
#include <avr/io.h>
#include <avr/interrupt.h>

#define CR 0xD
#define LF 0xA

#define FOSC 8000000
#define BAUD 9600
#define UartFreq FOSC/16/BAUD-1

#define PORTping PORTD4
#define PINping PIND4
#define DDRping DDRD4
#define MasquePing (1<<PIND4)



// Transfert sur ligne série

void InitSerie() {
UBRR0=UartFreq;// vitesse de cadencement de l'usart
UCSR0C=(1<<USBS0)|(3<<UCSZ00); // trame 8 bit ,2 STOP
UCSR0B=(1<<TXEN0)|(1<<RXEN0); // uart ON
}

char IfCharIn () {
return (UCSR0A & (1<<RXC0));
}
char GetChar () {
while (!(UCSR0A & (1<<RXC0)));
return(UDR0);
}

void PutChar (char c) {
while (!(UCSR0A & (1<<UDRE0)));
UDR0=c;
}

char Majuscule (char c) {
if ((c>='a')&(c<='z')) c=c-'a'+'A';
return c;
}

void PutSpace() {
PutChar(' ');
}

void PutCr() {
PutChar('\n');
}

void PutSpChar(char c) {
PutSpace();
PutChar(c);
}

void PutChar2p(char c) {
PutChar(c);
PutChar(':');
}



void PutString (unsigned char *ch) {
while (*ch!=0) {
PutChar (*ch); ch++;
}
}

unsigned char Hex (unsigned char ch) {
ch=(ch&0xF);
if (ch<10) ch='0'+ch; else ch='A'+ch-10;
return ch;
}

void PutHex (unsigned char ch) {
PutChar (Hex (ch/16));
PutChar (Hex (ch%16));
}

void PutHex4 (unsigned int val) {
PutHex(val>>8);
PutHex(val%256);
}

void PutHex8 (unsigned long int val) {
PutHex4((unsigned int)(val>>16));
PutHex4((unsigned)(val%(0x10000)));
}

void PutInt2 (unsigned int nb) {
PutChar ((((unsigned char)nb/10)%10)+'0');
PutChar (((unsigned char)nb%10)+'0');
}

void PutInt3 (unsigned int nb) {
PutChar (((unsigned char)(nb/100)%10)+'0');
PutInt2 (nb%100);
}

void PutInt4 (unsigned int nb) {
PutChar (((unsigned char)(nb/1000)%10)+'0');
PutInt3 (nb%1000);
}


// Acquisition Ping

unsigned int AcqPing() {
unsigned int val;
unsigned int i, j, v;

DDRping=MasquePing; // ping en sortie
PORTping=0; // ping neutre
for (i=0; i<20; i++) val++;
PORTping=MasquePing; // trigger
for (i=0; i<20; i++) val++;
PORTping=0; // fin de l'impulsion
for (i=0; i<1000; i++) val++;
DDRping=0; // ping en entrée
val=0;
for (i=0; i<4000; i++) {
if (PINping&MasquePing) {
for (j=0; j<10; j++) v++;
val++;
}
}
return val;
}

int cptMvt;
unsigned int valMvt[8];

char Mouvement () {
unsigned int val;
PutInt4(cptMvt); PutChar(':');
if (cptMvt<8) {
val=AcqPing();
valMvt[cptMvt++]=val;
PutInt4(val); PutChar('-');
return (0);
} else {
if (cptMvt>=16) cptMvt=8; // buffer circulaire
val=AcqPing();
PutInt4(val);
PutChar(' ');
unsigned int moyenne=0;
int i;
for (i=0; i<8; i++) moyenne=(moyenne+valMvt[i]);
moyenne=(moyenne/8);
PutInt4(moyenne);
PutCr();
valMvt[(cptMvt++)-8]=val;
return ( ((3*val)>moyenne) && ((5*val)<(4*moyenne)) );
}
}


void Continu() {
unsigned int val;
while (!IfCharIn()) {
val=AcqPing();
}
}

int Temps;
int NbDet;
void Att() {
unsigned int i;
for (i=0; i<60000; i++) Temps++;
if (((Temps%30)==0)&&(NbDet>0)) {
NbDet--;
PutInt2(NbDet); PutCr();
}
}

void Intel() {
NbDet=0;
while (!IfCharIn()) {
if (Mouvement()) {
NbDet+=5;
PutInt2(NbDet); PutCr();
cptMvt=0;
}
Att();
}
}

// Programme principal

int main () {
char car;
cptMvt=0;


DDRD=0xFF; // port D en sortie
PORTD=0xFF; // port D en entrée avec Pull-up

InitSerie();
PutChar('G');


while (1) {
if (IfCharIn()) {
car=GetChar();
switch (Majuscule(car)) {
case 'A': PutInt4(AcqPing()); PutCr(); break;
case 'C': Continu(); break;
case 'M': while (!(Mouvement())) Att(); break;
case 'I': Intel();
default : PutChar('?'); break;
}
}
}
}
0