ken- R
Newbie
Hi ,
I am working on a project that aims to print medical results via a CSN-A2 thermal printer using the RS 232 serial protocol
I would like to know how to take my . for now, here is the piece of code that I was able to write :
void envoyer_text(unsigned char *t) { unsigned char i ; i = 0; while (t != 0) { Soft_UART_Write (t) ; i++; } } void main() { unsigned char titre[] = " RESULTAT DES PRISES DES PARAMETRES : "; unsigned char poids[] = " POIDS : "; unsigned char taille[] = " TAILLE : "; unsigned char imc[] = " IMC : "; unsigned char temperature[] = " TEMPERATURE : "; unsigned char spo2[] = " SPO2 : "; unsigned char pression [] = " PRESSION ARTERIELLE : "; Soft_UART_Init (PORTC, 9600, 7, 6, 0); while (1) { envoyer_text(titre); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(poids); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(taille); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(IMC); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(temperature); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(spo2); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(pression);
}
}
I am working on a project that aims to print medical results via a CSN-A2 thermal printer using the RS 232 serial protocol
I would like to know how to take my . for now, here is the piece of code that I was able to write :
void envoyer_text(unsigned char *t) { unsigned char i ; i = 0; while (t != 0) { Soft_UART_Write (t) ; i++; } } void main() { unsigned char titre[] = " RESULTAT DES PRISES DES PARAMETRES : "; unsigned char poids[] = " POIDS : "; unsigned char taille[] = " TAILLE : "; unsigned char imc[] = " IMC : "; unsigned char temperature[] = " TEMPERATURE : "; unsigned char spo2[] = " SPO2 : "; unsigned char pression [] = " PRESSION ARTERIELLE : "; Soft_UART_Init (PORTC, 9600, 7, 6, 0); while (1) { envoyer_text(titre); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(poids); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(taille); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(IMC); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(temperature); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(spo2); Soft_UART_Write (0x0D); Soft_UART_Write (0x0A); envoyer_text(pression);
}
}